Skip to content
RED SAGSkills
hard20 pts · first answer countsmysqllocking

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?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions