diff options
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 761f6c4b130..1f79010e993 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -26243,7 +26243,15 @@ AGGR_OP::end_send() corresponding temp table fields. Do this for each row in the table. */ if (join_tab->window_funcs_step) - copy_funcs(join_tab->tmp_table_param->items_to_copy, join->thd); + { + Item **func_ptr= join_tab->tmp_table_param->items_to_copy; + Item *func; + for (; (func = *func_ptr) ; func_ptr++) + { + if (func->with_window_func) + func->save_in_result_field(true); + } + } rc= evaluate_join_record(join, join_tab, 0); } } |