[MDEV-26446] Crash on st_join_table::save_explain_data Created: 2021-08-20 Updated: 2023-09-05 Resolved: 2023-07-31 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.4.21, 10.5.12, 10.6.4, 10.4, 10.5, 10.6 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Przemek | Assignee: | Valerii Kravchuk |
| Resolution: | Incomplete | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Simple SELECT and also just EXPLAIN crash MariaDB server in certain data condition.
Consistently reproducible with the example SQL dump attached. Sometimes the EXPLAIN needs to be run 3-4 times before it starts crashing.
Problem similar I guess to MDEV-19720 and |
| Comments |
| Comment by Sami Ahlroos [ 2021-08-20 ] | ||||||||||||||||||||||||||
|
set optimizer_switch="index_merge_sort_intersection=on"; seems to avoid this crash:
| ||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2021-08-24 ] | ||||||||||||||||||||||||||
|
Thanks!
| ||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2021-12-14 ] | ||||||||||||||||||||||||||
|
With the setting
the optimizer chooses for the query
the following execution plan
This already looks strange because the condition
is equivalent to the condition
The latter is equivalent to
Thus using index er does not make sense for index intersection. | ||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2021-12-20 ] | ||||||||||||||||||||||||||
|
Here's the explanation how we come to an assertion failure when executing
with the optimizer switch 'rowids_filter' set to 'on' . First the optimizer tries to estimate the cardinality of ranges that could be used in ranges scans for all indexes. Due to the bug | ||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2021-12-25 ] | ||||||||||||||||||||||||||
|
I will not close this bug until | ||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2023-01-13 ] | ||||||||||||||||||||||||||
|
Curently no rowid filter is used for this query:
| ||||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2023-02-14 ] | ||||||||||||||||||||||||||
|
See newly linked related bugs |