Skip to content

Commit

Permalink
MDEV-16708: Unsupported commands for prepared statements
Browse files Browse the repository at this point in the history
Fixed the bug in handling queries where select list contains subqueries
with items referencing to items in outer query
  • Loading branch information
dmitryshulga authored and vuvova committed Jun 17, 2021
1 parent 4decc03 commit 129098b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sql/item.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5531,7 +5531,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
*/
Name_resolution_context *last_checked_context= context;
Item **ref= (Item **) not_found_item;
SELECT_LEX *current_sel= thd->lex->current_select;
SELECT_LEX *current_sel= context->select_lex;
Name_resolution_context *outer_context= 0;
SELECT_LEX *select= 0;

Expand Down Expand Up @@ -5868,7 +5868,7 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
DBUG_ASSERT(fixed() == 0);
Field *from_field= (Field *)not_found_field;
bool outer_fixed= false;
SELECT_LEX *select= thd->lex->current_select;
SELECT_LEX *select= context->select_lex;

if (select && select->in_tvc)
{
Expand Down

0 comments on commit 129098b

Please sign in to comment.