| 1 |
drop table if exists t1, t2; |
| 2 |
create table t1 (a int) engine=innodb; |
| 3 |
create 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. |
| 7 |
flush 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. |
| 15 |
begin; |
| 16 |
insert into t1 values( 1 ); |
| 17 |
commit; |
| 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. |
| 22 |
begin; |
| 23 |
insert into t2 values( 1 ); |
| 24 |
commit; |
| 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. |
| 29 |
begin; |
| 30 |
insert into t1 values( 1 ); |
| 31 |
insert into t2 values( 1 ); |
| 32 |
commit; |
| 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. |
| 36 |
flush 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. |
| 44 |
begin; |
| 45 |
insert into t1 values( 1 ); |
| 46 |
rollback; |
| 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. |
| 51 |
begin; |
| 52 |
insert into t2 values( 1 ); |
| 53 |
rollback; |
| 54 |
Warnings: |
| 55 |
Warning 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. |
| 60 |
begin; |
| 61 |
insert into t1 values( 1 ); |
| 62 |
insert into t2 values( 1 ); |
| 63 |
rollback; |
| 64 |
Warnings: |
| 65 |
Warning 1196 Some non-transactional changed tables couldn't be rolled back |
| 66 |
drop table t1, t2; |