Restarting transaction in MySQL after deadlock

前端 未结 4 1084
后悔当初
后悔当初 2021-01-18 01:20

I am facing a deadlock in my MySQL. How can I configure MySQL to restart the transaction automatically when it encounters a deadlock?

4条回答
  •  逝去的感伤
    2021-01-18 02:01

    Normally, you must write your applications so that they are always prepared to re-issue a transaction if it gets rolled back because of a deadlock.

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

    The manual suggests that no such configuration option exists.

提交回复
热议问题