XMLWordPrintable

    Details

      Description

      The purpose of this task is to ensure that the following internal operations
      are atomic (either all or nothing) for all storage engines:

      Manage .frm
      Storage engine data dictionary
      Binary log

      This will solve the following things:

      • .frm context and storage engine dictionary is always in sync
      • no #sql-xxxx files if server crashes during alter table
      • binary log will always contain the DDL statement if it succeeded

      The cost of doing the above should not be more than 1-2 sync per DDL.

      High level architecture

      When doing a DDL, store somewhere (either trough write_ddl_log_entry() or
      some new method):

      • Operation
      • Number of tables
      • Table name
      • Table id for original table
      • Table id for resulting table (in case of rename)
      • sql command (for binary log)

      If there is no table id (for example for CSV) we would use the
      timestamp of the files.

      With the above information we would be able to continue from the place
      where the operation failed.

      Low level architecture (to be done before implementation starts)

      Describe in detail the source changes needed for:

      CREATE TABLE
      CREATE TABLE ... SELECT
      DROP TABLE t1,t2,t3,t4;
      RENAME TABLE t1 as t2, t2 as t1;
      ALTER TABLE

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              monty Michael Widenius
              Reporter:
              monty Michael Widenius
              Votes:
              7 Vote for this issue
              Watchers:
              19 Start watching this issue

                Dates

                Created:
                Updated: