Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-24576

Atomic CREATE TABLE

    XMLWordPrintable

Details

    Description

      The purpose of this task is to ensure that CREATE TABLE is atomic.

      The CREATE logic should be:

      • Log CREATE TABLE/VIEW/SEQUENCE to be created to ddl log
      • Execute statement
      • Mark CREATE done in ddl log with xid
      • Update binary log
      • Mark ddl log entry complete

      During recovery, delete any incomplete objects that are not in the binary log.

      All part of CREATE are now atomic, in the sense that if there is a crash, there will be no temporary tables left and all tables
      will be consistent.

      There is still one thing that should be fixed
      CREATE OR REPLACE TABLE foo ... is, as before, implemented as:

      DROP TABLE IF EXISTS foo;
      CREATE TABLE foo ..

      The problem is that if CREATE TABLE fails or the server crashes during the create, the old table foo will not be recovered.
      MDEV-25292 will fix this.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              monty Michael Widenius
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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