diff options
author | Monty <monty@mariadb.org> | 2023-01-12 18:45:40 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2023-01-13 14:23:55 +0200 |
commit | 0595dd0f5674845637135feaa5cb7b28d0dc10a9 (patch) | |
tree | 9905ce1c0cf31c4c5835e8365abfc422bf626ec1 /sql/grant.h | |
parent | 73ecab3d26c055928673a2629f4513aa7008dbf0 (diff) | |
download | mariadb-git-0595dd0f5674845637135feaa5cb7b28d0dc10a9.tar.gz |
MDEV-30080 Wrong result with LEFT JOINs involving constant tables
The reason things fails in 10.5 and above is that test_quick_select()
returns -1 (impossible range) for empty tables if there are any
conditions attached.
This didn't happen in 10.4 as the cost for a range was more than for
a table scan with 0 rows and get_key_scan_params() did not create any
range plans and thus did not mark the range as impossible.
The code that checked the 'impossible range' conditions did not take
into account all cases of LEFT JOIN usage.
Adding an extra check if the table is used with an ON condition in case
of 'impossible range' fixes the issue.
Diffstat (limited to 'sql/grant.h')
0 files changed, 0 insertions, 0 deletions