summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <ingo@production.mysql.com>2005-11-08 20:18:08 +0100
committerunknown <ingo@production.mysql.com>2005-11-08 20:18:08 +0100
commita94df68628e98ebd4ac564414fc631c7afa6c495 (patch)
tree51df0c1a01ba3dc23b7f1f4fea7052d3bcd5c8b0 /sql
parent2474fcc1c7420a321bae9660fb9e9c7c8c0e9733 (diff)
parent9725d32b5193f7d47eac67abd5aafd38d9a1b8fa (diff)
downloadmariadb-git-a94df68628e98ebd4ac564414fc631c7afa6c495.tar.gz
Merge istruewing@bk-internal.mysql.com:/home/bk/mysql-5.0
into production.mysql.com:/usersnfs/istruewing/autopush/mysql-5.0 sql/field.cc: Auto merged
Diffstat (limited to 'sql')
-rw-r--r--sql/field.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 18ef77230f2..381a13c3263 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -6202,9 +6202,16 @@ Field *Field_string::new_field(MEM_ROOT *root, struct st_table *new_table)
This is done to ensure that ALTER TABLE will convert old VARCHAR fields
to now VARCHAR fields.
*/
- return new Field_varstring(field_length, maybe_null(),
- field_name, new_table,
- charset());
+ 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;
+ return new_field;
}
/****************************************************************************