开发者

I am using MySql database Can we get the information of last deadlock occur?

I am using MySql database Can we get the information of last deadlock occur?

I mean does the information of deadlocks store in 开发者_JAVA百科database?if yes Can we get them easily?


If you use MySQL with innodb, this might be usefull:

http://dev.mysql.com/doc/refman/5.0/en/innodb-deadlocks.html

Use SHOW ENGINE INNODB STATUS to determine the cause of the latest deadlock

And if you use Myisam, there are no deadlocks:

http://dev.mysql.com/doc/refman/5.0/en/internal-locking.html

MySQL uses table-level locking for MyISAM, MEMORY and MERGE tables [...] Table locking in MySQL is deadlock-free for storage engines that use table-level locking. Deadlock avoidance is managed by always requesting all needed locks at once at the beginning of a query and always locking the tables in the same order.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜