MySQL Forums
Forum List  »  InnoDB

Re: Innodb commit bug complete with no updates
Posted by: Rick James
Date: September 02, 2013 12:30AM

276 Query Select tblID.lastValue From tblID Where tblID.tableName='tblTransferDetails'
276 Query Update tblID Set tblID.lastValue = lastValue + 1 Where tblID.tableName='tblTransferDetails'

The SELECT should be SELECT...FOR UPDATE. Otherwise, another thread can get the same value for lastValue.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Innodb commit bug complete with no updates
700
September 02, 2013 12:30AM


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.