mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user