mysql ocp 1z0-888 每日一题(61)

Question: 59
How does the InnoDB storage engine handle deadlocks when they are detected?
A. Both the affected transactions will be rolled back.
B. The affected transactions wait for innodb_lock_wait_timeout seconds, and then roll back.
C. One of the affected transactions will be rolled back, the other is allowed to proceed.
D. The transaction isolation level determines which transaction is rolled back.
E. The innodb_locks_unsafe_for_binlog setting determines which transaction is rolled back.

解析:

这道题问的是已经检测到死锁会如何处理

A错,一个会回滚,一个会正常继续的

B 错,当检测到死锁时会报错而直接回滚,不是解决死锁的

C 正确

D 错决定如何回滚和隔离级别没关系,和事务处理的数据数量有关,会回滚事务(处理的行数)较小的

E 错误,innodb_locks_unsafe_for_binlog最主要的作用就是控制innodb是否对gap加锁,对rollback没影响


Answer: C

猜你喜欢

转载自blog.csdn.net/AkiFreeman/article/details/85915283