Re: Locking certain rows in a transaction

2008-08-11 Thread John Smith
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 eve

Re: Locking certain rows in a transaction

2008-08-09 Thread Perrin Harkins
On Sat, Aug 9, 2008 at 8:10 AM, John Smith <[EMAIL PROTECTED]> wrote: > Now here's the question: I need to lock certain rows, so that no other > client can read or write that rows (I want those clients to wait until the > transaction is commited or rolled back). I don't want to lock the entire > ta

Locking certain rows in a transaction

2008-08-09 Thread John Smith
Hi, i'm currently experimenting with nested sets. To insert a new node,, I need 1 SELECT, 2 UPDATE and 1 INSERT statement. Of course all of this wii be packed into a transaction, because the table could get corrupted if not all of the mentioned queries are executed. Now here's the question: I nee