diff options
Diffstat (limited to 'mysql-test/t/rpl_trunc_binlog.test')
-rw-r--r-- | mysql-test/t/rpl_trunc_binlog.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/rpl_trunc_binlog.test b/mysql-test/t/rpl_trunc_binlog.test new file mode 100644 index 00000000000..98138b61ab7 --- /dev/null +++ b/mysql-test/t/rpl_trunc_binlog.test @@ -0,0 +1,25 @@ +# We are testing if a binlog which contains BEGIN but not COMMIT (the master did +# while writing the transaction to the binlog) triggers an error on slave. +# So we use such a truncated binlog and simulate that the master restarted after +# this. + +source include/master-slave.inc; + +connection slave; +# If we are not supporting transactions in the slave, the unfinished transaction +# won't cause any error, so we need to skip the test. In the 4.0 testsuite, the +# slave always runs without InnoDB, so we check for BDB. +source include/have_bdb.inc; +stop slave; +connection master; +flush logs; +system mv -f var/log/master-bin.001 var/log/master-bin.002; +system cp std_data/trunc_binlog.001 var/log/master-bin.001; +connection slave; +reset slave; +start slave; +# can't sync_with_master so we must sleep +sleep 3; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 18 # +show slave status; |