mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Code cleanup
This commit is contained in:
@ -545,6 +545,7 @@ public:
|
|||||||
}
|
}
|
||||||
enum Item::Type type() const { return Item::WINDOW_FUNC_ITEM; }
|
enum Item::Type type() const { return Item::WINDOW_FUNC_ITEM; }
|
||||||
|
|
||||||
|
private:
|
||||||
/*
|
/*
|
||||||
Window functions are very special functions, so val_() methods have
|
Window functions are very special functions, so val_() methods have
|
||||||
special meaning for them:
|
special meaning for them:
|
||||||
@ -584,11 +585,6 @@ public:
|
|||||||
read_value_from_result_field= true;
|
read_value_from_result_field= true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_read_value_from_result_field()
|
|
||||||
{
|
|
||||||
read_value_from_result_field= true;
|
|
||||||
}
|
|
||||||
|
|
||||||
double val_real()
|
double val_real()
|
||||||
{
|
{
|
||||||
double res;
|
double res;
|
||||||
|
@ -25898,7 +25898,7 @@ AGGR_OP::end_send()
|
|||||||
|
|
||||||
// Update ref array
|
// Update ref array
|
||||||
join_tab->join->set_items_ref_array(*join_tab->ref_array);
|
join_tab->join->set_items_ref_array(*join_tab->ref_array);
|
||||||
join->process_window_functions(&join->fields_list); // location #2
|
join->process_window_functions(&join->select_lex->window_funcs);
|
||||||
table->reginfo.lock_type= TL_UNLOCK;
|
table->reginfo.lock_type= TL_UNLOCK;
|
||||||
|
|
||||||
bool in_first_read= true;
|
bool in_first_read= true;
|
||||||
|
@ -1494,7 +1494,7 @@ public:
|
|||||||
int init_execution();
|
int init_execution();
|
||||||
void exec();
|
void exec();
|
||||||
|
|
||||||
bool process_window_functions(List<Item> *curr_fields_list);
|
bool process_window_functions(List<Item_window_func> *window_funcs);
|
||||||
|
|
||||||
void exec_inner();
|
void exec_inner();
|
||||||
bool prepare_result(List<Item> **columns_list);
|
bool prepare_result(List<Item> **columns_list);
|
||||||
|
@ -1579,17 +1579,13 @@ bool compute_two_pass_window_functions(Item_window_func *item_win,
|
|||||||
true Error
|
true Error
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool JOIN::process_window_functions(List<Item> *curr_fields_list)
|
bool JOIN::process_window_functions(List<Item_window_func> *window_funcs)
|
||||||
{
|
{
|
||||||
List_iterator_fast<Item> it(*curr_fields_list);
|
List_iterator_fast<Item_window_func> it(*window_funcs);
|
||||||
Item *item;
|
Item_window_func *item_win;
|
||||||
|
|
||||||
|
while ((item_win= it++))
|
||||||
{
|
{
|
||||||
while ((item= it++))
|
|
||||||
{
|
|
||||||
if (item->type() == Item::WINDOW_FUNC_ITEM)
|
|
||||||
{
|
|
||||||
Item_window_func *item_win = (Item_window_func *) item;
|
|
||||||
item_win->set_phase_to_computation();
|
item_win->set_phase_to_computation();
|
||||||
Window_spec *spec = item_win->window_spec;
|
Window_spec *spec = item_win->window_spec;
|
||||||
/*
|
/*
|
||||||
@ -1606,6 +1602,7 @@ bool JOIN::process_window_functions(List<Item> *curr_fields_list)
|
|||||||
join_tab[top_join_tab_count].table is the temp. table where join
|
join_tab[top_join_tab_count].table is the temp. table where join
|
||||||
output was stored.
|
output was stored.
|
||||||
*/
|
*/
|
||||||
|
// CAUTION: The sorting criteria list is not yet connected
|
||||||
add_sorting_to_table(&join_tab[top_join_tab_count],
|
add_sorting_to_table(&join_tab[top_join_tab_count],
|
||||||
spec->partition_list->first);
|
spec->partition_list->first);
|
||||||
join_tab[top_join_tab_count].used_for_window_func= true;
|
join_tab[top_join_tab_count].used_for_window_func= true;
|
||||||
@ -1674,8 +1671,6 @@ bool JOIN::process_window_functions(List<Item> *curr_fields_list)
|
|||||||
if (is_error)
|
if (is_error)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user