set autocommit = 0;
insert into t1(name) values ("user1");
savepoint p1;
insert into t1(name) values("user2");
svaepoint p2;
insert into t1(name) values("user3");
savepoint p3;
rollback to p2;
//结果是user3数据插入失败
set autocommit = 0;
insert into t1(name) values ("user1");
savepoint p1;
insert into t1(name) values("user2");
svaepoint p2;
insert into t1(name) values("user3");
savepoint p3;
rollback to p2;
//结果是user3数据插入失败