summaryrefslogtreecommitdiff
path: root/mysql-test/r/gis-rtree.result
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2010-03-04 18:13:08 +0200
committerGeorgi Kodinov <joro@sun.com>2010-03-04 18:13:08 +0200
commitd934426ff5d3e37c69c297677b5ff061e960d731 (patch)
tree60dc8cbaa011d099ee452afab1b8ed208d799d1e /mysql-test/r/gis-rtree.result
parent63a88e137365c4158e22c1c8aba7847b5a0ffe86 (diff)
downloadmariadb-git-d934426ff5d3e37c69c297677b5ff061e960d731.tar.gz
Bug #51357: crash when using handler commands on spatial indexes
Spatial indexes were not checking for out-of-record condition in the handler next command when the previous command didn't found rows. Fixed by making the rtree index to check for end of rows condition before re-using the key from the previous search. Fixed another crash if the tree has changed since the last search. Added a test case for the other error.
Diffstat (limited to 'mysql-test/r/gis-rtree.result')
-rw-r--r--mysql-test/r/gis-rtree.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result
index 68c4a6a13e5..49ccb05c699 100644
--- a/mysql-test/r/gis-rtree.result
+++ b/mysql-test/r/gis-rtree.result
@@ -1526,4 +1526,26 @@ SELECT 1 FROM t1 WHERE a >= GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1
1
1
DROP TABLE t1;
+#
+# Bug #51357: crash when using handler commands on spatial indexes
+#
+CREATE TABLE t1(a GEOMETRY NOT NULL,SPATIAL INDEX a(a));
+HANDLER t1 OPEN;
+HANDLER t1 READ a FIRST;
+a
+HANDLER t1 READ a NEXT;
+a
+HANDLER t1 READ a PREV;
+a
+HANDLER t1 READ a LAST;
+a
+HANDLER t1 CLOSE;
+HANDLER t1 OPEN;
+HANDLER t1 READ a FIRST;
+a
+INSERT INTO t1 VALUES (GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))'));
+HANDLER t1 READ a NEXT;
+a
+HANDLER t1 CLOSE;
+DROP TABLE t1;
End of 5.0 tests.