类似这个文档的表 https://cloud.tencent.com/developer/article/1903511?pos=comment
你好,我遇到了insert into `identity_info`(`identity_id`,`name`) values('123456789012345678','王五') on duplicate key update `name` = '王五';
死锁的情况,除了自增主键,只有一个唯一索引,以及其他三个联合索引(不唯一),在两个并发的事务执行的sql,唯一索引的值也不同,且表中不存在与它们重复的唯一索引。最终报错:Lock wait timeout exceeded; try restarting transaction。通过公司的工具得知两个事务相互阻塞超过50秒。
相似问题