mirror of
https://github.com/MariaDB/server.git
synced 2025-08-30 11:22:14 +03:00
The class Window_spec now has pointers to the partition and order lists
of the type SQL_I_List<ORDER> rather then the objects of this type. It allows to replace easily one instance of such a list for another. Besides it will facilitate to compare two lists if they originate from the same window specification. In fact any direct assignment for objects of the type SQL_I_List<ORDER> was not valid.
This commit is contained in:
@@ -7837,10 +7837,16 @@ bool st_select_lex::add_window_def(THD *thd,
|
||||
SQL_I_List<ORDER> win_order_list,
|
||||
Window_frame *win_frame)
|
||||
{
|
||||
SQL_I_List<ORDER> *win_part_list_ptr=
|
||||
new (thd->mem_root) SQL_I_List<ORDER> (win_partition_list);
|
||||
SQL_I_List<ORDER> *win_order_list_ptr=
|
||||
new (thd->mem_root) SQL_I_List<ORDER> (win_order_list);
|
||||
if (!(win_part_list_ptr && win_order_list_ptr))
|
||||
return true;
|
||||
Window_def *win_def= new (thd->mem_root) Window_def(win_name,
|
||||
win_ref,
|
||||
win_partition_list,
|
||||
win_order_list,
|
||||
win_part_list_ptr,
|
||||
win_order_list_ptr,
|
||||
win_frame);
|
||||
group_list= thd->lex->save_group_list;
|
||||
order_list= thd->lex->save_order_list;
|
||||
@@ -7853,9 +7859,15 @@ bool st_select_lex::add_window_spec(THD *thd,
|
||||
SQL_I_List<ORDER> win_order_list,
|
||||
Window_frame *win_frame)
|
||||
{
|
||||
SQL_I_List<ORDER> *win_part_list_ptr=
|
||||
new (thd->mem_root) SQL_I_List<ORDER> (win_partition_list);
|
||||
SQL_I_List<ORDER> *win_order_list_ptr=
|
||||
new (thd->mem_root) SQL_I_List<ORDER> (win_order_list);
|
||||
if (!(win_part_list_ptr && win_order_list_ptr))
|
||||
return true;
|
||||
Window_spec *win_spec= new (thd->mem_root) Window_spec(win_ref,
|
||||
win_partition_list,
|
||||
win_order_list,
|
||||
win_part_list_ptr,
|
||||
win_order_list_ptr,
|
||||
win_frame);
|
||||
group_list= thd->lex->save_group_list;
|
||||
order_list= thd->lex->save_order_list;
|
||||
|
Reference in New Issue
Block a user