# Test if master cuts binlog at InnoDB crash's recovery, # if the transaction had been written to binlog but not committed into InnoDB # We need InnoDB in the master, and a debug build in the master. # This test is only for NON autocommit mode. # More comments in rpl_crash_binlog_ib_1a.test source include/master-slave.inc; source include/have_debug.inc source include/have_innodb.inc require_os unix ; flush logs; set autocommit=0; set sql_log_bin=0; create table t1(n int) engine=innodb; set sql_log_bin=1; sync_slave_with_master; create table t1(n int) engine=myisam; connection master; insert into t1 values (3); insert into t1 values (4); commit; show master status; insert into t1 values (5); insert into t1 values (6); error 2013; send commit; sleep 4; system sh misc/kill_master.sh ; connection slave; select * from t1; system chmod ugo+r $MYSQL_TEST_DIR/var/log/master-bin.000002 ; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval set @a=load_file("$MYSQL_TEST_DIR/var/log/master-bin.000002"); select length(@a); select @a like "%values (5)%"; # Now we will run rpl_crash_binlog_ib_2b.test to test # if the spurious transaction gets truncated at master's restart.