mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Back-port from 6.0 of the fix for
BUG#38049 "incorrect rows estimations with references from preceding table" (from revid:sergefp@mysql.com-20090126194259-ue20il3qro529l4d). Compared to 6.0 where EXPLAIN indicates "Using index condition", here in join_optimizer.result we see "Using where"; it's normal; 6.0 shows the same if disabling Index Condition Pushdown.
This commit is contained in:
@ -4328,7 +4328,8 @@ best_access_path(JOIN *join,
|
||||
in ReuseRangeEstimateForRef-3.
|
||||
*/
|
||||
if (table->quick_keys.is_set(key) &&
|
||||
const_part & (1 << table->quick_key_parts[key]) &&
|
||||
(const_part & ((1 << table->quick_key_parts[key])-1)) ==
|
||||
((1 << table->quick_key_parts[key])-1) &&
|
||||
table->quick_n_ranges[key] == 1 &&
|
||||
records > (double) table->quick_rows[key])
|
||||
{
|
||||
|
Reference in New Issue
Block a user