summaryrefslogtreecommitdiff
path: root/mysql-test/t/gis.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/gis.test')
-rw-r--r--mysql-test/t/gis.test112
1 files changed, 50 insertions, 62 deletions
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index cdbc253869e..b0ad8329cfb 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -759,68 +759,6 @@ create spatial index i on t1 (a);
drop table t1;
-#
-# Bug#11767480 - SPATIAL INDEXES ON NON-SPATIAL COLUMNS CAUSE CRASHES.
-#
-CREATE TABLE t0 (a BINARY(32) NOT NULL);
---error ER_WRONG_ARGUMENTS
-CREATE SPATIAL INDEX i on t0 (a);
-INSERT INTO t0 VALUES (1);
-
---error ER_WRONG_ARGUMENTS
-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_WRONG_ARGUMENTS
-CREATE SPATIAL INDEX idx0 ON t1(col0);
-
---error ER_WRONG_ARGUMENTS
-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 t0, t1, t2;
-
-
---echo #
---echo # BUG#12414917 - ISCLOSED() CRASHES ON 64-BIT BUILDS
---echo #
-SELECT ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)));
-
---echo #
---echo # BUG#12537203 - CRASH WHEN SUBSELECTING GLOBAL VARIABLES IN
---echo # GEOMETRY FUNCTION ARGUMENTS
---echo #
---replace_regex /non geometric .* value/non geometric '' value/
---error ER_ILLEGAL_VALUE_FOR_TYPE
-SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
-
-
--echo End of 5.1 tests
#bug 850775 ST_AREA does not work on GEOMETRYCOLLECTIONs in maria-5.3-gis
@@ -1370,4 +1308,54 @@ select st_distance(geomfromtext('point(-95.96269500000000000000 36.1418183333333
-95.9673057475387 36.1344478941074,
-95.9673063519371 36.134484524621,
-95.9673049102515 36.1343976584193) ')) ;
+USE test;
+
+
+--echo #
+--echo # BUG#12414917 - ISCLOSED() CRASHES ON 64-BIT BUILDS
+--echo #
+SELECT ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)));
+
+--echo #
+--echo # BUG#12537203 - CRASH WHEN SUBSELECTING GLOBAL VARIABLES IN
+--echo # GEOMETRY FUNCTION ARGUMENTS
+--echo #
+--replace_regex /non geometric .* value/non geometric '' value/
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
+
+
+--echo End of 5.1 tests
+
+
+--echo #
+--echo # Bug#11908153: CRASH AND/OR VALGRIND ERRORS IN FIELD_BLOB::GET_KEY_IMAGE
+--echo #
+
+CREATE TABLE g1
+(a geometry NOT NULL, UNIQUE KEY i (a(151))) engine=myisam;
+
+INSERT INTO g1 VALUES (geomfromtext('point(1 1)'));
+INSERT INTO g1 VALUES (geomfromtext('point(1 2)'));
+
+FLUSH TABLES;
+
+SELECT 1 FROM g1
+FORCE INDEX(i) WHERE a = date_sub(now(), interval 2808.4 year_month)
+;
+
+DROP TABLE g1;
+
+--echo #
+--echo # Bug#13013970 MORE CRASHES IN FIELD_BLOB::GET_KEY_IMAGE
+--echo #
+
+CREATE TABLE g1(a TEXT NOT NULL, KEY(a(255)));
+
+INSERT INTO g1 VALUES ('a'),('a');
+SELECT 1 FROM g1 WHERE a >= ANY
+(SELECT 1 FROM g1 WHERE a = geomfromtext('') OR a) ;
+
+DROP TABLE g1;
+--echo End of 5.5 tests