1SET DEFAULT_STORAGE_ENGINE = 'TokuDB'; 2DROP TABLE IF EXISTS t1; 3create table t1 (n int not null primary key) engine=tokudb; 4set autocommit=0; 5insert into t1 values (4); 6rollback; 7select n, "after rollback" from t1; 8n after rollback 9insert into t1 values (4); 10commit; 11select n, "after commit" from t1; 12n after commit 134 after commit 14commit; 15insert into t1 values (5); 16insert into t1 values (4); 17ERROR 23000: Duplicate entry '4' for key 'PRIMARY' 18commit; 19select n, "after commit" from t1; 20n after commit 214 after commit 225 after commit 23set autocommit=1; 24insert into t1 values (6); 25insert into t1 values (4); 26ERROR 23000: Duplicate entry '4' for key 'PRIMARY' 27select n from t1; 28n 294 305 316 32set autocommit=0; 33begin; 34savepoint `my_savepoint`; 35insert into t1 values (7); 36savepoint `savept2`; 37insert into t1 values (3); 38select n from t1; 39n 403 414 425 436 447 45savepoint savept3; 46rollback to savepoint savept2; 47rollback to savepoint savept3; 48ERROR 42000: SAVEPOINT savept3 does not exist 49rollback to savepoint savept2; 50release savepoint `my_savepoint`; 51select n from t1; 52n 534 545 556 567 57rollback to savepoint `my_savepoint`; 58ERROR 42000: SAVEPOINT my_savepoint does not exist 59rollback to savepoint savept2; 60ERROR 42000: SAVEPOINT savept2 does not exist 61insert into t1 values (8); 62savepoint sv; 63commit; 64savepoint sv; 65set autocommit=1; 66rollback; 67drop table t1; 68