Comment 1 for bug 363134

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

Reason for the deadlock is in table level autoinc lock.
Local bulk mode inserts (autocommit trx) grab autoinc lock and keep it until the end of statement.

Slave applier needs to honor this lock and must wait for it. This is a deadlock, because local autocommit insert cannot proceed past commit phase before slave applier has released TO mutex.

Workaround is to set innodb_autoinc_lock_mode=2. This avoids using autoinc locking altogether.

In the test cluster, hanging does not reproduce with autoinc lock mode 2.