summaryrefslogtreecommitdiff
path: root/mysql-test/t/gis2.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-10-30 20:47:39 +0400
committerAlexander Barkov <bar@mariadb.org>2017-10-30 20:47:39 +0400
commit835cbbcc7b797188a89671019f2b2844e1a14e0c (patch)
tree010dd112f16b88bb655c32abb6b93987fe5c6c99 /mysql-test/t/gis2.test
parentfe8cf8fdf1c4c0a9ec60690a8d2738fd255c8dd5 (diff)
parent003cb2f42477772ae43228c0bc0f8492246b9340 (diff)
downloadmariadb-git-835cbbcc7b797188a89671019f2b2844e1a14e0c.tar.gz
Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3
TODO: enable MDEV-13049 optimization for 10.3
Diffstat (limited to 'mysql-test/t/gis2.test')
-rw-r--r--mysql-test/t/gis2.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/t/gis2.test b/mysql-test/t/gis2.test
index b734ab19ecd..9731e2a91d0 100644
--- a/mysql-test/t/gis2.test
+++ b/mysql-test/t/gis2.test
@@ -15,3 +15,31 @@ SELECT id FROM t1
WHERE ST_Contains(point_data, GeomFromText('Point(38.0248492 23.8512726)'));
DROP TABLE t1;
+#
+# MDEV-13923 Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed upon altering table with geometry field
+#
+--error ER_CANT_CREATE_GEOMETRY_OBJECT
+create table t1 (p point default "qwer");
+--error ER_CANT_CREATE_GEOMETRY_OBJECT
+create table t1 (p point default 0);
+--error ER_INVALID_DEFAULT
+create table t1 (p point not null default st_geometryfromtext('point 0)'));
+create table t1 (p point not null default st_geometryfromtext('point(0 0)'));
+insert into t1 values(default);
+select st_astext(p) from t1;
+drop table t1;
+
+create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1))));
+set timestamp=10;
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
+insert into t1 values(default);
+drop table t1;
+SET timestamp=default;
+
+create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1))));
+set timestamp=10;
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
+alter table t1 add column i int;
+drop table t1;
+SET timestamp=default;
+