Atomic drop table (
MDEV-23844) does not recover the replaced table if CREATE OR REPLACE TABLE fails.
This is because current, as before, CREATE OR REPLACE TABLE foo ... is implemented as:
DROP TABLE IF EXISTS foo;
CREATE TABLE foo ..
Because of that failed CREATE OR REPLACE TABLE or a crash during the create will lead to lost table, if the original table existed.
This task equips table drop with backing up the old table until the new table was successfully created.
In other words, this task ensures that if one executes CREATE OR REPLACE TABLE foo on an existing table, the table foo will either be the new or old table after the statement has executed, including in the cases the CREATE fails or the server crashes.
NOTE: this change was in a preview release for MariaDB Community Server 10.10.0, but could not be added to 10.10 RC
|Review InnoDB changes for MDEV-25292||Closed|