Hi!
It depends on the isolation level whether locking reads set next-key locks
(= lock the record AND the gap before it), or only lock the record itself.
http://www.innodb.com/ibman.php#Set.transaction:
"
READ UNCOMMITTED
This is also called dirty read: non-locking SELECTs are performed so that
Hi, got a problem with the key locks, using InnoDB:
The mysql.com Manual reads:
SELECT ... FROM ... LOCK IN SHARE MODE: sets shared next-key locks on all
index records the read encounters.
SELECT ... FROM ... FOR UPDATE: sets exclusive next-key locks on all
index records the read encounters