mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-15853: Assertion `tab->filesort_result == 0' failed
The issue here is that the window function execution is not called for the correct join tab, when we have GROUP BY where we create extra temporary tables then we need to call window function execution for the last join tab. For doing so the current code does not take into account the JOIN::aggr_tables. Fixed by introducing a new function JOIN::total_join_tab_cnt that takes in account the temporary tables also.
This commit is contained in:
@ -2851,7 +2851,7 @@ bool JOIN::make_aggr_tables_info()
|
||||
- duplicate value removal
|
||||
Both of these operations are done after window function computation step.
|
||||
*/
|
||||
curr_tab= join_tab + exec_join_tab_cnt() + aggr_tables - 1;
|
||||
curr_tab= join_tab + total_join_tab_cnt();
|
||||
if (select_lex->window_funcs.elements)
|
||||
{
|
||||
curr_tab->window_funcs_step= new Window_funcs_computation;
|
||||
|
Reference in New Issue
Block a user