IGNORE_INDEX fix for 4.0

parent d0ee72c8
......@@ -1331,10 +1331,10 @@ table type possible_keys key key_len ref rows Extra
t2 ref fld3 fld3 30 const 1 Using where; Using index
explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle';
table type possible_keys key key_len ref rows Extra
t2 index NULL fld3 30 NULL 1199 Using where; Using index
t2 ALL NULL NULL NULL NULL 1199 Using where
explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle';
table type possible_keys key key_len ref rows Extra
t2 index NULL fld3 30 NULL 1199 Using where; Using index
t2 ALL NULL NULL NULL NULL 1199 Using where
explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle';
table type possible_keys key key_len ref rows Extra
t2 ref fld3 fld3 30 const 1 Using where; Using index
......
......@@ -1850,6 +1850,7 @@ bool setup_tables(TABLE_LIST *tables)
for (Field **ptr=table->field ; *ptr ; ptr++)
(*ptr)->query_id=0;
}
table->used_keys&= table->keys_in_use_for_query;
}
if (tablenr > MAX_TABLES)
{
......
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