Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
In MDEV-17938 a second bool parameter was added to the function row_rename_table_for_mysql(), which is part of RENAME TABLE and also other DDL operations that rebuild tables. An earlier parameter bool commit had been removed in MDEV-25506.
In a MDEV-25292 branch bb-main-midenok-MDEV-25292, a parameter bool cmd_alter was added to row_rename_table_for_mysql(). It would have been better to replace the existing bool use_fk parameter with an enum:
enum rename_fk { |
/** ignore FOREIGN KEY constraints */ |
RENAME_IGNORE_FK= 0,
|
/** parse and enforce FOREIGN KEY constaints */ |
RENAME_FK,
|
/** Rename a table as part of a native table-rebuilding DDL operation */ |
RENAME_REBUILD,
|
/** Rename as part of ALTER TABLE...ALGORITHM=COPY */ |
RENAME_ALTER_COPY
|
};
|
Part of this change could simplify some logic around FOREIGN KEY constraints in table-rebuilding operations, such as TRUNCATE TABLE.
Another change that seems to be needed both for MDEV-25506 and MDEV-19191 is simplifying the function dict_get_referenced_table().
Attachments
Issue Links
- blocks
-
MDEV-19191 Partitioning in child tables with foreign keys
-
- In Progress
-
-
MDEV-25292 Atomic CREATE OR REPLACE TABLE
-
- In Progress
-
- is caused by
-
MDEV-17938 Server crash in mem_block_validate or Failing assertion: block->magic_n == MEM_BLOCK_MAGIC_N upon ALTER TABLE after unsuccessful FK addition
-
- Closed
-
- relates to
-
MDEV-25506 Atomic DDL: .frm file is removed and orphan InnoDB tablespace is left behind upon crash recovery
-
- Closed
-
-
MDEV-34953 tablename of CONSTRAINT FOREIGN KEY REFERENCES case error
-
- Confirmed
-
There is updated branch bb-main-midenok-MDEV-25292