diff options
author | Igor Babaev <igor@askmonty.org> | 2016-03-16 00:50:14 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2016-03-16 00:50:14 -0700 |
commit | 5eee8bbe87dbf61c1606ad5e44d9c3a1bb55b3e5 (patch) | |
tree | f622ea9dc4646e3452224d152aa68c5ce7febc75 /sql/item_windowfunc.cc | |
parent | 21651541ce0b2cc0e777988f1e35040b4badfce1 (diff) | |
download | mariadb-git-5eee8bbe87dbf61c1606ad5e44d9c3a1bb55b3e5.tar.gz |
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.
Diffstat (limited to 'sql/item_windowfunc.cc')
-rw-r--r-- | sql/item_windowfunc.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc index 027b0bdf0a1..aa100ff3f90 100644 --- a/sql/item_windowfunc.cc +++ b/sql/item_windowfunc.cc @@ -115,7 +115,7 @@ void Item_window_func::split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array, void Item_window_func::setup_partition_border_check(THD *thd) { - for (ORDER *curr= window_spec->partition_list.first; curr; curr=curr->next) + for (ORDER *curr= window_spec->partition_list->first; curr; curr=curr->next) { //curr->item_ptr->fix_fields(thd, curr->item); Cached_item *tmp= new_Cached_item(thd, curr->item[0], TRUE); @@ -128,7 +128,7 @@ void Item_window_func::setup_partition_border_check(THD *thd) void Item_sum_rank::setup_window_func(THD *thd, Window_spec *window_spec) { /* TODO: move this into Item_window_func? */ - for (ORDER *curr= window_spec->order_list.first; curr; curr=curr->next) + for (ORDER *curr= window_spec->order_list->first; curr; curr=curr->next) { Cached_item *tmp= new_Cached_item(thd, curr->item[0], TRUE); orderby_fields.push_back(tmp); @@ -139,7 +139,7 @@ void Item_sum_rank::setup_window_func(THD *thd, Window_spec *window_spec) void Item_sum_dense_rank::setup_window_func(THD *thd, Window_spec *window_spec) { /* TODO: consider moving this && Item_sum_rank's implementation */ - for (ORDER *curr= window_spec->order_list.first; curr; curr=curr->next) + for (ORDER *curr= window_spec->order_list->first; curr; curr=curr->next) { Cached_item *tmp= new_Cached_item(thd, curr->item[0], TRUE); orderby_fields.push_back(tmp); @@ -198,7 +198,7 @@ bool Item_sum_percent_rank::add() void Item_sum_percent_rank::setup_window_func(THD *thd, Window_spec *window_spec) { /* TODO: move this into Item_window_func? */ - for (ORDER *curr= window_spec->order_list.first; curr; curr=curr->next) + for (ORDER *curr= window_spec->order_list->first; curr; curr=curr->next) { Cached_item *tmp= new_Cached_item(thd, curr->item[0], TRUE); orderby_fields.push_back(tmp); |