Commit 0d31b4b3 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Merge branch '10.2' of https://github.com/mariadb/server into 10.2

parents 067b90c7 204739df
...@@ -2910,6 +2910,7 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields, ...@@ -2910,6 +2910,7 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields,
THD_STAGE_INFO(thd, stage_sorting_for_group); THD_STAGE_INFO(thd, stage_sorting_for_group);
if (ordered_index_usage != ordered_index_group_by && if (ordered_index_usage != ordered_index_group_by &&
!only_const_tables() &&
(join_tab + const_tables)->type != JT_CONST && // Don't sort 1 row (join_tab + const_tables)->type != JT_CONST && // Don't sort 1 row
!implicit_grouping && !implicit_grouping &&
add_sorting_to_table(join_tab + const_tables, group_list)) add_sorting_to_table(join_tab + const_tables, group_list))
...@@ -2943,6 +2944,7 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields, ...@@ -2943,6 +2944,7 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields,
THD_STAGE_INFO(thd, stage_sorting_for_order); THD_STAGE_INFO(thd, stage_sorting_for_order);
if (ordered_index_usage != ordered_index_order_by && if (ordered_index_usage != ordered_index_order_by &&
!only_const_tables() &&
add_sorting_to_table(join_tab + const_tables, order)) add_sorting_to_table(join_tab + const_tables, order))
goto err; goto err;
order= NULL; order= NULL;
......
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