MySQL Forums
Forum List  »  InnoDB

Commit and select race condition?
Posted by: Peter Vahlstrup
Date: March 26, 2014 01:37PM

When I insert a new row, commits the transaction and instantly after commit, try to select the newly inserted row by id in another connection, I sometimes get an empty result.

So how should I understand this phrase from the manual (https://dev.mysql.com/doc/refman/5.6/en/innodb-transaction-model.html)

"A COMMIT means that the changes made in the current transaction are made permanent and become visible to other sessions."

Does the "become visible" just mean that it eventually will be visible to other sessions? how long can it take before it is visible?

I was actually expecting that when commit finished successfully all other sessions could see changes instantly, but that doesn't seem to be the case?

Options: ReplyQuote


Subject
Views
Written By
Posted
Commit and select race condition?
3283
March 26, 2014 01:37PM


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.