List:Commits« Previous MessageNext Message »
From:kgeorge Date:March 23 2007 3:25pm
Subject:bk commit into 5.0 tree (gkodinov:1.2417) BUG#27164
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 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-23 16:25:55+02:00, gkodinov@stripped +3 -0
  Bug #27164: not reseting the data pointer
  to 0 causes wrong (large) length to be read from the
  row when storing NULL values to POINT columns.
  This large length is then used to allocate a block of
  memory that (on some OSes) causes the trouble.
  Fixed by calling the base class reset() method from
  Field_geom::reset() that is called when storing a NULL 
  value into the column. 

  mysql-test/r/gis.result@stripped, 2007-03-23 16:25:53+02:00, gkodinov@stripped +6 -0
    Bug #27164: test case

  mysql-test/t/gis.test@stripped, 2007-03-23 16:25:53+02:00, gkodinov@stripped +7 -0
    Bug #27164: test case

  sql/field.h@stripped, 2007-03-23 16:25:53+02:00, gkodinov@stripped +1 -1
    Bug #27164: not reseting the data pointer
    to 0 causes wrong (large) length to be read from the
    row when storing NULL values to POINT columns.
    This large length is then used to allocate a block of
    memory that (on some OSes) causes the 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-5.0-opt

--- 1.198/sql/field.h	2007-03-22 11:58:11 +02:00
+++ 1.199/sql/field.h	2007-03-23 16:25:53 +02:00
@@ -1284,7 +1284,7 @@ public:
   int  store_decimal(const my_decimal *);
   void get_key_image(char *buff,uint length,imagetype type);
   uint size_of() const { return sizeof(*this); }
-  int  reset(void) { return !maybe_null(); }
+  int  reset(void) { return Field_blob::reset() || !maybe_null(); }
 };
 #endif /*HAVE_SPATIAL*/
 

--- 1.41/mysql-test/r/gis.result	2007-03-02 13:09:43 +02:00
+++ 1.42/mysql-test/r/gis.result	2007-03-23 16:25:53 +02:00
@@ -763,3 +763,9 @@ create table t1 (g geometry not null);
 insert into t1 values(default);
 ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
 drop table t1;
+CREATE TABLE t1(a POINT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (NULL);
+SELECT * FROM t1;
+a
+NULL
+DROP TABLE t1;

--- 1.34/mysql-test/t/gis.test	2007-03-02 13:09:43 +02:00
+++ 1.35/mysql-test/t/gis.test	2007-03-23 16:25:53 +02:00
@@ -471,3 +471,10 @@ create table t1 (g geometry not null);
 insert into t1 values(default);
 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;
Thread
bk commit into 5.0 tree (gkodinov:1.2417) BUG#27164kgeorge23 Mar