MySQL InnoDB Insert Intent Lock

Source: Internet
Author: User

There is an insert intent lock in the InnoDB, specifically for insert, and if the gap has been locked by gap before insertion, insert will request an insert intent lock. So what is the purpose of this insert intent lock?

1, in order to arouse waiting. Because the gap is already locked, it must be blocked when plugged in. Inserting an intent lock has a blocking function.

2, insert intent Lock is a special clearance lock, since it is a gap lock, why do not directly use clearance lock?

Gap locks are not mutually exclusive, can not be blocked, that is, evoke wait, will cause phantom reading.

3. Why not use record locks or next-key locks?

A record or Next-key lock is requested, and the Next-key lock may be mutually exclusive, which affects the concurrency of the insert.


I do not know whether this understanding is correct, you have studied the insertion intent lock can give a suggestion?

MySQL InnoDB Insert Intent Lock

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.