1213 - Deadlock found when trying to get lock; try restarting transaction 出现这个原因要记住一点就是:innodb的行锁 和解锁都是针对主键索引的。如果查询时根据索引锁表,但更新时却不是通过主键更新, 那么等待的解锁查询的进程将会报1213错误,程序里有可能返回一个null值
1213 - Deadlock found when trying to get lock; try restarting transaction
Posted cxscode
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了1213 - Deadlock found when trying to get lock; try restarting transaction相关的知识,希望对你有一定的参考价值。
以上是关于1213 - Deadlock found when trying to get lock; try restarting transaction的主要内容,如果未能解决你的问题,请参考以下文章
MySQL error : Deadlock found when trying to get lock; try restarting transaction
Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when tr
mysql中update时出现时报错Deadlock found when trying to get lock; try restarting transaction的原因以及解决方式
mysql姝婚攣com.mysql.cj.jdbc.exception.MYSQLTransactionRollbackException Deadlock found when trying to
mysql死锁com.mysql.cj.jdbc.exception.MYSQLTransactionRollbackException Deadlock found when trying to g
mysql中update时出现时报错Deadlock found when trying to get lock; try restarting transaction的原因以及解决方式