diff options
author | unknown <bell@sanja.is.com.ua> | 2003-01-26 21:13:37 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-01-26 21:13:37 +0200 |
commit | fb2226c37656e8e7fd531e2cc42c0a1a0f75e41a (patch) | |
tree | 14609b76d159c44df4688f35e7c3e6b927d50da7 /sql/item_cmpfunc.cc | |
parent | 3fe840ee07992340b5b7977ec66483e6f837ba1b (diff) | |
download | mariadb-git-fb2226c37656e8e7fd531e2cc42c0a1a0f75e41a.tar.gz |
removed switching off static table optimization for subselects (SCRUM , pre-commit to be able merge with temporary table fix)
sql/item.cc:
report other table for outer reference
sql/item.h:
report other table for outer reference
sql/item_cmpfunc.cc:
report other table for outer reference
sql/sql_select.cc:
removed switching off static table optimization for subselects
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 94423642fa5..f37509f89b5 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -290,6 +290,14 @@ bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables, if (!cache && !(cache= Item_cache::get_cache(args[0]->result_type()))) return 1; cache->setup(args[0]); + if (cache->cols() == 1) + cache->set_used_tables(RAND_TABLE_BIT); + else + { + uint n= cache->cols(); + for (uint i= 0; i < n; i++) + ((Item_cache *)cache->el(i))->set_used_tables(RAND_TABLE_BIT); + } if (args[1]->fix_fields(thd, tables, args)) return 1; Item_in_subselect * sub= (Item_in_subselect *)args[1]; |