MySQL Forums
Forum List  »  InnoDB

SELECT ... FOR UPDATE NOWAIT
Posted by: Bernd Niedergesaess
Date: October 20, 2008 08:45AM

Hi,

when multiple connections/transactions try to select rows from a table and one connection/transaction already holds a lock on it, then all other s are blocked.
This leads very often to terrible situations.

So I guess it would be a big advantage for many many users (as you can find tons of requests on the web), if MySQL could introduce a feature like:
SELECT ... FOR UPDATE NOWAIT

This in essence should simply throw an error, if any other connection/transaction already holds a lock on that row.

I also can not fully understand, why this is so hard to implement, as instead of waiting 'forever until a lock is released' you could simply return this error.

Today it seams impossible to implement such feature.
Any suggestions on how to solve such issues with MySQL 5.x or 6.x (except with the nasty global application or table locks) ?!

Many Greets
Bernd

Options: ReplyQuote


Subject
Views
Written By
Posted
SELECT ... FOR UPDATE NOWAIT
14813
October 20, 2008 08:45AM
4937
October 23, 2008 07:53PM


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.