| Issue 10: | const type queries on MyISAM tables are not reflected in INDEX_STATISTICS | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. Perform any 'const' query, e.g. SELECT * FROM primary_key = 2, on
MyISAM table.
What is the expected output? What do you see instead?
The used index should appear in SHOW INDEX_STATISTICS output, but it does
not.
Please provide any additional information below.
join_read_const() calls storage method index_read_idx(). The method does
not activate any index or otherwise require it to be activated earlier.
Instead it takes index value as an argument and uses it directly.
Therefore the code which works everywhere else, fails to work in
ha_myisam::index_read_idx():
int inx = (active_index == -1) ? file->lastinx : active_index;
The correct approach would be to replace that line with just:
int inx = index;
With InnoDB this is not a problem, because index_read_idx() method
internally calls change_active_index() followed by ordinary index_read().
|
|
,
May 16, 2008
Thank you. This will be fixed in the next patch.
Status: Started
Labels: -Priority-Medium Priority-High |
|
|
|