Commit 64143741 authored by Sergei Golubchik's avatar Sergei Golubchik Committed by Oleksandr Byelkin

followup: fix ASAN failure of main.having_cond_pushdown --ps

also call top_level_transform() recursively for

(a OR b) AND (c OR d)
parent a472237d
......@@ -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;
......
......@@ -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 &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment