summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2020-07-10 10:45:04 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2020-07-13 22:04:54 +0530
commitb0df247db675a721198f2d4dbeb098cd57d932a3 (patch)
tree33f22163ee4d9c592fa96fcceace7016f2af20e6 /sql/sql_lex.h
parent0994af43e582fccf55f7893b16228b57e92330d0 (diff)
downloadmariadb-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_lex.h')
-rw-r--r--sql/sql_lex.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index d14843d0c24..965c3f29834 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -871,6 +871,14 @@ public:
converted to a GROUP BY involving BIT fields.
*/
uint hidden_bit_fields;
+ /*
+ Number of fields used in the definition of all the windows functions.
+ This includes:
+ 1) Fields in the arguments
+ 2) Fields in the PARTITION BY clause
+ 3) Fields in the ORDER BY clause
+ */
+ uint fields_in_window_functions;
enum_parsing_place parsing_place; /* where we are parsing expression */
enum_parsing_place context_analysis_place; /* where we are in prepare */
bool with_sum_func; /* sum function indicator */
@@ -1180,10 +1188,7 @@ public:
SQL_I_List<ORDER> win_order_list,
Window_frame *win_frame);
List<Item_window_func> window_funcs;
- bool add_window_func(Item_window_func *win_func)
- {
- return window_funcs.push_back(win_func);
- }
+ bool add_window_func(Item_window_func *win_func);
bool have_window_funcs() const { return (window_funcs.elements !=0); }