This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
sql> Select <columns> from <table> where <condition> FOR UPDATE;
This puts a Exclusive lock on the selected rows that will be release by either a commit / rollback;
If you fail to provide a where condition then the entire table is locked.
Joined: Feb 28, 2003
what about in MySQL?,
I would like the locking query should work for the following scenario, 1) Having one DB connection 2) lock some rows by one thread 3) using the same connection lock some other rows by the second thread 4) release the lock aquired by the first thread, during this lock relase the second lock should not get relased 5) release the lock aquired by the second thread
is there any row level readlock or writelock exist in MySQL?