-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-35765 ST_OVERLAPS wrong result when dim(geom1) <> dim(geom2)
Validates that the two geometries passed to ST_OVERLAPS have the same number of dimensions.
- Loading branch information
1 parent
2543be6
commit 34a9098
Showing
3 changed files
with
80 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# MDEV-35765 ST_OVERLAPS returns true despite dim(originalInput1) <> dim(originalInput2) | ||
# | ||
DROP table if EXISTS t1; | ||
Warnings: | ||
Note 1051 Unknown table 'test.t1' | ||
DROP table if EXISTS t2; | ||
Warnings: | ||
Note 1051 Unknown table 'test.t2' | ||
CREATE TABLE t1(geom geometry NOT NULL); | ||
CREATE TABLE t2(geom geometry NOT NULL); | ||
INSERT INTO t1 (geom) VALUES(ST_GeomFromText('POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))')); | ||
INSERT INTO t2 (geom) VALUES(ST_GeomFromText('LINESTRING (1 1, 1 2, 2 2, 2 1, 1 1)')); | ||
SELECT ST_OVERLAPS(t1.geom, t2.geom) FROM t1, t2; | ||
ST_OVERLAPS(t1.geom, t2.geom) | ||
0 | ||
DROP TABLE t1, t2; | ||
# | ||
# End of 10.6 tests | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--echo # | ||
--echo # MDEV-35765 ST_OVERLAPS returns true despite dim(originalInput1) <> dim(originalInput2) | ||
--echo # | ||
DROP table if EXISTS t1; | ||
DROP table if EXISTS t2; | ||
CREATE TABLE t1(geom geometry NOT NULL); | ||
CREATE TABLE t2(geom geometry NOT NULL); | ||
INSERT INTO t1 (geom) VALUES(ST_GeomFromText('POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))')); | ||
INSERT INTO t2 (geom) VALUES(ST_GeomFromText('LINESTRING (1 1, 1 2, 2 2, 2 1, 1 1)')); | ||
SELECT ST_OVERLAPS(t1.geom, t2.geom) FROM t1, t2; | ||
DROP TABLE t1, t2; | ||
--echo # | ||
--echo # End of 10.6 tests | ||
--echo # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters