如何解决死锁问题?

时间:2018-09-11 12:31:43

标签: mysql deadlock

INSERT语句中出现死锁错误:

insert into status (userid,lastactivity,lastseen) 
                 values ('10691250','1536136821','1536136821') 
      on duplicate key update lastactivity = '1536136821',
                              lastseen = '1536136821' 

SQL

`insert into status (userid,lastactivity,lastseen) 
                  values ('10691250','1536136821','1536136821') 
      on duplicate key 
      update lastactivity = '1536136821',
             lastseen = '1536136821'`

错误

  

试图获取锁时发现死锁;尝试重新开始交易

0 个答案:

没有答案