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