The source could not be displayed because it is larger than 1 MB.
You can
load it anyway or download it
instead.
-
Monty authored
The old code counted selectivity double in case of queries like: WHERE key_part1=1 and key_part2 < 100 if the optimizer would decide to use a REF access on key_part1. The new code in best_access_path() that changes REF access to RANGE if the RANGE key is longer makes this issue less likely to happen. I was not able to create a test case for 11.0, however if one ports this patch to a MariaDB version without the change of REF to RANGE, the selectivity will be counted double.
b5df077e