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

Set innodb_autoinc_lock_mode=2 by default, and deprecate it

    XMLWordPrintable

Details

    Description

      By default, InnoDB uses excessive statement-level locking on operations that involve AUTO_INCREMENT columns. This was only needed to work around a bug in statement-level replication.

      As noted in MDEV-19577, we can improve statement-level replication so that it will acquire an exclusive InnoDB table lock to protect the AUTO_INCREMENT values. In this way, with the default settings log_bin=OFF or binlog_format=MIXED, no performance penalty will occur.

      By escalating affected operations in binlog_format=STATEMENT to statement-scope table-level locking, we remove the need for InnoDB auto-increment locks. As part of this task, those locks will still be preserved; users may still set innodb_autoinc_lock_mode to 0 or 1 in order to allow the old-style locking to be used.

      The parameter innodb_autoinc_lock_mode and the InnoDB auto-increment locks would be removed in a future major release.

      Attachments

        1. 0001-Add-ifndef-NO_AUTOINC_LOCKS.patch
          19 kB
          Marko Mäkelä
        2. MDEV-27844-durable.pdf
          17 kB
          Axel Schwenke
        3. MDEV-27844-non-durable.pdf
          18 kB
          Axel Schwenke

        Issue Links

          Activity

            People

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