1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-25509 Atomic DDL: Assertion `err != DB_DUPLICATE_KEY' fails

after previous error upon multi-RENAME

- InnoDB fails to rename the foreign key constraint while
rollbacking the rename operation. In that case, InnoDB should
rename the FK constraint too.
This commit is contained in:
Thirunarayanan Balathandayuthapani
2021-04-30 16:39:06 +05:30
parent fd8c68c7fe
commit 9fe681c9e4
4 changed files with 35 additions and 2 deletions

View File

@@ -89,7 +89,7 @@ ALTER TABLE t1 RENAME TO t3;
ERROR HY000: Error on rename of './test/t1' to './test/t3' (errno: 150 "Foreign key constraint is incorrectly formed")
ALTER TABLE t1 FORCE;
TRUNCATE TABLE t1;
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `test`.`t3` (`f2`))
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `test`.`t1` (`f2`))
DROP TABLE t2, t1;
#
# MDEV-24861 Assertion `trx->rsegs.m_redo.rseg' failed