From b11ff3d49581d9e7b6f8b990f08e85e4d6384418 Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Mon, 30 Mar 2020 08:03:54 +0530 Subject: MDEV-22019: Sig 11 in next_breadth_first_tab | max_sort_length setting + double GROUP BY leads to crash No need to create a temp table for aggregation if we have encountered some error. --- sql/sql_show.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sql/sql_show.cc') diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 78ca1d09e7a..4e37b53b87e 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -8299,7 +8299,6 @@ end: bool optimize_schema_tables_reads(JOIN *join) { THD *thd= join->thd; - bool result= 0; DBUG_ENTER("optimize_schema_tables_reads"); JOIN_TAB *tab; @@ -8334,11 +8333,11 @@ bool optimize_schema_tables_reads(JOIN *join) */ cond= tab->cache_select->cond; } - - optimize_for_get_all_tables(thd, table_list, cond); + if (optimize_for_get_all_tables(thd, table_list, cond)) + DBUG_RETURN(TRUE); // Handle OOM } } - DBUG_RETURN(result); + DBUG_RETURN(FALSE); } -- cgit v1.2.1