2003-10-08 11:01:58 +02:00
|
|
|
# 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.
|
2003-10-03 22:13:01 +02:00
|
|
|
|
|
|
|
source include/master-slave.inc;
|
|
|
|
|
|
|
|
connection slave;
|
2003-10-07 20:41:06 +02:00
|
|
|
# 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;
|
2003-10-03 22:13:01 +02:00
|
|
|
stop slave;
|
|
|
|
connection master;
|
|
|
|
flush logs;
|
2003-10-08 11:01:58 +02:00
|
|
|
system mv -f var/log/master-bin.000001 var/log/master-bin.000002;
|
|
|
|
system cp std_data/trunc_binlog.000001 var/log/master-bin.000001;
|
2003-10-03 22:13:01 +02:00
|
|
|
connection slave;
|
|
|
|
reset slave;
|
|
|
|
start slave;
|
|
|
|
# can't sync_with_master so we must sleep
|
|
|
|
sleep 3;
|
|
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
2004-05-19 04:09:10 +02:00
|
|
|
--replace_column 1 # 23 # 33 #
|
2003-10-03 22:13:01 +02:00
|
|
|
show slave status;
|
2005-07-28 02:22:47 +02:00
|
|
|
|
|
|
|
# End of 4.1 tests
|