diff options
author | bell@sanja.is.com.ua <> | 2004-07-16 01:15:55 +0300 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2004-07-16 01:15:55 +0300 |
commit | 9336d36cf81f404088844fc31918887799d3da03 (patch) | |
tree | 7a8e815ca26d9138de3bc77a619aa8103e037911 /sql/item_subselect.cc | |
parent | 2fd11169ab10b8d752afbcc2dd58a15cf4de9c45 (diff) | |
download | mariadb-git-9336d36cf81f404088844fc31918887799d3da03.tar.gz |
VIEW
two TABLE_LIST copy eliminated
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 91a31502780..33e661ce46e 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -990,6 +990,23 @@ Item_in_subselect::select_transformer(JOIN *join) } +Item_subselect::trans_res +Item_in_subselect::no_select_transform() +{ + DBUG_ENTER("Item_in_subselect::no_select_transform"); + // We have execute fix_fields() for left expression + SELECT_LEX *current= thd->lex->current_select, *up; + thd->lex->current_select= up= current->return_after_parsing(); + if (left_expr->fix_fields(thd, up->get_table_list(), &left_expr)) + { + thd->lex->current_select= current; + DBUG_RETURN(RES_ERROR); + } + thd->lex->current_select= current; + DBUG_RETURN(RES_OK); +} + + void Item_in_subselect::print(String *str) { if (transformed) @@ -1383,7 +1400,7 @@ void subselect_uniquesubquery_engine::exclude() table_map subselect_engine::calc_const_tables(TABLE_LIST *table) { table_map map= 0; - for (; table; table= table->next) + for(; table; table= table->next_local) { TABLE *tbl= table->table; if (tbl && tbl->const_table) |