From: Peter Brawley Date: September 2 2011 4:16pm Subject: Re: locked non-existent row List-Archive: http://lists.mysql.com/mysql/225639 Message-Id: <4E61015C.90103@earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 9/2/2011 6:15 AM, Jochem van Dieten wrote: > On Wed, Aug 31, 2011 at 4:10 AM, Peter Brawley wrote: >> While a transaction in one thread tries to update a non-existent InnoDB row >> with a given key value, an attempt to insert that value in another thread is >> locked out. Does anyone know where this behaviour is documented? > In the manual it is called "gap locking": > http://dev.mysql.com/doc/refman/5.5/en/innodb-record-level-locks.html > http://dev.mysql.com/doc/refman/5.5/en/innodb-next-key-locking.html That makes sense. A reference in http://dev.mysql.com/doc/refman/5.0/en/set-transaction.html#isolevel_repeatable-read to those bits would be helpful to users. PB > > Jochem > > -- > Jochem van Dieten > http://jochem.vandieten.net/ >