1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed bug mdev-11138.

Supported usage of expressions with window functions
in SELECTs without tables.
This commit is contained in:
Igor Babaev
2017-02-04 21:51:40 -08:00
parent 20aae56efa
commit e51b015fc3
4 changed files with 52 additions and 4 deletions

View File

@ -2801,6 +2801,11 @@ 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;