From ca29490102f02527a9b36b1300c8483dc98062dc Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Thu, 21 Feb 2013 01:03:45 +0400 Subject: MDEV-3819 missing constraints for spatial column types. Checks added to return and error when inappropriate geometry type is stored in a field. --- mysql-test/t/gis.test | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mysql-test/t/gis.test') diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index b0ad8329cfb..188cba004df 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -741,7 +741,7 @@ SET @a=POLYFROMWKB(@a); # Bug #57321 crashes and valgrind errors from spatial types # -create table t1(a polygon NOT NULL)engine=myisam; +create table t1(a geometry NOT NULL)engine=myisam; insert into t1 values (geomfromtext("point(0 1)")); insert into t1 values (geomfromtext("point(1 0)")); select * from (select polygon(t1.a) as p from t1 order by t1.a) d; @@ -1358,4 +1358,13 @@ SELECT 1 FROM g1 WHERE a >= ANY DROP TABLE g1; +--echo # +--echo # MDEV-3819 missing constraints for spatial column types +--echo # + +create table t1 (pt point); +--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD +insert into t1 values(Geomfromtext('POLYGON((1 1, 2 2, 2 1, 1 1))')); +drop table t1; + --echo End of 5.5 tests -- cgit v1.2.1