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-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
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
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 |
|
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
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.