mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-22463: Element_type &Bounds_checked_array<Item *>::operator[](size_t) [Element_type = Item *]: Assertion `n < m_size' failed.
Allocate space for fields inside the window function (arguments, PARTITION BY and ORDER BY clause) in the ref pointer array. All fields inside the window function are part of the temporary table that is required for the window function computation.
This commit is contained in:
@ -8556,6 +8556,11 @@ bool st_select_lex::add_window_def(THD *thd,
|
||||
win_frame);
|
||||
group_list= thd->lex->save_group_list;
|
||||
order_list= thd->lex->save_order_list;
|
||||
if (parsing_place != SELECT_LIST)
|
||||
{
|
||||
fields_in_window_functions+= win_part_list_ptr->elements +
|
||||
win_order_list_ptr->elements;
|
||||
}
|
||||
return (win_def == NULL || window_specs.push_back(win_def));
|
||||
}
|
||||
|
||||
@ -8577,6 +8582,11 @@ bool st_select_lex::add_window_spec(THD *thd,
|
||||
win_frame);
|
||||
group_list= thd->lex->save_group_list;
|
||||
order_list= thd->lex->save_order_list;
|
||||
if (parsing_place != SELECT_LIST)
|
||||
{
|
||||
fields_in_window_functions+= win_part_list_ptr->elements +
|
||||
win_order_list_ptr->elements;
|
||||
}
|
||||
thd->lex->win_spec= win_spec;
|
||||
return (win_spec == NULL || window_specs.push_back(win_spec));
|
||||
}
|
||||
|
Reference in New Issue
Block a user