14.5.5.2 deadlock detection and Rollback deadlock detection and rollback

Source: Internet
Author: User
Tags rollback
14.5.5.2 deadlock detection and Rollback  deadlock detection and rollback

InnoDB automatic transaction deadlock and rollback a transaction

InnoDB try to pick a small transaction to roll back and forth, the size of the transaction is Rows inserted, updated, or deleted the number of determined


InnoDB know the table lock if Innodb_table_locks = 1 (the default) and autocommit = 0, 


MySQL level knows about row locks

Otherwise, InnoDB cannot detect deadlocks a table table is set through a lock tables statement or set through a storage engine.


solve those problems by setting the value of the Innodb_lock_wait_timeout system variable


when InnoDB performs a full transaction rollback, all locks set by the transaction are freed.


However, if just a separate SQL statement is rolled back as an error result,


Some locks set by the statement may be saved.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.