What Happens to Your Transactions When ERROR 1205 Occurred

Q

What Happens to Your Transactions When ERROR 1205 Occurred? - MySQL FAQs - Transaction Management: Commit or Rollback

✍: FYIcenter.com

A

If your transaction receives the "Lock wait timeout exceeded" - ERROR 1205, 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".

Note that MySQL server will not touch the other transaction that holds the lock. That means the lock will stay as is. If you repeat your transaction right away, it will be blocked again, and may be timed out again, if the other transaction has not been committed or rolled back yet.

2007-05-11, 5873👍, 0💬