summaryrefslogtreecommitdiff
path: root/mysql-test/t/gis.test
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz[kgeorge]>2007-03-26 13:17:40 +0300
committerunknown <gkodinov/kgeorge@magare.gmz[kgeorge]>2007-03-26 13:17:40 +0300
commit3335f68d8902fdbbebb2c41d09253a4cafe675bb (patch)
tree08da49132f3c350c9a4235951b7913751c075156 /mysql-test/t/gis.test
parent55f991c24d584d57d21fd780f0e51fceb5e2321a (diff)
downloadmariadb-git-3335f68d8902fdbbebb2c41d09253a4cafe675bb.tar.gz
Bug #27164: not reseting the data pointer
to 0 causes wrong (large) length to be read from the row in _mi_calc_blob_length() when storing NULL values in (e.g) POINT columns. This large length is then used to allocate a block of memory that (on some OSes) causes trouble. Fixed by calling the base class's Field_blob::reset() from Field_geom::reset() that is called when storing a NULL value into the column. mysql-test/r/gis.result: Bug #27164: test case mysql-test/t/gis.test: Bug #27164: test case sql/field.h: Bug #27164: not reseting the data pointer to 0 causes wrong (large) length to be read from the row in _mi_calc_blob_length() when storing NULL values in (e.g) POINT columns. This large length is then used to allocate a block of memory that (on some OSes) causes trouble.
Diffstat (limited to 'mysql-test/t/gis.test')
-rw-r--r--mysql-test/t/gis.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index 6bd0db92152..7182e040d46 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -411,4 +411,12 @@ from t1;
drop table t1;
+#
+# Bug #27164: Crash when mixing InnoDB and MyISAM Geospatial tables
+#
+CREATE TABLE t1(a POINT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (NULL);
+SELECT * FROM t1;
+DROP TABLE t1;
+
--echo End of 4.1 tests