diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2019-12-07 18:21:36 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2020-01-12 15:48:46 +0300 |
commit | 9c3eca85141836548214e3c68f256b3868502509 (patch) | |
tree | 7a413fb85a8d963ac9d68880a252c7128ebabbc9 /sql/sql_show.cc | |
parent | cba9ed12790727c70332f8862684b13ac3f25bbc (diff) | |
download | mariadb-git-9c3eca85141836548214e3c68f256b3868502509.tar.gz |
MDEV-21243: Join buffer: condition is checked in wrong place for range accessbb-10.3-mdev21243
In this scenario:
- There is a possible range access for table T
- And there is a ref access on the same index which uses fewer key parts
- The join optimizer picks the ref access (because it is cheaper)
- make_join_select applies this heuristic to switch to range:
/* Range uses longer key; Use this instead of ref on key */
Join buffer will be used without having called
JOIN_TAB::make_scan_filter(). This means, conditions that should be
checked when reading table T will be checked after T is joined with the
contents of the join buffer, instead.
Fixed this by adding a make_scan_filter() check.
(updated patch after backport to 10.3)
(Fix testcase on Windows)
Diffstat (limited to 'sql/sql_show.cc')
0 files changed, 0 insertions, 0 deletions