Commit 1f23508e authored by Sergey Petrunya's avatar Sergey Petrunya

Fix Item_subselect::update_used_tables() and fix_after_pullout() to work with

prepared statements: re-collect list of upper refs on every PS re-execution.
parent d8a5ab59
...@@ -167,6 +167,11 @@ bool Item_subselect::fix_fields(THD *thd_param, Item **ref) ...@@ -167,6 +167,11 @@ bool Item_subselect::fix_fields(THD *thd_param, Item **ref)
{ {
done_first_fix_fields= TRUE; done_first_fix_fields= TRUE;
inside_first_fix_fields= TRUE; inside_first_fix_fields= TRUE;
upper_refs.empty();
/*
psergey-todo: remove _first_fix_fields calls, we need changes on every
execution
*/
} }
eliminated= FALSE; eliminated= FALSE;
...@@ -181,6 +186,8 @@ bool Item_subselect::fix_fields(THD *thd_param, Item **ref) ...@@ -181,6 +186,8 @@ bool Item_subselect::fix_fields(THD *thd_param, Item **ref)
changed= 1; changed= 1;
inside_first_fix_fields= FALSE; inside_first_fix_fields= FALSE;
done_first_fix_fields= FALSE;
if (!res) if (!res)
{ {
// all transformation is done (used by prepared statements) // all transformation is done (used by prepared statements)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment