Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1954

Commit and select race condition? (7 replies)

$
0
0
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?

Viewing all articles
Browse latest Browse all 1954

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>