summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-05-25 19:41:58 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-05-25 19:41:58 +0300
commitecc7f305dde85d704a37e584c29df0ed3f97f7be (patch)
tree31810998f5f198e105c0f1f8e5acd6c9e7a581c3 /sql/sql_select.h
parent736ca14323fa16e409378f0da8005bce4be6dcf8 (diff)
parent5530a93f47324b847c799d00a2756729a2869d13 (diff)
downloadmariadb-git-ecc7f305dde85d704a37e584c29df0ed3f97f7be.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 2f23a8b0d0d..313a322e8ad 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -1715,6 +1715,7 @@ public:
- We are using an ORDER BY or GROUP BY on fields not in the first table
- We are using different ORDER BY and GROUP BY orders
- The user wants us to buffer the result.
+ - We are using WINDOW functions.
When the WITH ROLLUP modifier is present, we cannot skip temporary table
creation for the DISTINCT clause just because there are only const tables.
*/
@@ -1724,7 +1725,8 @@ public:
((select_distinct || !simple_order || !simple_group) ||
(group_list && order) ||
MY_TEST(select_options & OPTION_BUFFER_RESULT))) ||
- (rollup.state != ROLLUP::STATE_NONE && select_distinct));
+ (rollup.state != ROLLUP::STATE_NONE && select_distinct) ||
+ select_lex->have_window_funcs());
}
bool choose_subquery_plan(table_map join_tables);
void get_partial_cost_and_fanout(int end_tab_idx,