summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorGalina Shalygina <galina.shalygina@mariadb.com>2018-08-01 14:42:47 +0300
committerGalina Shalygina <galina.shalygina@mariadb.com>2018-08-01 14:42:47 +0300
commitaf46c25760bdc698cf219258f6c42316ed01b924 (patch)
treed37ebea2deac07acbc24619a0c46f72698b1fdd2 /sql/opt_subselect.cc
parentb1ae4e7e154b9b1ffb87918a8646173e1f8063fe (diff)
downloadmariadb-git-af46c25760bdc698cf219258f6c42316ed01b924.tar.gz
MDEV-16727: Server crashes in Item_equal_iterator<List_iterator_fast, Item>::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.
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r--sql/opt_subselect.cc2
1 files changed, 1 insertions, 1 deletions
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<Item> *)&new_cond_equal.current_level);
}