Details
-
New Feature
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
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
Issue Links
- is blocked by
-
MDEV-19577 Replication does not work with innodb_autoinc_lock_mode=2
- Closed
- relates to
-
MDEV-10170 Misleading "Statements writing to a table with an auto-increment column after selecting from another table are unsafe" on DELETE ... SELECT
- Confirmed
-
MDEV-29416 Auto_Increment function broken
- Open