Commit 4f42f0d
committed
MDEV-16119 InnoDB lock->index refers to a freed object after failed ADD INDEX
The problem is hard to repeat, and I failed to create a deterministic test case. Online index creation creates stubs for to-be-created indexes. If index creation fails, we could remove these stubs while locks exist in the indexes. (This would require that the index creation was completed, and a concurrent DML operation acquired a lock on a record in the uncommitted index. If a duplicate key error occurs in an uncommitted index, the error will be reported for the CREATE UNIQUE INDEX, not for the DML operation that tried to insert the duplicate.) dict_table_try_drop_aborted(), row_merge_drop_indexes(): If transactional locks exist on the table, keep the table->indexes intact.1 parent 34045af commit 4f42f0d
File tree
4 files changed
+8
-4
lines changed- storage
- innobase
- dict
- row
- xtradb
- dict
- row
4 files changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
510 | | - | |
| 510 | + | |
| 511 | + | |
511 | 512 | | |
512 | 513 | | |
513 | 514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2907 | 2907 | | |
2908 | 2908 | | |
2909 | 2909 | | |
2910 | | - | |
| 2910 | + | |
| 2911 | + | |
2911 | 2912 | | |
2912 | 2913 | | |
2913 | 2914 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
510 | | - | |
| 510 | + | |
| 511 | + | |
511 | 512 | | |
512 | 513 | | |
513 | 514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2911 | 2911 | | |
2912 | 2912 | | |
2913 | 2913 | | |
2914 | | - | |
| 2914 | + | |
| 2915 | + | |
2915 | 2916 | | |
2916 | 2917 | | |
2917 | 2918 | | |
| |||
0 commit comments