summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 23de18d0d17..7039c70db05 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -3127,7 +3127,7 @@ bool JOIN::make_aggr_tables_info()
distinct in the engine, so we do this for all queries, not only
GROUP BY queries.
*/
- if (tables_list && !procedure)
+ if (tables_list && top_join_tab_count && !procedure)
{
/*
At the moment we only support push down for queries where