Skip to content

Commit

Permalink
followup: fix ASAN failure of main.having_cond_pushdown --ps
Browse files Browse the repository at this point in the history
also call top_level_transform() recursively for

(a OR b) AND (c OR d)
  • Loading branch information
vuvova authored and sanja-byelkin committed Oct 29, 2022
1 parent a472237 commit 6414374
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sql/item_cmpfunc.cc
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions sql/sql_lex.cc
Expand Up @@ -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 &&
Expand Down

0 comments on commit 6414374

Please sign in to comment.