diff options
author | Magne Mahre <magne.mahre@sun.com> | 2010-02-11 18:32:53 +0100 |
---|---|---|
committer | Magne Mahre <magne.mahre@sun.com> | 2010-02-11 18:32:53 +0100 |
commit | 4480e80312754fdc2329c04291f73e3964a47526 (patch) | |
tree | dcf152d18872e02531e593b61954a0096cfcec14 /mysql-test/t/gis.test | |
parent | fe70c237421903e8d766f83b938514788464f1e4 (diff) | |
parent | 203793514d4e5035691bb750256532b8ecf0b6da (diff) | |
download | mariadb-git-4480e80312754fdc2329c04291f73e3964a47526.tar.gz |
merge from mysql-trunk-bugfixing
Diffstat (limited to 'mysql-test/t/gis.test')
-rw-r--r-- | mysql-test/t/gis.test | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 70d73234ea8..1aeb2fa5b14 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -726,3 +726,48 @@ SELECT Polygon(1234512,''); SELECT Polygon(12345123,''); --echo End of 5.1 tests + +# +# Bug #50574 5.5.x allows spatial indexes on non-spatial +# columns, causing crashes! +# +--error ER_SPATIAL_MUST_HAVE_GEOM_COL +CREATE TABLE t1( + col0 BINARY NOT NULL, + col2 TIMESTAMP, + SPATIAL INDEX i1 (col0) +) ENGINE=MyISAM; + +# Test other ways to add indices +CREATE TABLE t1 ( + col0 BINARY NOT NULL, + col2 TIMESTAMP +) ENGINE=MyISAM; + +--error ER_SPATIAL_MUST_HAVE_GEOM_COL +CREATE SPATIAL INDEX idx0 ON t1(col0); + +--error ER_SPATIAL_MUST_HAVE_GEOM_COL +ALTER TABLE t1 ADD SPATIAL INDEX i1 (col0); + +CREATE TABLE t2 ( + col0 INTEGER NOT NULL, + col1 POINT, + col2 POINT +); + +--error ER_WRONG_ARGUMENTS +CREATE SPATIAL INDEX idx0 ON t2 (col1, col2); + +--error ER_WRONG_ARGUMENTS +CREATE TABLE t3 ( + col0 INTEGER NOT NULL, + col1 POINT, + col2 LINESTRING, + SPATIAL INDEX i1 (col1, col2) +); + +# cleanup +DROP TABLE t1; +DROP TABLE t2; + |