diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 5706f076c6c..b6b684e0893 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -1035,6 +1035,10 @@ NULL NULL drop table t1; End of 5.1 tests +CREATE TABLE t0 (a BINARY(32) NOT NULL); +CREATE SPATIAL INDEX i on t0 (a); +ERROR 42000: A SPATIAL index may only contain a geometrical type column +INSERT INTO t0 VALUES (1); CREATE TABLE t1( col0 BINARY NOT NULL, col2 TIMESTAMP, @@ -1063,5 +1067,4 @@ col2 LINESTRING, SPATIAL INDEX i1 (col1, col2) ); ERROR HY000: Incorrect arguments to SPATIAL INDEX -DROP TABLE t1; -DROP TABLE t2; +DROP TABLE t0, t1, t2; diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 7ca364d935c..520da7e62c9 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -762,7 +762,14 @@ drop table t1; # # Bug #50574 5.5.x allows spatial indexes on non-spatial # columns, causing crashes! +# Bug#11767480 SPATIAL INDEXES ON NON-SPATIAL COLUMNS +# CAUSE CRASHES. # +CREATE TABLE t0 (a BINARY(32) NOT NULL); +--error ER_SPATIAL_MUST_HAVE_GEOM_COL +CREATE SPATIAL INDEX i on t0 (a); +INSERT INTO t0 VALUES (1); + --error ER_SPATIAL_MUST_HAVE_GEOM_COL CREATE TABLE t1( col0 BINARY NOT NULL, @@ -800,6 +807,5 @@ CREATE TABLE t3 ( ); # cleanup -DROP TABLE t1; -DROP TABLE t2; +DROP TABLE t0, t1, t2;