diff options
author | Martin Hansson <martin.hansson@sun.com> | 2010-05-10 09:23:23 +0200 |
---|---|---|
committer | Martin Hansson <martin.hansson@sun.com> | 2010-05-10 09:23:23 +0200 |
commit | 1c5200f67d3a5669b987979227d5e314082b00db (patch) | |
tree | 0be844b85d1c0561f003ae224114fe675ca35a3b /sql/mysql_priv.h | |
parent | bea068326fa72be791bac5c2f1658e27e7080cb9 (diff) | |
download | mariadb-git-1c5200f67d3a5669b987979227d5e314082b00db.tar.gz |
Bug#50939: Loose Index Scan unduly relies on engine to
remember range endpoints
The Loose Index Scan optimization keeps track of a sequence
of intervals. For the current interval it maintains the
current interval's endpoints. But the maximum endpoint was
not stored in the SQL layer; rather, it relied on the
storage engine to retain this value in-between reads. By
coincidence this holds for MyISAM and InnoDB. Not for the
partitioning engine, however.
Fixed by making the key values iterator
(QUICK_RANGE_SELECT) keep track of the current maximum endpoint.
This is also more efficient as we save a call through the
handler API in case of open-ended intervals.
The code to calculate endpoints was extracted into
separate methods in QUICK_RANGE_SELECT, and it was possible to
get rid of some code duplication as part of fix.
Diffstat (limited to 'sql/mysql_priv.h')
0 files changed, 0 insertions, 0 deletions