MySQL Forums
Forum List  »  InnoDB

Re: Getting "Lock wait timeout exceeded;" when using "for update"
Posted by: Rick James
Date: June 04, 2011 09:27AM

The reason for using FOR UPDATE is that you have a statement coming soon that will change the row(s) that the SELECT 'locks'. It seems wrong to use FOR UPDATE outside a BEGIN...COMMIT since there is no way to say "I am through with this row(s)".

Recommend you use explicit transactions.

(Bug 16979 seems irrelevant, since it is talking about INSERTs, AUTO_INCREMENT, and binlogging.)

Options: ReplyQuote




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.