diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/item.cc b/sql/item.cc index 51fb2fe34fd..1850b7d05c3 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -5082,14 +5082,16 @@ bool Item_insert_value::fix_fields(THD *thd, Item **items) { DBUG_ASSERT(fixed == 0); /* We should only check that arg is in first table */ - st_table_list *orig_next_table= context->last_name_resolution_table; - context->last_name_resolution_table= context->first_name_resolution_table; - if (!arg->fixed && arg->fix_fields(thd, &arg)) + if (!arg->fixed) { + bool res; + st_table_list *orig_next_table= context->last_name_resolution_table; + context->last_name_resolution_table= context->first_name_resolution_table; + res= arg->fix_fields(thd, &arg); context->last_name_resolution_table= orig_next_table; - return TRUE; + if (res) + return TRUE; } - context->last_name_resolution_table= orig_next_table; if (arg->type() == REF_ITEM) { |