Re: lock the row selected by a session and lock those rows for other sessions

2008-02-05 Thread Frederic Belleudy
You said: It is not locking the entire table. It's locking the rows you're selecting. If you don't want the second session to hang and wait, then you need to tell it to lock different rows. Well if you read my message, I dont want another script to select the rows that are selected by another

Re: lock the row selected by a session and lock those rows for other sessions

2008-02-05 Thread Baron Schwartz
(Re-CCing the MySQL list) It is not locking the entire table. It's locking the rows you're selecting. If you don't want the second session to hang and wait, then you need to tell it to lock different rows. It might help if you explain what you're trying to accomplish. It sounds like you're try

Re: lock the row selected by a session and lock those rows for other sessions

2008-02-05 Thread Baron Schwartz
1) is the table InnoDB? 2) is AUTOCOMMIT on? On Feb 5, 2008 8:44 AM, Frederic Belleudy <[EMAIL PROTECTED]> wrote: > Select for update is not working like the way I expected it: > > FIRST SESSION: > mysql> start transaction; > Query OK, 0 rows affected (0.00 sec) > > mysql> select video_id from vid

Re: lock the row selected by a session and lock those rows for other sessions

2008-02-05 Thread Frederic Belleudy
Select for update is not working like the way I expected it: FIRST SESSION: mysql> start transaction; Query OK, 0 rows affected (0.00 sec) mysql> select video_id from videos_innodb where state='QUEUE' limit 5 FOR UPDATE; +--+ | video_id | +--+ |1 | |2 | |

Re: lock the row selected by a session and lock those rows for other sessions

2008-02-04 Thread Michael Dykman
SELECT FOR UPDATE On Feb 4, 2008 4:58 PM, Frederic Belleudy <[EMAIL PROTECTED]> wrote: > Hi there, I'm new with innodb and I'm not sure it's good to go with > innodb for my personnal goals. > > Ok, let's assume I 've a table and want to select the first 10 rows from > that table but I want to

lock the row selected by a session and lock those rows for other sessions

2008-02-04 Thread Frederic Belleudy
Hi there, I'm new with innodb and I'm not sure it's good to go with innodb for my personnal goals. Ok, let's assume I 've a table and want to select the first 10 rows from that table but I want to be sure that no other scripts will select the same rows I've previously got by the first script.