1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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

into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug25602


sql/sql_select.cc:
  Auto merged
This commit is contained in:
unknown
2007-06-24 10:50:24 -07:00
3 changed files with 49 additions and 2 deletions

View File

@@ -12551,10 +12551,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))
DBUG_RETURN(0);
for (ORDER *ord= join->order; ord; ord= ord->next)