1SET DEFAULT_STORAGE_ENGINE='TokuDB';
2DROP TABLE IF EXISTS t1, t2;
3SET @@autocommit=0;
4CREATE TABLE t1 (a int);
5insert into t1 values(1);
6delete from t1 where a=1;
7rollback;
8select * from t1;
9a
10DROP table t1;
11create table t1 (a int, b int, primary key (a));
12insert into t1 values (1,10);
13select * From t1;
14a	b
151	10
16rollback;
17select * From t1;
18a	b
19insert into t1 values (1,10);
20select * From t1;
21a	b
221	10
23update t1 set b=b+5;
24select * From t1;
25a	b
261	15
27update t1 set b=b+5 where a=1;
28select * from t1;
29a	b
301	20
31rollback;
32select * from t1;
33a	b
34insert into t1 values (1,10),(2,20);
35select * From t1;
36a	b
371	10
382	20
39delete from t1 where a > 1;
40select * from t1;
41a	b
421	10
43rollback;
44select * from t1;
45a	b
46insert into t1 values (1,10),(2,20),(3,30);
47select * from t1;
48a	b
491	10
502	20
513	30
52commit;
53select * From t1;
54a	b
551	10
562	20
573	30
58insert into t1 values (4,40),(5,50),(6,60);
59select * from t1;
60a	b
611	10
622	20
633	30
644	40
655	50
666	60
67commit;
68select * from t1;
69a	b
701	10
712	20
723	30
734	40
745	50
756	60
76insert into t1 values (7,70);
77insert into t1 values (8,80), (9,90), (1,10), (10,100);
78ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
79insert into t1 values (11,110);
80rollback;
81select * From t1;
82a	b
831	10
842	20
853	30
864	40
875	50
886	60
89insert into t1 values (7,70);
90insert into t1 values (8,80), (9,90), (1,10), (10,100);
91ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
92insert into t1 values (11,110);
93commit;
94select * From t1;
95a	b
961	10
972	20
983	30
994	40
1005	50
1016	60
1027	70
10311	110
104delete from t1;
105alter table t1 add index (b);
106insert ignore into t1 values (1,10),(2,20),(3,30),(1,10),(4,40);
107Warnings:
108Warning	1062	Duplicate entry '1' for key 'PRIMARY'
109select * From t1;
110a	b
1111	10
1122	20
1133	30
1144	40
115commit;
116insert ignore into t1 values (5,50),(3,30),(6,60),(7,70);
117Warnings:
118Warning	1062	Duplicate entry '3' for key 'PRIMARY'
119select * From t1;
120a	b
1211	10
1222	20
1233	30
1244	40
1255	50
1266	60
1277	70
128rollback;
129select * from t1;
130a	b
1311	10
1322	20
1333	30
1344	40
135insert ignore into t1 values (5,50),(3,30),(6,60),(7,70);
136Warnings:
137Warning	1062	Duplicate entry '3' for key 'PRIMARY'
138select * From t1;
139a	b
1401	10
1412	20
1423	30
1434	40
1445	50
1456	60
1467	70
147commit;
148select * From t1;
149a	b
1501	10
1512	20
1523	30
1534	40
1545	50
1556	60
1567	70
157SET @@autocommit=1;
158drop table t1;
159