From af46c25760bdc698cf219258f6c42316ed01b924 Mon Sep 17 00:00:00 2001 From: Galina Shalygina Date: Wed, 1 Aug 2018 14:42:47 +0300 Subject: MDEV-16727: Server crashes in Item_equal_iterator::get_curr_field() The bug appeares because of the lamely saved list of multiple equalities. To fix it and_new_conditions_to_optimized_cond() was changed. --- sql/opt_subselect.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/opt_subselect.cc') diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 1b3e2973133..06358b3cc20 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -5624,7 +5624,7 @@ Item *and_new_conditions_to_optimized_cond(THD *thd, Item *cond, if (equality->fix_fields(thd, NULL)) return NULL; } - *cond_eq= &new_cond_equal; + (*cond_eq)->copy(new_cond_equal); } new_conds_list.append((List *)&new_cond_equal.current_level); } -- cgit v1.2.1