diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2020-07-10 10:45:04 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2020-07-13 22:04:54 +0530 |
commit | b0df247db675a721198f2d4dbeb098cd57d932a3 (patch) | |
tree | 33f22163ee4d9c592fa96fcceace7016f2af20e6 /sql/sql_window.cc | |
parent | 0994af43e582fccf55f7893b16228b57e92330d0 (diff) | |
download | mariadb-git-b0df247db675a721198f2d4dbeb098cd57d932a3.tar.gz |
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.
Diffstat (limited to 'sql/sql_window.cc')
-rw-r--r-- | sql/sql_window.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_window.cc b/sql/sql_window.cc index 18075d179d5..612c6e692fe 100644 --- a/sql/sql_window.cc +++ b/sql/sql_window.cc @@ -2969,6 +2969,14 @@ Window_funcs_computation::save_explain_plan(MEM_ROOT *mem_root, return xpl; } + +bool st_select_lex::add_window_func(Item_window_func *win_func) +{ + if (parsing_place != SELECT_LIST) + fields_in_window_functions+= win_func->window_func()->argument_count(); + return window_funcs.push_back(win_func); +} + ///////////////////////////////////////////////////////////////////////////// // Unneeded comments (will be removed when we develop a replacement for // the feature that was attempted here |