Details

    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

          Activity

            bb-11.8-monty pushed for QA testing.

            monty Michael Widenius added a comment - bb-11.8-monty pushed for QA testing.

            bb-11.8-monty updated
            All known things are fixed, except the mdl locks that InnoDB needs.

            monty Michael Widenius added a comment - bb-11.8-monty updated All known things are fixed, except the mdl locks that InnoDB needs.
            serg Sergei Golubchik added a comment - - edited See commits https://github.com/MariaDB/server/commit/6ff731317239 https://github.com/MariaDB/server/commit/5ed14c2fdeff https://github.com/MariaDB/server/commit/a6b0394cffb4 https://github.com/MariaDB/server/commit/59e3b88fbd8e https://github.com/MariaDB/server/commit/9c3281fc9679 https://github.com/MariaDB/server/commit/c0fe20dbf24 Please, consider cherry-picking them into bb-11.8-monty
            monty Michael Widenius added a comment - - edited

            Merge of the above commits are now done. Each change has been added to it's original commit
            pushed to bb-11.8-monty

            monty Michael Widenius added a comment - - edited Merge of the above commits are now done. Each change has been added to it's original commit pushed to bb-11.8-monty
            monty Michael Widenius added a comment -

            bb-main-monty is now updated to latest main.

            monty Michael Widenius added a comment - bb-main-monty is now updated to latest main.

            People

              elenst Elena Stepanova
              midenok Aleksey Midenkov
              Votes:
              2 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.