[MDEV-20938] Double free of dict_foreign_t during instant ALTER TABLE Created: 2019-10-31 Updated: 2020-08-25 Resolved: 2019-11-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.4.7, 10.4.8 |
| Fix Version/s: | 10.3.19, 10.4.9 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Claudio Nanni | Assignee: | Thirunarayanan Balathandayuthapani |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
ALTER TABLE of this kind crashes 10.4.7:
This is a part of the stack trace:
I'll attach all the details later. |
| Comments |
| Comment by Marko Mäkelä [ 2019-10-31 ] | ||||||||||||||||||||||||||||
|
I narrowed it down to this merge commit that first appeared in 10.4.7:
The following change (applied on top of that commit) makes the crash go away. So, the condition clearly needs to be revised somehow, either in the function call or inside the function:
| ||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2019-11-01 ] | ||||||||||||||||||||||||||||
|
It turns out that this was not caused by If a column was renamed and a FOREIGN KEY constraint referring to it in the same operation, together with instant ADD COLUMN, we would double-free the dict_foreign_t object corresponding to the FOREIGN KEY constraint. |