select count(1) from user where age < 10; 执行顺序 1 事务T1
insert into user(name,age) values('yyl',5); 执行顺序 2 事务T2
select count(1) from user where age < 10; 执行顺序 3 事务T1
select * from user where id = 1; 执行顺序 1 事务T1
update user set age = 10 where id = 1 ; commit;执行顺序 2 事务T2
select * from user where id = 1; commit; 执行顺序 3 事务T1
select * from user where id = 1; 执行顺序 1 事务T1
update user set age = 10 where id = 1;执行顺序 2 事务T2
// 注意没有commit
select * from user where id = 1; 执行顺序 3 事务T1
ROLLBACK;执行顺序 4事务T2