From b83cb52e9e78a0d07c05f6515aa7811deabe434c Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Sun, 17 Jan 2010 17:51:10 +0300 Subject: Backport of subquery optimizations to 5.3. There are still test failures because of: - Wrong query results in outer join + semi join - EXPLAIN output differences --- sql/item_row.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sql/item_row.cc') diff --git a/sql/item_row.cc b/sql/item_row.cc index 28de03bf049..97bbde2c562 100644 --- a/sql/item_row.cc +++ b/sql/item_row.cc @@ -124,6 +124,20 @@ 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; + 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(); + } +} + + bool Item_row::check_cols(uint c) { if (c != arg_count) -- cgit v1.2.1