How can I clear a transaction deadlock?

后端 未结 3 2062
小鲜肉
小鲜肉 2020-12-15 06:27

Using \'show engine innodb status\' I see that wordpress has two deadlocks. I\'d like to clear these up but I don\'t see an active process for either of these cmds (IE somet

3条回答
  •  心在旅途
    2020-12-15 07:21

    Given some 'innodb status' output like this:

    ---TRANSACTION 0 0, not started, process no 1024, OS thread id 140386055603968
    MySQL thread id 197, query id 771 localhost marc
    show innodb status
    

    you'd want to do

    KILL QUERY 771
    

    to kill one of the two queries that are deadlocked. That'll kill the query, but leave the connection open. if you want to kill the connection, then you'd do KILL 197.

提交回复
热议问题