Commit c5537c04 authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-9755: Buildbot shows a crash in JOIN::make_aggr_tables_info()

Don't attempt to do query pushdown when all tables have been optimized
away (tables_list=NULL)>
parent 6533bd1b
......@@ -2117,7 +2117,8 @@ bool JOIN::make_aggr_tables_info()
group by handler to evaluate the group by
*/
group_by_handler *gbh= NULL;
if ((tmp_table_param.sum_func_count || group_list) && !procedure)
if (tables_list && (tmp_table_param.sum_func_count || group_list) &&
!procedure)
{
/*
At the moment we only support push down for queries where
......
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