From c5537c042ac44fde7c63e8225dcf0590b53cec26 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Thu, 17 Mar 2016 22:17:09 +0300 Subject: 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)> --- sql/sql_select.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 736e5f21681..02680b71989 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -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 -- cgit v1.2.1