1
0
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:
Igor Babaev
2016-03-16 00:50:14 -07:00
parent 21651541ce
commit 5eee8bbe87
4 changed files with 42 additions and 31 deletions

View File

@@ -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;