Commit 60a37783 authored by Varun Gupta's avatar Varun Gupta

MDEV-20224: main.derived crashes with ASAN with error use-after-poison

Make sure that the references in the GROUP BY clause that need to be considered for
pushdown from having to where are of Item_field objects
parent b428b099
......@@ -7902,6 +7902,7 @@ bool st_select_lex::collect_grouping_fields(THD *thd)
Item *item= *ord->item;
if (item->type() != Item::FIELD_ITEM &&
!(item->type() == Item::REF_ITEM &&
item->real_type() == Item::FIELD_ITEM &&
((((Item_ref *) item)->ref_type() == Item_ref::VIEW_REF) ||
(((Item_ref *) item)->ref_type() == Item_ref::REF))))
continue;
......
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