Details
-
New Feature
-
Status: Stalled (View Workflow)
-
Critical
-
Resolution: Unresolved
Description
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
Attachments
Issue Links
- blocks
-
MDEV-4259 transactional DDL
- Open
-
MDEV-27180 Fully atomic partitioning DDL operations
- Stalled
-
MDEV-31138 Enable the test spider/bugfix.mdev_29676 once MDEV-25292 is pushed
- Open
- causes
-
MDEV-28933 CREATE OR REPLACE fails to recreate same constraint name
- Stalled
-
MDEV-28952 Assertion `t->s->tmp_table || thd->mdl_context.is_lock_owner(MDL_key::TABLE, t->s->db.str, t->s->table_name.str, t->reginfo.lock_type >= TL_WRITE_ALLOW_WRITE ? MDL_SHARED_WRITE : MDL_SHARED_READ)' failed
- Closed
-
MDEV-28956 Locking is broken if CREATE OR REPLACE fails under LOCK TABLES
- Closed
-
MDEV-29544 SIGSEGV in HA_CREATE_INFO::finalize_locked_tables
- Closed
-
MDEV-29620 Assertion `next_insert_id == 0' failed in handler::ha_external_lock
- Closed
-
MDEV-29628 Memory leak after CREATE OR REPLACE with foreign key
- Closed
-
MDEV-29664 Assertion `!n_mysql_tables_in_use' failed in innobase_close_connection
- Closed
-
MDEV-29676 Dual thread hang in 'closing tables' and 'Waiting for table metadata lock' on Spider CREATE OR REPLACE TABLE
- Closed
-
MDEV-29680 ASAN heap-use-after-free in myrocks::Rdb_transaction::on_commit upon CREATE OR REPLACE .. SELECT
- Open
-
MDEV-29698 Server crash or assertion failure upon CREATE OR REPLACE with a MERGE table
- Closed
-
MDEV-29699 Assertion `!table_list->table || frm.str || !atomic_replace' failed upon CREATE OR REPLACE with ARCHIVE
- Closed
-
MDEV-29701 Inconsistencies and eventual failure upon CREATE OR REPLACE with foreign keys
- Closed
-
MDEV-29709 Unexpected ER_NO_SUCH_TABLE on CREATE OR REPLACE with further assertion failures
- Closed
-
MDEV-29758 CREATE OR REPLACE .. SELECT of Federated table doesn't store selected values
- Closed
-
MDEV-29767 CREATE OR REPLACE bypasses S3 restriction for table creation
- Closed
-
MDEV-29770 Broken table cannot be CREATE OR REPLACE -ed anymore
- Closed
-
MDEV-29772 CREATE OR REPLACE not atomic for sequences (a.k.a tables with SEQUENCE=1)
- Closed
-
MDEV-29779 Unexpected ER_ERROR_ON_RENAME upon CREATE OR REPLACE
- Closed
-
MDEV-29781 Server crashes in ha_myisammrg::add_children_list upon CREATE OR REPLACE with MERGE
- Closed
-
MDEV-29783 ER_NO_SUCH_TABLE_IN_ENGINE after failed CREATE OR REPLACE with FK violation
- Closed
-
MDEV-29787 CREATE OR REPLACE does not work with custom DATA/INDEX DIRECTORY
- Closed
-
MDEV-29791 ER_NO_SUCH_TABLE_IN_ENGINE or "File not found" upon concurrent DDL with CREATE OR REPLACE
- Closed
-
MDEV-29793 Assertion failure in translog_write_record upon CREATE OR REPLACE
- Closed
-
MDEV-29800 ERROR 1062 (23000): Duplicate entry 'test-t-0' for key 'PRIMARY' on CoR for Spider table, DDL_LOG: Got error 1032 or 12524 when trying to execute action for entry 1/2/3/4/5/6/7 of type 'rename table'
- Closed
-
MDEV-29802 #sql-backup tables are visible upon CREATE OR REPLACE and get stuck in S3 storage
- Closed
-
MDEV-29824 Galera crashes when running CoR for a locked table
- Closed
-
MDEV-29831 Galera crashes when running CoR for a locked table after setting the minimum memory for a user session
- Closed
- is blocked by
-
MDEV-28753 Review InnoDB changes for MDEV-25292
- Closed
-
MDEV-28933 CREATE OR REPLACE fails to recreate same constraint name
- Stalled
-
MDEV-29824 Galera crashes when running CoR for a locked table
- Closed
-
MDEV-29831 Galera crashes when running CoR for a locked table after setting the minimum memory for a user session
- Closed
- is part of
-
MDEV-25921 Implement CREATE TABLE...SELECT in one transaction
- Open
- relates to
-
MDEV-33432 Erroneous CREATE OR REPLACE can cause replication abort
- Open
-
MDEV-24576 Atomic CREATE TABLE
- Closed
-
MDEV-25595 DROP part of failed CREATE OR REPLACE is not written into binary log
- Closed