diff options
Diffstat (limited to 'mysql-test/t/gis-rtree.test')
-rw-r--r-- | mysql-test/t/gis-rtree.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/gis-rtree.test b/mysql-test/t/gis-rtree.test index 579ec65f149..88f31143d93 100644 --- a/mysql-test/t/gis-rtree.test +++ b/mysql-test/t/gis-rtree.test @@ -827,3 +827,22 @@ INSERT INTO t1 (b) SELECT b FROM t1; OPTIMIZE TABLE t1; DROP TABLE t1; + + +# +# Bug #29070: Error in spatial index +# + +CREATE TABLE t1 (a INT, b GEOMETRY NOT NULL, SPATIAL KEY b(b)); +INSERT INTO t1 VALUES (1, GEOMFROMTEXT('LINESTRING(1102218.456 1,2000000 2)')); +INSERT INTO t1 VALUES (2, GEOMFROMTEXT('LINESTRING(1102218.456 1,2000000 2)')); + +# must return the same number as the next select +SELECT COUNT(*) FROM t1 WHERE + MBRINTERSECTS(b, GEOMFROMTEXT('LINESTRING(1 1,1102219 2)') ); +SELECT COUNT(*) FROM t1 IGNORE INDEX (b) WHERE + MBRINTERSECTS(b, GEOMFROMTEXT('LINESTRING(1 1,1102219 2)') ); + +DROP TABLE t1; + +--echo End of 5.0 tests. |