summaryrefslogtreecommitdiff
path: root/sql/sql_window.cc
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2016-04-06 20:34:23 +0300
committerSergei Petrunia <psergey@askmonty.org>2016-04-06 20:34:23 +0300
commit2efabf81f1faae693ac381de688579283c6fad47 (patch)
treeb5fc37d54498a561b83e469fd6e3c216eb9ba2fd /sql/sql_window.cc
parent0a34dc1e976b4901c708f21cb8d636c6f8371beb (diff)
downloadmariadb-git-2efabf81f1faae693ac381de688579283c6fad47.tar.gz
MDEV-9847: Window functions: crash with big_tables=1
- Move filesort's sort_positions argument into class Filesort. - Make window function code construct Filesort with sort_positions=true.
Diffstat (limited to 'sql/sql_window.cc')
-rw-r--r--sql/sql_window.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_window.cc b/sql/sql_window.cc
index 1a405ec198e..e479faa73d3 100644
--- a/sql/sql_window.cc
+++ b/sql/sql_window.cc
@@ -1834,7 +1834,7 @@ bool Window_funcs_sort::setup(THD *thd, SQL_SELECT *sel,
ORDER* sort_order= concat_order_lists(thd->mem_root,
spec->partition_list->first,
spec->order_list->first);
- filesort= new (thd->mem_root) Filesort(sort_order, HA_POS_ERROR, NULL);
+ filesort= new (thd->mem_root) Filesort(sort_order, HA_POS_ERROR, true, NULL);
/* Apply the same condition that the subsequent sort has. */
filesort->select= sel;