1
0
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:
unknown
2005-04-29 02:43:56 +03:00
parent fab23b39de
commit ca119d390e
4 changed files with 84 additions and 1 deletions

View File

@ -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;
}
}