Collections:
Error: Deadlock Found When Trying to Get Lock in MySQL
What Happens to Your Transactions When ERROR 1213 Occurred in MySQL?
✍: FYIcenter.com
If your transaction receives the "Deadlock found when trying to get lock" - ERROR 1213, MySQL server automatically terminates your transaction and rolls back your data changes of the entire transaction. This is why the error messages tells you to "try restarting transaction".
At the same time, locks owned by the terminated (rolled back) transaction will be released.
MySQL server will not touch the other transaction. But the block will be removed, since the lock owned the terminated transaction is released. The other transaction will be able to continue normally.
Note that MySQL server automatically detects dead locks and resolved them by rollback actions.
2017-07-21, 1312👍, 0💬
Popular Posts:
Where to find answers to frequently asked questions on INSERT, UPDATE and DELETE Statements in MySQL...
What is mscorsvw.exe - Process - Microsoft .NET Framework NGEN in SQL Server? Process mscorsvw.exe i...
How To Count Duplicated Values in a Column in SQL Server? If you have a column with duplicated value...
Where to find answers to frequently asked questions on Using User Defined Functions in SQL Server Tr...
How to download Microsoft SQL Server 2005 Express Edition in SQL Server? Microsoft SQL Server 2005 E...