| 1 |
--source include/have_innodb.inc |
| 2 |
SET default_storage_engine=innodb; |
| 3 |
--source include/gis_generic.inc |
| 4 |
--source include/gis_keys.inc |
| 5 |
|
| 6 |
# |
| 7 |
# Bug #15680 (SPATIAL key in innodb) |
| 8 |
# |
| 9 |
# MySQL 5.7 Introduces SPATIAL keys for InnoDB |
| 10 |
#--error ER_TABLE_CANT_HANDLE_SPKEYS |
| 11 |
create table t1 (g geometry not null, spatial gk(g)) engine=innodb; |
| 12 |
drop table t1; |
| 13 |
|
| 14 |
# |
| 15 |
# MDEV-12462 SPATIAL index fails to work with CONTAINS |
| 16 |
# |
| 17 |
|
| 18 |
create table t1(id int not null primary key, g1 geometry not null, spatial index(g1)); |
| 19 |
insert into t1 values(1, polygonfromtext('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))')); |
| 20 |
explain select id from t1 where contains(g1, pointfromtext('POINT(1 1)')); |
| 21 |
select id from t1 where contains(g1, pointfromtext('POINT(1 1)')); |
| 22 |
drop table t1; |