MySQL Forums
Forum List  »  InnoDB

Re: Commit and select race condition?
Posted by: Rick James
Date: March 26, 2014 06:43PM

> I sometimes get an empty result.

Do you mean "record not found"? Or the record was found, but the fields are empty?

Are you doing the COMMIT by executing a COMMIT statemet? Or using autocommit in some way?

INSERTing one row and COMMITting it should make the row 'visible' in a fraction of a second. Before the COMMIT either
* the record does not exist (as far as everyone else is concerned), or
* there is some kind of lock/block delaying things. This sometimes happens with conflicting write, rarely INSERT + SELECT, unless the SELECT is part of a bigger transaction.

> see changes instantly, but that doesn't seem to be the case?

Please provide some actual SQL statements, plus some timings that show that it is not 'instant'.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Commit and select race condition?
1223
March 26, 2014 06:43PM


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.