SELECT * FROM table WHERE id BETWEEN 4 AND 20 FOR UPDATE; SELECT * FROM table WHERE id BETWEEN 40 AND 50 LOCK IN SHARE MODE;
Regards,
Chris
James Kelty wrote:
Does it have exclusive and shared?
-James
-----Original Message-----
From: Chris Nolan [mailto:[EMAIL PROTECTED] Sent: Monday, February 16, 2004 4:52 AM
To: James Kelty
Cc: [EMAIL PROTECTED]
Subject: Re: Locking
Hi!
Next-key locking essentially doesn't work on rows - it works on indexes. It ensures that "phantom reads" can't happen.
InnoDB does indeed do row-locking. In fact, it has one of the most efficient representations of locks of any relational database.
Regards,
Chris
On Mon, 2004-02-16 at 23:43, James Kelty wrote:
How is 'next-key' locking correctly advertised as 'row-level' locking? I
don't actually see that InnoDB has row-level locking at all. Am I totally
wrong on that?
-James
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]