summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 29138f10989..7430029a5e5 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -600,6 +600,7 @@ multi_update::initialize_tables(JOIN *join)
{
TABLE *table=table_ref->table;
uint cnt= table_ref->shared;
+ Item_field *If;
List<Item> temp_fields= *fields_for_table[cnt];
ORDER group;
@@ -623,7 +624,10 @@ multi_update::initialize_tables(JOIN *join)
/* ok to be on stack as this is not referenced outside of this func */
Field_string offset(table->file->ref_length, 0, "offset",
table, &my_charset_bin);
- if (temp_fields.push_front(new Item_field(((Field *) &offset))))
+ if (!(If=new Item_field(((Field *) &offset))))
+ DBUG_RETURN(1);
+ If->maybe_null=0;
+ if (temp_fields.push_front(If))
DBUG_RETURN(1);
/* Make an unique key over the first field to avoid duplicated updates */