Below is the list of changes that have just been committed into a local
4.1 repository of kgeorge. When kgeorge does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-03-26 13:17:40+03:00, gkodinov@stripped +3 -0
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@stripped, 2007-03-26 13:17:39+03:00, gkodinov@stripped +6 -0
Bug #27164: test case
mysql-test/t/gis.test@stripped, 2007-03-26 13:17:39+03:00, gkodinov@stripped +8 -0
Bug #27164: test case
sql/field.h@stripped, 2007-03-26 13:17:39+03:00, gkodinov@stripped +1 -1
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.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: gkodinov
# Host: magare.gmz
# Root: /home/kgeorge/mysql/work/B27164-4.1-opt
--- 1.136/sql/field.h 2007-02-01 17:56:12 +02:00
+++ 1.137/sql/field.h 2007-03-26 13:17:39 +03:00
@@ -1115,7 +1115,7 @@ public:
int store(const char *to, uint length, CHARSET_INFO *charset);
int store(double nr) { return 1; }
int store(longlong nr) { return 1; }
- int reset(void) { return !maybe_null(); }
+ int reset(void) { return !maybe_null() || Field_blob::reset(); }
void get_key_image(char *buff,uint length, CHARSET_INFO *cs,imagetype type);
void set_key_image(char *buff,uint length, CHARSET_INFO *cs);
--- 1.24/mysql-test/r/gis.result 2007-02-21 12:45:18 +02:00
+++ 1.25/mysql-test/r/gis.result 2007-03-26 13:17:39 +03:00
@@ -718,4 +718,10 @@ point(b, b) IS NULL linestring(b) IS NUL
1 1 1 1 1 1 1
0 1 1 1 1 1 1
drop table t1;
+CREATE TABLE t1(a POINT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (NULL);
+SELECT * FROM t1;
+a
+NULL
+DROP TABLE t1;
End of 4.1 tests
--- 1.22/mysql-test/t/gis.test 2007-02-21 12:45:18 +02:00
+++ 1.23/mysql-test/t/gis.test 2007-03-26 13:17:39 +03:00
@@ -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
| Thread |
|---|
| • bk commit into 4.1 tree (gkodinov:1.2625) BUG#27164 | kgeorge | 26 Mar |