summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-10-04 16:46:41 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-10-09 08:55:00 +0200
commitb7408be0c3a4027b505f6122306c8d88ad0e92b2 (patch)
tree91eedd8f341d730b7b5567ef766af733607cf90b /sql
parentb1ac1742791ad72695f76cab27e45b3f37cc39bc (diff)
downloadmariadb-git-b7408be0c3a4027b505f6122306c8d88ad0e92b2.tar.gz
MDEV-20753: Sequence with limit 0 crashes server
Do not try to push down conditions to engine if query was resolved without tables (and so the engine).
Diffstat (limited to 'sql')
-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 460c7346cdd..a68eaf00424 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -2795,7 +2795,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