List:General Discussion« Previous MessageNext Message »
From:John Smith Date:August 11 2008 2:34pm
Subject: Re: Locking certain rows in a transaction
View as plain text  
Perrin Harkins wrote:
 > Assuming you're using InnoDB tables, "SELECT...FOR UPDATE" will lock
> the rows as you describe.  It can prevent other inserts and updates to
> neighboring rows as well, depending on what isolation level you're
> running (default is REPEATABLE READ).

Thanks, in fact it even does more than I expected. When another client
tries to read a row previously selected by another client FOR UPDATE, he
will read just fine. If he tries to select it with 'FOR UPDATE', he will
have to wait.

Locking certain rows in a transactionJohn Smith9 Aug
  • Re: Locking certain rows in a transactionPerrin Harkins10 Aug
    • Re: Locking certain rows in a transactionJohn Smith11 Aug