In all the SQL deadlock examples I've seen so far, a deadlock appeared while executing a SELECT
/ UPDATE
etc.
If all my statements were executed successfully, is there any chance the deadlock appears when I COMMIT
?
I'm trying to catch deadlock exceptions with my ORM, and wondering if using try{}
around flush()
is enough, or if it should wrap commit()
as well.
Error: 1213; SQLSTATE: 40001 (ER_LOCK_DEADLOCK)
). Check this state in order to decide whether or not try the transaction again. – Lillis