summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index d373b017db7..27c7b2ce88d 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -1752,6 +1752,15 @@ Item_in_subselect::single_value_transformer(JOIN *join)
*/
where_item->walk(&Item::remove_dependence_processor, 0,
(uchar *) select_lex->outer_select());
+ /*
+ fix_field of substitution item will be done in time of
+ substituting.
+ Note that real_item() should be used instead of
+ original left expression because left_expr can be
+ runtime created Ref item which is deleted at the end
+ of the statement. Thus one of 'substitution' arguments
+ can be broken in case of PS.
+ */
substitution= func->create(left_expr, where_item);
have_to_be_excluded= 1;
if (thd->lex->describe)