1
0
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:
Marko Mäkelä
2018-08-21 15:20:34 +03:00
52 changed files with 1070 additions and 147 deletions

View File

@ -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,