Handling innoDB deadlock

后端 未结 3 610
旧巷少年郎
旧巷少年郎 2021-02-09 06:08

I\'ve been getting a Deadlock found when trying to get lock; try restarting transaction error on my InnoDB tables. Here is the query:

UPDATE views 
         


        
3条回答
  •  孤城傲影
    2021-02-09 06:31

    That's the proper way, as the documentation states:

    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.

    If you want to reduce the occurrence of deadlocks, you must show us the tables DDL and indexes.

提交回复
热议问题