diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2013-02-21 01:03:45 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2013-02-21 01:03:45 +0400 |
commit | ca29490102f02527a9b36b1300c8483dc98062dc (patch) | |
tree | 7d7c201fc1d0eb86e37021b1d05c3be17877a4c3 /mysql-test/t/gis.test | |
parent | 2c37ace13164b0a261fd850a0d11f5af539e657a (diff) | |
download | mariadb-git-ca29490102f02527a9b36b1300c8483dc98062dc.tar.gz |
MDEV-3819 missing constraints for spatial column types.
Checks added to return and error when inappropriate
geometry type is stored in a field.
Diffstat (limited to 'mysql-test/t/gis.test')
-rw-r--r-- | mysql-test/t/gis.test | 11 |
1 files changed, 10 insertions, 1 deletions
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 |