diff options
author | unknown <bell@sanja.is.com.ua> | 2005-04-29 02:43:56 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-04-29 02:43:56 +0300 |
commit | ca119d390e1fd739419e5c5ab8122c21f3065a8a (patch) | |
tree | c31f792cfef5864ca0703e3b371b27e7af80ef69 /sql/sql_base.cc | |
parent | fab23b39de8c6bcb00fcb4272e9ecf3f69f35b30 (diff) | |
download | mariadb-git-ca119d390e1fd739419e5c5ab8122c21f3065a8a.tar.gz |
if outer refernce (identifier) was resolved with help of cache all subqueries and resolved item itseld have to be correctly marked as dependent
(BUG#10041)
sql/item.cc:
depended_from shoudl be cleaned
layout fixed
function to mark range of SELECTs as dependent (used if item was resolved with PS cache of resolving identifiers)
sql/item.h:
function to mark range of SELECTs as dependent (used if item was resolved with PS cache of resolving identifiers)
sql/item_subselect.h:
function to mark range of SELECTs as dependent (used if item was resolved with PS cache of resolving identifiers)
sql/sql_base.cc:
if outer refernce (identifier) was resolved with help of cache all subqueries and resolved item itseld have to be correctly marked as dependent
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index d79811aa4e2..35f4f963238 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2689,6 +2689,14 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables, { if (found == WRONG_GRANT) return (Field*) 0; + { + SELECT_LEX *current_sel= thd->lex->current_select; + SELECT_LEX *last_select= item->cached_table->select_lex; + /* check that field was resolved in outer query */ + if (current_sel != last_select) + mark_select_range_as_dependent(thd, current_sel, last_select, + found, *ref, item); + } return found; } } |