InnoDB gap locks
In MySQL InnoDB at the default REPEATABLE READ level, session A runs SELECT * FROM t WHERE id BETWEEN 10 AND 20 FOR UPDATE inside a transaction. Session B tries INSERT INTO t (id) VALUES (15), and no row with id 15 exists. What happens?
Discussion 0
Join free to post in the discussion.
Related questions
- Why InnoDB over MyISAMDatabase Administrator
- Finding slow MySQL queriesDatabase Administrator
- How InnoDB stores table rowsDatabase Administrator
- What an InnoDB secondary index points toDatabase Administrator
- type = ALL in MySQL EXPLAINDatabase Administrator
- Where is the MySQL query cacheDatabase Administrator
- Emoji fail to save in MySQLDatabase Administrator
- Sizing the InnoDB buffer poolDatabase Administrator