1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed LP bug #999251: Q13 from DBT3 uses table scan instead of covering index scan.

The optimizer chose a less efficient execution plan due to the following
defects of the code:
1. the generic handler function handler::keyread_time did not take into account
   that in clustered primary keys record data is included into each index entry
2. the function make_join_readinfo erroneously decided that index only scan
   could not be used if join cache was empoyed.

Added no additional test case.
Adjusted some of the test results.
This commit is contained in:
Igor Babaev
2012-05-16 20:39:03 -07:00
parent c17bace4f0
commit 4dc963a9f3
4 changed files with 13 additions and 9 deletions

View File

@ -2365,8 +2365,8 @@ select_type SIMPLE
table t1
type index
possible_keys NULL
key PRIMARY
key_len 4
key b
key_len 10
ref NULL
rows 10
Extra Using index
@ -2652,7 +2652,7 @@ select_type SIMPLE
table t1
type index
possible_keys NULL
key PRIMARY
key b
key_len 8
ref NULL
rows 3