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

Implement EXPLAIN for DDL such as ALTER TABLE

    XMLWordPrintable

Details

    Description

      It would be useful if EXPLAIN supported ALTER TABLE and/or other DDL statements.

      For example, something like this:

      EXPLAIN ALTER TABLE tab ADD COLUMN c varchar(50), ALGORITHM=INPLACE;
      

      And probably also something like this:

      EXPLAIN EXTENDED ALTER TABLE tab ADD COLUMN c varchar(50), ALGORITHM=INPLACE;
      

      The output should probably include:

      • What algorithm will be used (i.e. COPY, INPLACE, NOCOPY, INSTANT).
      • Whether the table will be rebuilt.
      • Whether the table will be locked.
      • If the table is locked, what kind of lock will be used.
      • Whether the table's ROW_FORMAT will be changed.
      • For InnoDB, whether the table will use the non-canonical format that is required to implement some instant alter operations.
      • For InnoDB, whether the table will be in the system tablespace or in a file-per-table tablespace.

      The more basic pieces of information could probably be output by EXPLAIN, and the more detailed pieces of information could probably be output by EXPLAIN EXTENDED.

      Attachments

        Issue Links

          Activity

            People

              ralf.gebhardt Ralf Gebhardt
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 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.