From 235b68299bc112f9cb7be97af8d01bf904919a6b Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Sat, 18 Feb 2017 17:47:31 +0100 Subject: MDEV-9619: Assertion `null_ref_table' failed in virtual table_map Item_direct_view_ref::used_tables() const on 2nd execution of PS Refer left expression indirectly in case it changes from execution to execution. --- sql/item_subselect.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sql/item_subselect.cc') diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index ef90dd59be3..90f2bd5b9eb 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1374,6 +1374,9 @@ Item_in_subselect::Item_in_subselect(Item * left_exp, { DBUG_ENTER("Item_in_subselect::Item_in_subselect"); left_expr_orig= left_expr= left_exp; + /* prepare to possible disassembling the item in convert_subq_to_sj() */ + if (left_exp->type() == Item::ROW_ITEM) + left_expr_orig= new Item_row(left_exp); func= &eq_creator; init(select_lex, new select_exists_subselect(this)); max_columns= UINT_MAX; @@ -1398,6 +1401,9 @@ Item_allany_subselect::Item_allany_subselect(Item * left_exp, { DBUG_ENTER("Item_allany_subselect::Item_allany_subselect"); left_expr_orig= left_expr= left_exp; + /* prepare to possible disassembling the item in convert_subq_to_sj() */ + if (left_exp->type() == Item::ROW_ITEM) + left_expr_orig= new Item_row(left_exp); func= func_creator(all_arg); init(select_lex, new select_exists_subselect(this)); max_columns= 1; -- cgit v1.2.1