[MDEV-28080] Crash when using HAVING with NOT EXIST predicate in an equality Created: 2022-03-16 Updated: 2022-05-03 Resolved: 2022-04-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.9.0, 10.4, 10.5, 10.6, 10.7, 10.8 |
| Fix Version/s: | 10.4.25, 10.5.16, 10.6.8, 10.7.4 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Jingzhou Fu | Assignee: | Igor Babaev |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux jie-2 5.4.143-1-pve #1 SMP PVE 5.4.143-1 (Tue, 28 Sep 2021 09:10:37 +0200) x86_64 x86_64 x86_64 GNU/Linux |
||
| Issue Links: |
|
||||||||||||||||
| Description |
|
PoC:
report (compiled with ASAN):
|
| Comments |
| Comment by Alice Sherepa [ 2022-03-18 ] | |||||||||||||||||||||||||||||||||
|
Thanks! I repeated on 10.4-10.8, a temporary workaround - optimizer_switch='condition_pushdown_from_having=off';
on 10.6+ assertion was renamed -10.6/src/sql/item_subselect.cc:1872: virtual bool Item_exists_subselect::val_bool(): Assertion `fixed()' failed. | |||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2022-04-28 ] | |||||||||||||||||||||||||||||||||
|
This bug has been actually fixed by the patch for | |||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2022-04-29 ] | |||||||||||||||||||||||||||||||||
|
Here's a more general test case that causes the same crash:
| |||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2022-04-29 ] | |||||||||||||||||||||||||||||||||
|
A test case for this bug was pushed into 10.4 |