1
SET DEFAULT_STORAGE_ENGINE = 'TokuDB';
2
DROP TABLE IF EXISTS t1;
4
set session transaction isolation level read committed;
5
create table t1 (n int);
7
savepoint `my_savepoint`;
8
insert into t1 values (7);
10
insert into t1 values (3);
16
rollback to savepoint savept2;
17
rollback to savepoint savept3;
18
ERROR 42000: SAVEPOINT savept3 does not exist
19
rollback to savepoint savept2;
20
release savepoint `my_savepoint`;
24
rollback to savepoint `my_savepoint`;
25
ERROR 42000: SAVEPOINT my_savepoint does not exist
26
rollback to savepoint savept2;
27
ERROR 42000: SAVEPOINT savept2 does not exist
28
insert into t1 values (8);
35
create table t1 (a int, b int, primary key (a));
37
insert into t1 values (1,10);
42
insert into t1 values (2,20);
48
insert into t1 values (3,30);
49
rollback to savepoint a;
57
create table t1 (a int, b int, primary key (a));
59
insert into t1 values (1,10);
64
insert into t1 values (2,20);
70
insert into t1 values (3,30);
81
create table t1 (a int, b int, primary key (a));
83
insert into t1 values (1,10);
88
replace into t1 values (1,100);
93
delete from t1 where a=1;
97
update t1 set b=1000 where a=1;
100
rollback to savepoint c;
103
rollback to savepoint b;
107
rollback to savepoint a;
115
create table t1 (a int, b int, primary key (a));
116
insert into t1 values (1,1);
121
replace into t1 values (1,10);
126
replace into t1 values (1,100);
131
delete from t1 where a=1;
135
update t1 set b=1000 where a=1;
138
rollback to savepoint c;
141
rollback to savepoint b;
145
rollback to savepoint a;
154
create table t1 (a int, b int, primary key (a));
156
insert into t1 values (1,10);
161
replace into t1 values (1,100);
166
delete from t1 where a=1;
170
insert into t1 values (2,20);
191
create table t1 (a int, b int, primary key (a));
193
insert into t1 values (1,10);
198
replace into t1 values (1,100);
203
delete from t1 where a=1;
207
insert into t1 values (2,20);
215
rollback to savepoint b;
227
create table t1 (a int, b int, primary key (a));
229
insert into t1 values (1,10);
230
insert into t1 values (2,20);
232
insert into t1 values (3,30),(4,40);
233
insert into t1 values (5,50),(6,60), (3,333), (7,70);
234
ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
242
insert ignore into t1 values (8,80),(1,100),(9,90);
251
rollback to savepoint b;
258
rollback to savepoint a;
263
insert into t1 value (10,100);
271
rollback to savepoint c;
272
ERROR 42000: SAVEPOINT c does not exist