mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
group_by.result:
WL3527: disable wrong optimization. sql_select.cc: WL#3527: disable wrong optimization.
This commit is contained in:
@ -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
|
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;
|
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
|
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)
|
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY)
|
||||||
IGNORE INDEX FOR GROUP BY (i2) GROUP BY a;
|
IGNORE INDEX FOR GROUP BY (i2) GROUP BY a;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
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");
|
DBUG_ENTER("test_if_skip_sort_order");
|
||||||
LINT_INIT(ref_key_parts);
|
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
|
Keys disabled by ALTER TABLE ... DISABLE KEYS should have already
|
||||||
been taken into account.
|
been taken into account.
|
||||||
*/
|
*/
|
||||||
usable_keys= *map;
|
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)
|
for (ORDER *tmp_order=order; tmp_order ; tmp_order=tmp_order->next)
|
||||||
{
|
{
|
||||||
Item *item= (*tmp_order->item)->real_item();
|
Item *item= (*tmp_order->item)->real_item();
|
||||||
|
Reference in New Issue
Block a user