Http://blog.sina.com.cn/s/blog_499740cb0100ugs7.html
The above link is a classic explanation of why MySQL's MVCC partially solves the problem of Phantom reading.
At the same time I need to understand that in business logic, transactions can be scattered in the business code, not to say a statement written. For example, we started a transaction, start transaction. First get the data in the database, then in the business to determine whether the condition conforms to its own business logic, if so, then you can insert a portion of the data. But this time there may be other data inserted, resulting in a conflict, resulting in the current data insertion is unsuccessful. To form a strange phenomenon. So this time select needs to use the lock in share model. This enables the transaction to be started using Next-key technology. The information obtained is guaranteed to be the current read data, not the snapshot read.
Very classic MySQL interpretation of the magic read