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

Make Online DDL to Instant DDL when table is empty

    XMLWordPrintable

Details

    Description

      During prepare phase ha_innobase::prepare_inplace_alter_table() can check whether the table is empty and if it is then it can take S-lock on the
      innodb table. So it eventually blocks concurrent DML to happen on the table. Skip the online alter phase and avoid the old table clustered index
      read. InnoDB can rely on stat_n_rows in dict_table_t to find the table emptiness. InnoDB doesn't have to rely on MDL if relies on InnoDB lock.
      InnoDB could reduce the time taken for DDL if table is empty.

      Attachments

        Issue Links

          Activity

            People

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