MySQL Forums
Forum List  »  InnoDB

Re: SELECT FOR UPDATE problem
Posted by: Xan Charbonnet
Date: January 31, 2009 04:25PM

I just spent quite a while trying to figure this out. It turns out the documentation is wrong. The documentation says that SELECT FOR UPDATE prevents other sessions from accessing the rows for reading or writing.

What it actually appears to do is prevent other sessions from acquiring a lock on the rows.

So it prevents reading if the second thread tries a SELECT LOCK IN SHARE MODE or a SELECT FOR UPDATE (or an UPDATE of course), but allows a bare SELECT to go through.

Options: ReplyQuote


Subject
Views
Written By
Posted
13115
November 10, 2008 11:35AM
Re: SELECT FOR UPDATE problem
4596
January 31, 2009 04:25PM


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.