Which two statements are true about InnoDB auto-increment locking?
A.
The auto-increment lock can be a table-level lock.
B.
InnoDB never uses table-level locks.
C.
Some settings for innodb_autoinc_lock_mode can help reduce locking.
D.
InnoDB always protects auto-increment updates with a table-level lock.
E.
InnoDB does not use locks to enforce auto-increment uniqueness.
Explanation:
Reference: http://dev.mysql.com/doc/refman/5.6/en/innodb-auto-increment-configurable.html
Incomplete.
I think A, D.
C, D.
I don’t like the “[…]can be[…]” in the first possible answer.
A and C… it can be table level lock if the value of innodb_autoinc_lock_mode is set to 1 or 0 but value 2 doe not use table level locking.
http://dev.mysql.com/doc/refman/5.1/en/innodb-auto-increment-handling.html
A and C
http://dev.mysql.com/doc/refman/5.6/en/innodb-auto-increment-configurable.html
Actually I like C and D
Aggree with you , I pefere C and D.
A,C
https://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_autoinc_lock_mode
A, C
D cant be the right option as in lock mode = interleaved, no table level locks are held.
So A and C