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

Implement atomic multi-table (or multi-partition) CREATE TABLE for InnoDB

    XMLWordPrintable

Details

    Description

      The way how InnoDB writes undo log about CREATE TABLE and DROP TABLE introduces the limitation that only one table may be created or dropped within a transaction.

      We should replace the current mechanism (around trx->table_id) and introduce new undo log records for the following:

      • delete-if-exists a file on rollback (when rolling back CREATE TABLE)
      • delete-if-exists a file on purge (after DROP TABLE has been committed)

      Applying either operation must write MLOG_FILE_DELETE2 to the redo log before actually deleting any files.

      To avoid name clashes between DROP TABLE and subsequent CREATE TABLE by the same name (before the old files were purged), we should probably rename the files to temporary names before dropping. Also the rename operation must be undo logged and redo logged. Furthermore, during normal operation we could delete the files for the dropped table. The deletion by the purge subsystem would only be a fall-back measure for crash recovery.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              2 Vote for this issue
              Watchers:
              7 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.