summaryrefslogtreecommitdiff
path: root/mysql-test/r/gis-rtree.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/gis-rtree.result')
-rw-r--r--mysql-test/r/gis-rtree.result48
1 files changed, 48 insertions, 0 deletions
diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result
index c400ebb39ef..0506a0b2a0a 100644
--- a/mysql-test/r/gis-rtree.result
+++ b/mysql-test/r/gis-rtree.result
@@ -1596,3 +1596,51 @@ SELECT COUNT(*) FROM t1 FORCE INDEX(l) WHERE MBRWithin(GEOMFROMTEXT('POINT(0 0)'
COUNT(*)
1
DROP TABLE t1;
+#
+# Start of 10.1 tests
+#
+#
+# MDEV-8239 Reverse spatial operations OP(const, field) do not get optimized
+#
+CREATE TABLE t1 (a GEOMETRY NOT NULL, SPATIAL KEY(a)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (Point(1,2)),(Point(1,3));
+EXPLAIN SELECT * FROM t1 WHERE MBRINTERSECTS(a,Point(1,2));
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 34 NULL 1 Using where
+EXPLAIN SELECT * FROM t1 WHERE ST_INTERSECTS(a,Point(1,2));
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 34 NULL 1 Using where
+EXPLAIN SELECT * FROM t1 WHERE MBRINTERSECTS(Point(1,2),a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 34 NULL 1 Using where
+EXPLAIN SELECT * FROM t1 WHERE ST_INTERSECTS(Point(1,2),a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 34 NULL 1 Using where
+DROP TABLE t1;
+#
+# MDEV-8610 "WHERE CONTAINS(indexed_geometry_column,1)" causes full table scan
+#
+CREATE TABLE t1 (a GEOMETRY NOT NULL, SPATIAL KEY(a)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (Point(1,1)),(Point(2,2)),(Point(3,3));
+EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,1.0);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,1e0);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,TIME'00:00:00');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,DATE'2001-01-01');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,TIMESTAMP'2001-01-01 00:00:00');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+DROP TABLE t1;
+#
+# End of 10.1 tests
+#