[MDEV-5578] Handler next limit scan the full table Created: 2014-01-28 Updated: 2014-01-31 Resolved: 2014-01-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.7 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | VAROQUI Stephane | Assignee: | Elena Stepanova |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | upstream | ||
| Description |
|
Populate a sysbench table
|
| Comments |
| Comment by Elena Stepanova [ 2014-01-30 ] |
|
Observation: the value only goes crazy when limit reaches outside the range. |
| Comment by Sergei Golubchik [ 2014-01-30 ] |
|
This is not a bug. Remember three facts:
So, what happens, you ask for the next 100 rows. Storage engine starts walking the index, finds and returns two 98 rows. But you've asked for a hundred. So it continues walking the index, but all other rows are rejected by the WHERE condition. There's no optimizer, HANDLER doesn't know that you're asking for a range, and it doesn't stop when it reaches the upper range limit, it simply goes until the very end of the index. |
| Comment by VAROQUI Stephane [ 2014-01-31 ] |
|
Thanks i get it now ! |