Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mysql deadlock detection

Does MySQL always detects the deadlocks automatically? Or the are some situations when MySQL just can't figure out that it's dealing with deadlock?

like image 495
Vadim Samokhin Avatar asked Oct 08 '22 01:10

Vadim Samokhin


1 Answers

According to the docs, MyISAM, a table-level locking storage engine, is deadlock-free.

InnoDB has deadlock detection.

NDB detection is implemented through a timeout. You can set the TransactionDeadlockDetectionTimeout parameter for transactions.

So, whether its with roll backs or timeouts, the deadlock will eventually recover.

like image 123
Marcus Adams Avatar answered Oct 12 '22 19:10

Marcus Adams