Commit a91b1826 authored by Jorgen Loland's avatar Jorgen Loland

Followup patch for BUG#47280

Temporary tables may set join->group to 0 even though there is 
grouping. Also need to test if sum_func_count>0 when JOIN::exec() 
decides whether to present results in a grouped manner.
parent adab17b9
...@@ -2036,6 +2036,7 @@ JOIN::exec() ...@@ -2036,6 +2036,7 @@ JOIN::exec()
*curr_all_fields, 0); *curr_all_fields, 0);
if (curr_join->group || curr_join->implicit_grouping || if (curr_join->group || curr_join->implicit_grouping ||
curr_join->tmp_table_param.sum_func_count ||
(procedure && (procedure->flags & PROC_GROUP))) (procedure && (procedure->flags & PROC_GROUP)))
{ {
if (make_group_fields(this, curr_join)) if (make_group_fields(this, curr_join))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment