From: Date: November 14 2005 7:53pm Subject: bk commit into 5.0 tree (ingo:1.1974) BUG#13707 List-Archive: http://lists.mysql.com/internals/32251 X-Bug: 13707 Message-Id: Below is the list of changes that have just been committed into a local 5.0 repository of mydev. When mydev 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 1.1974 05/11/14 19:53:41 ingo@stripped +1 -0 Bug#13707 - Server crash with INSERT DELAYED on MyISAM table After push fix. Must not access new_field if it is NULL. sql/field.cc 1.291 05/11/14 19:53:36 ingo@stripped +12 -9 Bug#13707 - Server crash with INSERT DELAYED on MyISAM table After push fix. Must not access new_field if it is NULL. # 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: ingo # Host: chilla.local # Root: /home/mydev/mysql-5.0-bug13707 --- 1.290/sql/field.cc 2005-11-08 20:18:05 +01:00 +++ 1.291/sql/field.cc 2005-11-14 19:53:36 +01:00 @@ -6194,6 +6194,8 @@ Field *Field_string::new_field(MEM_ROOT *root, struct st_table *new_table) { + Field *new_field; + if (type() != MYSQL_TYPE_VAR_STRING || table == new_table) return Field::new_field(root, new_table); @@ -6202,15 +6204,16 @@ This is done to ensure that ALTER TABLE will convert old VARCHAR fields to now VARCHAR fields. */ - Field *new_field= new Field_varstring(field_length, maybe_null(), - field_name, new_table, - charset()); - /* - delayed_insert::get_local_table() needs a ptr copied from old table. - This is what other new_field() methods do too. The above method of - Field_varstring sets ptr to NULL. - */ - new_field->ptr= ptr; + if (new_field= new Field_varstring(field_length, maybe_null(), + field_name, new_table, charset())) + { + /* + delayed_insert::get_local_table() needs a ptr copied from old table. + This is what other new_field() methods do too. The above method of + Field_varstring sets ptr to NULL. + */ + new_field->ptr= ptr; + } return new_field; }