diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-05-05 16:12:54 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-05-05 16:12:54 +0400 |
commit | ac53b49b1be807f588aebd83883ec93b764f5d54 (patch) | |
tree | c86cbdb535eefb15e2077a7ac2ffaeff9d76955e /sql/sql_window.cc | |
parent | 583b68e89961c35fa95a06c38988f82e33c73f4a (diff) | |
parent | db0917f68f2681882974afd53935aa8cba29c6b8 (diff) | |
download | mariadb-git-ac53b49b1be807f588aebd83883ec93b764f5d54.tar.gz |
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Diffstat (limited to 'sql/sql_window.cc')
-rw-r--r-- | sql/sql_window.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sql/sql_window.cc b/sql/sql_window.cc index ac70d3d0f32..74e1ad25183 100644 --- a/sql/sql_window.cc +++ b/sql/sql_window.cc @@ -2761,7 +2761,7 @@ bool Window_func_runner::exec(THD *thd, TABLE *tbl, SORT_INFO *filesort_result) bool Window_funcs_sort::exec(JOIN *join) { THD *thd= join->thd; - JOIN_TAB *join_tab= &join->join_tab[join->top_join_tab_count]; + JOIN_TAB *join_tab= join->join_tab + join->exec_join_tab_cnt(); /* Sort the table based on the most specific sorting criteria of the window functions. */ @@ -2841,11 +2841,6 @@ bool Window_funcs_sort::setup(THD *thd, SQL_SELECT *sel, sort_order= order; } filesort= new (thd->mem_root) Filesort(sort_order, HA_POS_ERROR, true, NULL); - if (!join_tab->join->top_join_tab_count) - { - filesort->tracker= - new (thd->mem_root) Filesort_tracker(thd->lex->analyze_stmt); - } /* Apply the same condition that the subsequent sort has. */ filesort->select= sel; |