mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 10.1 into 10.2
This commit is contained in:
@ -1564,6 +1564,14 @@ JOIN::optimize_inner()
|
||||
error= 1;
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
if (!group_list)
|
||||
{
|
||||
/* The output has only one row */
|
||||
order=0;
|
||||
simple_order=1;
|
||||
group_optimized_away= 1;
|
||||
select_distinct=0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Calculate how to do the join */
|
||||
@ -6099,7 +6107,7 @@ add_group_and_distinct_keys(JOIN *join, JOIN_TAB *join_tab)
|
||||
Item_field *cur_item;
|
||||
key_map possible_keys(0);
|
||||
|
||||
if (join->group_list || join->simple_group)
|
||||
if (join->group_list)
|
||||
{ /* Collect all query fields referenced in the GROUP clause. */
|
||||
for (cur_group= join->group_list; cur_group; cur_group= cur_group->next)
|
||||
(*cur_group->item)->walk(&Item::collect_item_field_processor, 0,
|
||||
|
Reference in New Issue
Block a user