summaryrefslogtreecommitdiff
path: root/mysql-test/t/gis.test
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-11-13 10:51:47 +0400
committerunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-11-13 10:51:47 +0400
commiteb347921b736c06651189623b1dcd92a6d6d1039 (patch)
tree7e2b4e01a21459d9a666cbdd1b2b399281a96c25 /mysql-test/t/gis.test
parent31634a38e8639e487e75150567687c2982cbef58 (diff)
downloadmariadb-git-eb347921b736c06651189623b1dcd92a6d6d1039.tar.gz
Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data)
max_length parameter for BLOB-returning functions must be big enough for any possible content. Otherwise the field created for a table will be too small. mysql-test/r/gis.result: Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data) test result mysql-test/t/gis.test: Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data) test case sql/field.cc: Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data) max_field_size used instead of numeric value sql/field.h: Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data) max_field_size constant defined sql/item_geofunc.cc: Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data) max_length parameter fixed
Diffstat (limited to 'mysql-test/t/gis.test')
-rw-r--r--mysql-test/t/gis.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index cf5c3b31bc1..3b9514bebbd 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -427,4 +427,35 @@ INSERT INTO `t1` VALUES ('','0000-00-00');
select geomfromtext(col9,col89) as a from t1;
DROP TABLE t1;
+#
+# Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data)
+#
+
+CREATE TABLE t1 (
+ geomdata polygon NOT NULL,
+ SPATIAL KEY index_geom (geomdata)
+) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED;
+
+CREATE TABLE t2 (
+ geomdata polygon NOT NULL,
+ SPATIAL KEY index_geom (geomdata)
+) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED;
+
+CREATE TABLE t3
+select
+ aswkb(ws.geomdata) AS geomdatawkb
+ from
+ t1 ws
+union
+ select
+ aswkb(ws.geomdata) AS geomdatawkb
+ from
+ t2 ws;
+
+describe t3;
+
+drop table t1;
+drop table t2;
+drop table t3;
+
--echo End of 4.1 tests