diff options
author | Monty <monty@mariadb.org> | 2022-12-21 00:30:02 +0200 |
---|---|---|
committer | Sergei Petrunia <sergey@mariadb.com> | 2023-02-03 14:38:45 +0300 |
commit | b5df077e8555c2a43e5cae7bcb58310c25119ea7 (patch) | |
tree | f45b1d292c79223ed27ae8065fd82da1cc692572 /plugin | |
parent | ed0a72356691bdeb163b52fb73bd0afa7b9254ac (diff) | |
download | mariadb-git-b5df077e8555c2a43e5cae7bcb58310c25119ea7.tar.gz |
Fixed wrong selectivity calculation in table_after_join_selectivity()
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.
Diffstat (limited to 'plugin')
0 files changed, 0 insertions, 0 deletions