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

Make Online DDL to Instant DDL when table is empty

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

            bb-10.6-MDEV-23805 33b64f89803042849b16089754506532a46a7eff 2021-11-11T15:12:30+05:30 behaved well in RQG testing.

            mleich Matthias Leich added a comment - bb-10.6- MDEV-23805 33b64f89803042849b16089754506532a46a7eff 2021-11-11T15:12:30+05:30 behaved well in RQG testing.

            This simplification of locking may have made redundant the fixes of the race conditions MDEV-16131 and MDEV-24730. I had to adjust some test cases due to intermittent failures.

            marko Marko Mäkelä added a comment - This simplification of locking may have made redundant the fixes of the race conditions MDEV-16131 and MDEV-24730 . I had to adjust some test cases due to intermittent failures.

            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.