MySQL Forums
Forum List  »  InnoDB

Re: Read level locking problem for mysql
Posted by: lata rishi
Date: April 25, 2005 02:21AM

Following procedure is used for every user:

Suppose there are 100 records with the condition

For first user it should select 10 records from that lot:

Begin;
Select * from tablename where field1 > 100 limit 10 for update;
update tablename set field2_status=1;
commit;

For second user it should select next ten records:

Begin;
Select * from tablename where field1 > 100 limit 10 for update;
update tablename set field2_status=1;
commit;



But the problem is once the records are locked by 1st user, second user waits....

Options: ReplyQuote


Subject
Views
Written By
Posted
2906
April 21, 2005 12:30AM
Re: Read level locking problem for mysql
1947
April 25, 2005 02:21AM


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.