[MDEV-19630] ALTER TABLE ... ADD COLUMN damages foreign keys which are pointed to the table being altered Created: 2019-05-29 Updated: 2019-11-01 Resolved: 2019-07-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Affects Version/s: | 10.3, 10.4 |
| Fix Version/s: | 10.3.17, 10.4.7 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Tadas Aučiūnas | Assignee: | Thirunarayanan Balathandayuthapani |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Docker container using the official mariadb:10.3.2 image |
||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Expected outcome: Actual outcome:
After the error occurs, the table contracts does not exist anymore (in the filesystem it is replaced with a file #sql-1_8). Reproduction and details:
|
| Comments |
| Comment by Tadas Aučiūnas [ 2019-05-30 ] |
|
Changing it to critical since the bug can potentially corrupt the database |
| Comment by Thirunarayanan Balathandayuthapani [ 2019-07-09 ] |
|
For instant alter, InnoDB failed to change the foreign key cache. So it leads to the failure of consecutive DDLs. |
| Comment by Thirunarayanan Balathandayuthapani [ 2019-07-09 ] |
|
Patch is in bb-10.3- |
| Comment by Eugene Kosov (Inactive) [ 2019-07-09 ] |
|
I suggest to rename a newly added argument. Otherwise looks good. |