[MDEV-31150] Crash on 2nd execution of update using mergeable derived table Created: 2023-04-28 Updated: 2023-08-10 Resolved: 2023-08-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Update |
| Affects Version/s: | 11.1 |
| Fix Version/s: | 11.1.3 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | regression | ||
| Description |
|
Reproducible with InnoDB, MyISAM, Aria. The failure in its current form appeared after this commit
However, there were several commits before this one which were either not building or otherwise breaking, so it's hard to say when exactly the test started failing, but definitely somewhere between the commit above and 3a9358a4106a ( |
| Comments |
| Comment by Alice Sherepa [ 2023-07-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
also with sp and derived table
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2023-07-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
The same problen can be reproduced when a mergeable derived table is used instead of CTE:
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2023-07-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
The same problem can be reproduced with a multi-table update:
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2023-07-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
We don't have such problem when using a mergeable view instead of the derived table/CTE:
or when using a non-mergeable derived table instead of our derived table/CTE.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2023-07-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
This problem cannot be observed in 10.4 and up to 11.1 because any mergeable derived table is considered as non-mergeable if it is used in a single-table UPDATE/DELETE or in a multi-table UPDATE/DELETE. This is of course a mistake that was fixed in the task | ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2023-07-27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
A similar problem can be seen for the second call of a procedure containing any of the following statements:
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2023-07-27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
OK to push | ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2023-08-01 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
A fix for this bug was pushed into 11.1 |