diff options
Diffstat (limited to 'sql/item_row.cc')
-rw-r--r-- | sql/item_row.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sql/item_row.cc b/sql/item_row.cc index 4040dbff7c6..e2f62bfc868 100644 --- a/sql/item_row.cc +++ b/sql/item_row.cc @@ -88,12 +88,29 @@ bool Item_row::fix_fields(THD *thd, Item **ref) } maybe_null|= item->maybe_null; with_sum_func= with_sum_func || item->with_sum_func; + with_field= with_field || item->with_field; } fixed= 1; return FALSE; } +bool +Item_row::eval_not_null_tables(uchar *opt_arg) +{ + Item **arg,**arg_end; + not_null_tables_cache= 0; + if (arg_count) + { + for (arg= items, arg_end= items+arg_count; arg != arg_end ; arg++) + { + not_null_tables_cache|= (*arg)->not_null_tables(); + } + } + return FALSE; +} + + void Item_row::cleanup() { DBUG_ENTER("Item_row::cleanup"); @@ -129,6 +146,22 @@ void Item_row::update_used_tables() } } + +void Item_row::fix_after_pullout(st_select_lex *new_parent, Item **ref) +{ + used_tables_cache= 0; + const_item_cache= 1; + not_null_tables_cache= 0; + for (uint i= 0; i < arg_count; i++) + { + items[i]->fix_after_pullout(new_parent, &items[i]); + used_tables_cache|= items[i]->used_tables(); + const_item_cache&= items[i]->const_item(); + not_null_tables_cache|= items[i]->not_null_tables(); + } +} + + bool Item_row::check_cols(uint c) { if (c != arg_count) |