diff options
author | unknown <monty@hundin.mysql.fi> | 2001-09-18 22:13:35 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-09-18 22:13:35 +0300 |
commit | c66208cfbf2726a2c9fe6eed9f4d71e2fff5dfbd (patch) | |
tree | 1871cc5ec92569a72b53ed8d789d1a95b51384a9 /sql/sql_select.cc | |
parent | c91a3df5c38ee5f4ebc7e42f0c17da79d4930801 (diff) | |
download | mariadb-git-c66208cfbf2726a2c9fe6eed9f4d71e2fff5dfbd.tar.gz |
Fix bug in SELECT EXPLAIN ... ORDER BY
Docs/internals.texi:
Added more code style suggestions.
Docs/manual.texi:
Changelog
myisam/mi_check.c:
Removed dbug info
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index b6c261d1463..56ba4baed30 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -531,8 +531,9 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds, if (!(select_options & SELECT_BIG_RESULT) && ((group && join.const_tables != join.tables && - !test_if_skip_sort_order(&join.join_tab[join.const_tables], group, - HA_POS_ERROR)) || + (!simple_group || + !test_if_skip_sort_order(&join.join_tab[join.const_tables], group, + HA_POS_ERROR))) || select_distinct) && join.tmp_table_param.quick_group && !procedure) { @@ -545,8 +546,10 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds, order=group; if (order && (join.const_tables == join.tables || - test_if_skip_sort_order(&join.join_tab[join.const_tables], order, - (group ? HA_POS_ERROR : thd->select_limit)))) + (simple_order && + test_if_skip_sort_order(&join.join_tab[join.const_tables], order, + (group ? HA_POS_ERROR : + thd->select_limit))))) order=0; select_describe(&join,need_tmp, (order != 0 && |