MDEV-25642 InnoDB rename table copy DDL fails while dropping the table
When doing a ALTER TABLE ... RENAME, MariaDB doesn't rename original table to #sql-backup, which it does in other cases, but insteads drops the original table directly. However this optimization doesn't work in case of InnoDB table with a foreign key constraint. During copy algorithm, InnoDB fails to rename the foreign key constraint(MDEV-25855). With this optimisation, InnoDB also fails to drop the original table because the table has FOREIGN Key constraint exist in INNODB_SYS_FOREIGN table. This leads to orphan .ibd file in InnoDB dictionary. so disabling this optimization when FK is involved. Reviewer: monty@mariadb.org
Showing
Please register or sign in to comment