1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-28399 Assertion failure in dict_table_check_for_dup_indexes upon concurrent DML/DDL

Problem:
========
 InnoDB DDL fails to remove the newly added table or index from
dictionary and index stub from the table cache if the alter
transaction encounters DEADLOCK error in commit phase.

Solution:
========
Restart the alter table transaction if it encounters DEADLOCK
in commit phase. So that index stubs and index, table removal from
dictionary can be done in rollback_inplace_alter_table()

- Added one assert in rollback_inplace_alter_table() to indicate that
the online log for the old table shouldn't exist.
This commit is contained in:
Thirunarayanan Balathandayuthapani
2022-04-28 15:15:37 +05:30
parent a42e327afe
commit fc391df546
3 changed files with 19 additions and 2 deletions

View File

@ -180,7 +180,7 @@ DROP TABLE t1;
CREATE TABLE t1(a INT PRIMARY KEY, b INT, INDEX(b)) ENGINE=InnoDB;
SET @save_dbug=@@debug_dbug;
SET debug_dbug='+d,innodb_table_deadlock';
SET debug_dbug='+d,deadlock_table_fail';
--error ER_LOCK_DEADLOCK
ALTER TABLE t1 DROP INDEX b, ALGORITHM=INPLACE;
SET debug_dbug=@save_dbug;