1SET DEFAULT_STORAGE_ENGINE='TokuDB';
2DROP TABLE IF EXISTS t1, t2;
3create table t1 (a int, b int, primary key (a));
4begin;
5insert into t1 values (1,10), (2,20);
6create table t2 (a int);
7rollback;
8select * from t1;
9a	b
101	10
112	20
12delete from t1;
13begin;
14insert into t1 values (1,10),(2,20);
15select * from t1;
16a	b
171	10
182	20
19alter table t1 add index (b);
20rollback;
21select * From t1;
22a	b
231	10
242	20
25begin;
26insert into t1 values (3,30);
27lock tables t1 write;
28rollback;
29select * from t1;
30a	b
311	10
322	20
333	30
34unlock tables;
35lock tables t1 write;
36insert into t1 values (4,40);
37select * From t1;
38a	b
391	10
402	20
413	30
424	40
43rollback;
44select * from t1;
45a	b
461	10
472	20
483	30
494	40
50insert into t2 values (1);
51ERROR HY000: Table 't2' was not locked with LOCK TABLES
52commit;
53insert into t2 values (1);
54ERROR HY000: Table 't2' was not locked with LOCK TABLES
55unlock tables;
56insert into t2 values (1);
57select * from t1;
58a	b
591	10
602	20
613	30
624	40
63select * from t2;
64a
651
66lock tables t1 write;
67insert into t1 values (5,50);
68begin;
69insert into t2 values (2);
70select * from t1;
71a	b
721	10
732	20
743	30
754	40
765	50
77select * from t2;
78a
791
802
81rollback;
82select * from t1;
83a	b
841	10
852	20
863	30
874	40
885	50
89select * from t2;
90a
911
92drop table t1,t2;
93