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:
@ -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;
|
||||
|
Reference in New Issue
Block a user