1drop table if exists t1, t2;
2create table t1 (a int) engine=innodb;
3create table t2 (a int) engine=myisam;
4**** Preparing the enviroment to check commit and its effect on status variables.
5**** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
6**** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
7flush status;
8**** Transactional changes which are long enough so they will be flushed to disk...
9**** Expected: binlog_cache_use = 1, binlog_cache_disk_use = 1.
10**** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
11**** Transactional changes which should not be flushed to disk and so should not
12**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
13**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
14**** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
15begin;
16insert into t1 values( 1 );
17commit;
18**** Non-Transactional changes which should not be flushed to disk and so should not
19**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
20**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
21**** Expected: binlog_stmt_cache_use = 2, binlog_stmt_cache_disk_use = 0.
22begin;
23insert into t2 values( 1 );
24commit;
25**** Mixed changes which should not be flushed to disk and so should not
26**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
27**** Expected: binlog_cache_use = 3, binlog_cache_disk_use = 1.
28**** Expected: binlog_stmt_cache_use = 3, binlog_stmt_cache_disk_use = 0.
29begin;
30insert into t1 values( 1 );
31insert into t2 values( 1 );
32commit;
33**** Preparing the enviroment to check abort and its effect on the status variables.
34**** Expected: binlog_cache_use = 0, binlog_cache_disk_use = 0.
35**** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
36flush status;
37**** Transactional changes which are long enough so they will be flushed to disk...
38**** Expected: binlog_cache_use = 1, binlog_cache_disk_use = 1.
39**** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
40**** Transactional changes which should not be flushed to disk and so should not
41**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
42**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
43**** Expected: binlog_stmt_cache_use = 1, binlog_stmt_cache_disk_use = 0.
44begin;
45insert into t1 values( 1 );
46rollback;
47**** Non-Transactional changes which should not be flushed to disk and so should not
48**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
49**** Expected: binlog_cache_use = 2, binlog_cache_disk_use = 1.
50**** Expected: binlog_stmt_cache_use = 2, binlog_stmt_cache_disk_use = 0.
51begin;
52insert into t2 values( 1 );
53rollback;
54Warnings:
55Warning	1196	Some non-transactional changed tables couldn't be rolled back
56**** Mixed changes which should not be flushed to disk and so should not
57**** increase either binlog_cache_disk_use or binlog_stmt_cache_disk_use.
58**** Expected: binlog_cache_use = 3, binlog_cache_disk_use = 1.
59**** Expected: binlog_stmt_cache_use = 3, binlog_stmt_cache_disk_use = 0.
60begin;
61insert into t1 values( 1 );
62insert into t2 values( 1 );
63rollback;
64Warnings:
65Warning	1196	Some non-transactional changed tables couldn't be rolled back
66drop table t1, t2;
67