The ideal MVCC can solve phantom reading, but what innodb actually implements is not the ideal MVCC.
Innodb really relies on next key lock to solve phantom reads. Because innodb's write operation is actually an exclusive lock operation, the actual implementation of MVCC is used to solve the read concurrency problem.
I finally understood it after reading this link, so I attached it directly http://blog.csdn.net/chen77716/article/details/6742128
The ideal MVCC can solve phantom reading, but what innodb actually implements is not the ideal MVCC.
Innodb really relies on next key lock to solve phantom reads. Because innodb's write operation is actually an exclusive lock operation, the actual implementation of MVCC is used to solve the read concurrency problem.
I finally understood it after reading this link, so I attached it directly
http://blog.csdn.net/chen77716/article/details/6742128