开发者

Deadlock in queries

开发者 https://www.devze.com 2023-01-15 14:43 出处:网络
I get this exception: Error Code : 1213 Deadlock found when trying to get lock; try restarting transaction

I get this exception:

Error Code : 1213 Deadlock found when trying to get lock; try restarting transaction

I am running 3 delete statements and 1 update statement in a query window. When i run those queries it throws error code 1213 and deadl开发者_如何学Pythonock exception.

My mysql version is 5.0. Please share your views.

Thanks.


A single transaction cannot cause a deadlock. I'm not sure what you mean by a "query window", but if you are running all of those statements on a single connection/transaction, then there is something else that is holding the locks that your statements need.

SHOW ENGINE INNODB STATUS can show you what locks are being held by different connections.

0

精彩评论

暂无评论...
验证码 换一张
取 消