summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb/t/innodb_gis.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/innodb/t/innodb_gis.test')
-rw-r--r--mysql-test/suite/innodb/t/innodb_gis.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/innodb_gis.test b/mysql-test/suite/innodb/t/innodb_gis.test
new file mode 100644
index 00000000..c895d0a2
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_gis.test
@@ -0,0 +1,22 @@
+--source include/have_innodb.inc
+SET default_storage_engine=innodb;
+--source include/gis_generic.inc
+--source include/gis_keys.inc
+
+#
+# Bug #15680 (SPATIAL key in innodb)
+#
+# MySQL 5.7 Introduces SPATIAL keys for InnoDB
+#--error ER_TABLE_CANT_HANDLE_SPKEYS
+create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
+drop table t1;
+
+#
+# MDEV-12462 SPATIAL index fails to work with CONTAINS
+#
+
+create table t1(id int not null primary key, g1 geometry not null, spatial index(g1));
+insert into t1 values(1, polygonfromtext('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'));
+explain select id from t1 where contains(g1, pointfromtext('POINT(1 1)'));
+select id from t1 where contains(g1, pointfromtext('POINT(1 1)'));
+drop table t1;