diff options
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sql/field.cc b/sql/field.cc index 2b1ba0e1372..fd4cd8d5c54 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -2436,14 +2436,14 @@ Field *Field::clone(MEM_ROOT *root, TABLE *new_table) } - Field *Field::clone(MEM_ROOT *root, TABLE *new_table, my_ptrdiff_t diff, bool stat_flag) { Field *tmp; if ((tmp= (Field*) memdup_root(root,(char*) this,size_of()))) { - tmp->init(new_table); + if (new_table) + tmp->init(new_table); tmp->move_field_offset(diff); } tmp->is_stat_field= stat_flag; @@ -2451,16 +2451,6 @@ Field *Field::clone(MEM_ROOT *root, TABLE *new_table, my_ptrdiff_t diff, } -Field *Field::clone(MEM_ROOT *root, my_ptrdiff_t diff) -{ - Field *tmp; - if ((tmp= (Field*) memdup_root(root,(char*) this,size_of()))) - { - tmp->move_field_offset(diff); - } - return tmp; -} - int Field::set_default() { if (default_value) |