1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Bug #28476: force index on a disabled myisam index gives error 124

When processing the USE/FORCE index hints
the optimizer was not checking if the indexes 
specified are enabled (see ALTER TABLE).
Fixed by:
 Backporting the fix for bug 20604 to 5.0
This commit is contained in:
gkodinov/kgeorge@magare.gmz
2007-05-22 15:58:30 +03:00
parent 4ac1e98630
commit 604ef46327
7 changed files with 93 additions and 6 deletions

View File

@@ -12246,10 +12246,11 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
LINT_INIT(ref_key_parts);
/*
Check which keys can be used to resolve ORDER BY.
We must not try to use disabled keys.
Keys disabled by ALTER TABLE ... DISABLE KEYS should have already
been taken into account.
*/
usable_keys= table->s->keys_in_use;
usable_keys= table->keys_in_use_for_query;
DBUG_ASSERT(usable_keys.is_subset(table->s->keys_in_use));
for (ORDER *tmp_order=order; tmp_order ; tmp_order=tmp_order->next)
{