mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge mysql.com:/home/hf/work/029717/my41-29717
into mysql.com:/home/hf/work/29717/my41-29717
This commit is contained in:
@ -777,6 +777,7 @@ JOIN::optimize()
|
||||
order=0; // The output has only one row
|
||||
simple_order=1;
|
||||
select_distinct= 0; // No need in distinct for 1 row
|
||||
group_optimized_away= 1;
|
||||
}
|
||||
|
||||
calc_group_buffer(this, group_list);
|
||||
@ -6896,7 +6897,8 @@ end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
|
||||
if (!join->first_record || end_of_records ||
|
||||
(idx=test_if_group_changed(join->group_fields)) >= 0)
|
||||
{
|
||||
if (join->first_record || (end_of_records && !join->group))
|
||||
if (join->first_record ||
|
||||
(end_of_records && !join->group && !join->group_optimized_away))
|
||||
{
|
||||
if (join->procedure)
|
||||
join->procedure->end_group();
|
||||
|
Reference in New Issue
Block a user