Commit c4108ce3 authored by Magne Mahre's avatar Magne Mahre

Merge from mysql-5.1-security

parents 21095485 27166fc6
...@@ -1035,6 +1035,10 @@ NULL ...@@ -1035,6 +1035,10 @@ NULL
NULL NULL
drop table t1; drop table t1;
End of 5.1 tests 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( CREATE TABLE t1(
col0 BINARY NOT NULL, col0 BINARY NOT NULL,
col2 TIMESTAMP, col2 TIMESTAMP,
...@@ -1063,5 +1067,4 @@ col2 LINESTRING, ...@@ -1063,5 +1067,4 @@ col2 LINESTRING,
SPATIAL INDEX i1 (col1, col2) SPATIAL INDEX i1 (col1, col2)
); );
ERROR HY000: Incorrect arguments to SPATIAL INDEX ERROR HY000: Incorrect arguments to SPATIAL INDEX
DROP TABLE t1; DROP TABLE t0, t1, t2;
DROP TABLE t2;
...@@ -762,7 +762,14 @@ drop table t1; ...@@ -762,7 +762,14 @@ drop table t1;
# #
# Bug #50574 5.5.x allows spatial indexes on non-spatial # Bug #50574 5.5.x allows spatial indexes on non-spatial
# columns, causing crashes! # 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 --error ER_SPATIAL_MUST_HAVE_GEOM_COL
CREATE TABLE t1( CREATE TABLE t1(
col0 BINARY NOT NULL, col0 BINARY NOT NULL,
...@@ -800,6 +807,5 @@ CREATE TABLE t3 ( ...@@ -800,6 +807,5 @@ CREATE TABLE t3 (
); );
# cleanup # cleanup
DROP TABLE t1; DROP TABLE t0, t1, t2;
DROP TABLE t2;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment