diff options
Diffstat (limited to 'sql/item_row.cc')
-rw-r--r-- | sql/item_row.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item_row.cc b/sql/item_row.cc index 2c4a628075e..ee7bd837553 100644 --- a/sql/item_row.cc +++ b/sql/item_row.cc @@ -74,7 +74,8 @@ bool Item_row::fix_fields(THD *thd, Item **ref) Item **arg, **arg_end; for (arg= items, arg_end= items+arg_count; arg != arg_end ; arg++) { - if ((*arg)->fix_fields(thd, arg)) + if (!(*arg)->fixed && + (*arg)->fix_fields(thd, arg)) return TRUE; // we can't assign 'item' before, because fix_fields() can change arg Item *item= *arg; @@ -145,11 +146,13 @@ void Item_row::update_used_tables() { used_tables_cache= 0; const_item_cache= 1; + maybe_null= 0; for (uint i= 0; i < arg_count; i++) { items[i]->update_used_tables(); used_tables_cache|= items[i]->used_tables(); const_item_cache&= items[i]->const_item(); + maybe_null|= items[i]->maybe_null; } } |