table locking
Hi,
I want to develop a multi-user application using mod_perl 2 with MySQL 5.0.
I have been experimenting via the comaand line mysql interface with row level locking.
If in one window I do
SELECT * FROM IMAGES WHERE IMAGE_ID = 135 FOR UPDATE;
and then in a second command window I do
UPDATE IMAGES SET IMAGE_LOCATION = 'XXX' WHERE IMAGE_ID=135;
MySQL allows the second update to execute and updates the record.
I had expected the seond statement to return an error indicating that the row was locked by another user.
What am I doing wrong to achieve the lock?
Thanks for your help.
Andy
Subject
Written By
Posted
table locking
April 05, 2009 12:30PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.