diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2021-04-29 19:30:07 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2021-04-30 21:42:14 +0300 |
commit | 2820f30dde3148df71e1d748ac705d98d60e0787 (patch) | |
tree | 39bbab92fd829ca8fcbe568056edf99b19ceaec0 /zlib/zlib.h | |
parent | 8f9a72a1504c73a2d432cb5a521b9ca631d1e455 (diff) | |
download | mariadb-git-2820f30dde3148df71e1d748ac705d98d60e0787.tar.gz |
MDEV-23723: Crash when test_if_skip_sort_order() is checked for derived ...bb-10.3-mdev23723
The problem was caused by the following scenario:
Subquery's table has two indexes, KEY a(a), KEY a_b(a,b)
- LATERAL DERIVED optimization decides to use index a.
= The subquery uses ref access over key a.
- test_if_skip_sort_order() sees that KEY a_b satisfies the
subquery's GROUP BY clause, and attempts to switch to it.
= It fails to do so, because KEYUSE objects for index a_b
are switched off.
Fixed by disallowing to change the ref access key if it uses KEYUSE
objects injected by LATERAL DERIVED optimization.
Diffstat (limited to 'zlib/zlib.h')
0 files changed, 0 insertions, 0 deletions