MySql Next-Key Lock Behavior
Posted by:
Bill Wen
Date: December 23, 2024 08:46AM
Regarding the official document version 8.4. Why Next-key behaves like this? "a next-key lock is an index-record lock plus a gap lock on the gap preceding the index record. " For example, I have index on id, query select * from table where id > 3 for update. Other sessions can't insert id = 3. I understand that (2, 3] is the gap preceding the index record but I don't understand why this record need to be locked. Please explain this.
Bill
Subject
Views
Written By
Posted
MySql Next-Key Lock Behavior
402
December 23, 2024 08:46AM
Sorry, only registered users may post in this forum.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.