1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge olga.mysql.com:/home/igor/mysql-5.0-opt

into  olga.mysql.com:/home/igor/mysql-5.1-opt
This commit is contained in:
igor@olga.mysql.com
2007-06-24 19:06:09 -07:00
3 changed files with 49 additions and 2 deletions

View File

@ -12840,10 +12840,14 @@ create_sort_index(THD *thd, JOIN *join, ORDER *order,
/*
When there is SQL_BIG_RESULT do not sort using index for GROUP BY,
and thus force sorting on disk.
and thus force sorting on disk unless a group min-max optimization
is going to be used as it is applied now only for one table queries
with covering indexes.
*/
if ((order != join->group_list ||
!(join->select_options & SELECT_BIG_RESULT)) &&
!(join->select_options & SELECT_BIG_RESULT) ||
select && select->quick &&
select->quick->get_type() == QUICK_SELECT_I::QS_TYPE_GROUP_MIN_MAX) &&
test_if_skip_sort_order(tab,order,select_limit,0,
is_order_by ? &table->keys_in_use_for_order_by :
&table->keys_in_use_for_group_by))