"Consistent read(即普通select) is the default mode in which InnoDB processes SELECT statements in READ COMMITTED and REPEATABLE READ isolation levels. "

A consistent read does not set any locks on the tables it accesses"


" and therefore other sessions are free to modify those tables at the same time a consistent read is being performed on the table."

不用读锁了,那怎么保证repeatable read?  这就要归功于mysql的MVCC机制了。在MVCC机制中,我们可以理解每个事务对同一份数据有自己的数据空间,你的改动跟我无关(类似于java中的threadlocal)

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.