summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-10-28 17:06:00 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2022-10-29 18:49:01 +0200
commit64143741789a3e1c2bb8c6bf627eaec3751af0c6 (patch)
treed84ad52af7a52f7d84a12150c53d152ce1d86525
parenta472237d42114d867cb08963ab6d0af834b62ef9 (diff)
downloadmariadb-git-64143741789a3e1c2bb8c6bf627eaec3751af0c6.tar.gz
followup: fix ASAN failure of main.having_cond_pushdown --ps
also call top_level_transform() recursively for (a OR b) AND (c OR d)
-rw-r--r--sql/item_cmpfunc.cc2
-rw-r--r--sql/sql_lex.cc5
2 files changed, 3 insertions, 4 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index b08d3a799f9..74d63629fe9 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -5246,7 +5246,7 @@ Item *Item_cond::top_level_transform(THD *thd, Item_transformer transformer, uch
Item *item;
while ((item= li++))
{
- Item *new_item= item->transform(thd, transformer, arg);
+ Item *new_item= item->top_level_transform(thd, transformer, arg);
if (!new_item)
return 0;
*li.ref()= new_item;
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 76c40a3e32d..520982f93b6 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -10850,9 +10850,8 @@ st_select_lex::build_pushable_cond_for_having_pushdown(THD *thd, Item *cond)
*/
if (cond->get_extraction_flag() == MARKER_FULL_EXTRACTION)
{
- Item *result= cond->transform(thd,
- &Item::multiple_equality_transformer,
- (uchar *)this);
+ Item *result= cond->top_level_transform(thd,
+ &Item::multiple_equality_transformer, (uchar *)this);
if (!result)
return true;
if (result->type() == Item::COND_ITEM &&