数据库隔离级别


隔离级别                     脏读(Dirty Read)     不可重复读(NonRepeatable Read)     幻读(Phantom Read)
读未提交(Read uncommitted)     可能                   可能                               可能
读已提交(Read committed)       不可能                  可能                               可能
可重复读(Repeatable read)         不可能                    不可能                              可能
可串行化(Serializable )               不可能                           不可能                               不可能

set auto_commit=0;
update t set name='mm' where id=1;
select name from t where id=1;//结果为'mm'
rollback;//name还是原来的'ww'
若是 commit;//name='mm'

原文地址:https://www.cnblogs.com/datastack/p/3826233.html