Commit 4ce3624e authored by unknown's avatar unknown

group_by.result:

  WL3527: disable wrong optimization.
sql_select.cc:
  WL#3527: disable wrong optimization.


sql/sql_select.cc:
  WL#3527: disable wrong optimization.
mysql-test/r/group_by.result:
  WL3527: disable wrong optimization.
parent 0f793369
......@@ -1067,7 +1067,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 4 NULL 256 Using index
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 4 NULL 256 Using index
1 SIMPLE t1 index NULL PRIMARY 4 NULL 256 Using index; Using filesort
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY)
IGNORE INDEX FOR GROUP BY (i2) GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
......
......@@ -12393,24 +12393,12 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
DBUG_ENTER("test_if_skip_sort_order");
LINT_INIT(ref_key_parts);
/* Check which keys can be used to resolve ORDER BY. */
usable_keys= table->keys_in_use_for_query;
/*
Keys disabled by ALTER TABLE ... DISABLE KEYS should have already
been taken into account.
*/
usable_keys= *map;
/*
If there is a covering index, and we have IGNORE INDEX FOR GROUP/ORDER
and this index is used for the JOIN part, then we have to ignore the
IGNORE INDEX FOR GROUP/ORDER
*/
if (table->key_read ||
(table->covering_keys.is_set(tab->index) && !table->no_keyread))
usable_keys.set_bit (tab->index);
for (ORDER *tmp_order=order; tmp_order ; tmp_order=tmp_order->next)
{
Item *item= (*tmp_order->item)->real_item();
......
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