MVCC solved MySQL, Magic in the RR isolation level reading problem?

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/u013219624/article/details/88877327
1. Data Preparation

Here Insert Picture Description

2. Turn on the transaction 1 (below on this transaction by transaction instead of 1)

Here Insert Picture Description

3. Open transaction 2, and insert a data (hereinafter, to replace this transaction by transaction 2)

Here Insert Picture Description

4. Verify that the transaction records submitted by 2, 1 have not read transaction

Here Insert Picture Description
Indeed, the transaction records submitted affairs 2 1 not read. But the revised transaction records submitted 2 can be found in the

5. Summary

I am not sure that in the end be considered phantom read, record Logically transaction transaction 1 2 submitted should be changed unsuccessful (because the transaction ID to hide the transaction is greater than 2 Transaction Transaction ID 1), but but modified succeeded. Even more surprising is that the investigation did not check out, modify actually modify a success.

Guess you like

Origin blog.csdn.net/u013219624/article/details/88877327