From 83f7a74bd4c5884a3ca082b7d5cc308ffe194ab7 Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Thu, 21 Jan 2010 14:16:12 +0000 Subject: [PATCH] BUG#50397 rpl.rpl_heartbeat_basic fails in mysql-trunk-merge Resetting the master before stopping the slave was generating the message "[ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'could not find next log', Error_code: 1236". In consequence, the test case was failing because the message had not been suppressed. To circumvent the failure, we rewrote the test stopping the slave before resetting the master. We prefer this alternative rather than suppressing the message. --- mysql-test/suite/rpl/r/rpl_heartbeat_basic.result | 13 +++++++------ mysql-test/suite/rpl/t/rpl_heartbeat_basic.test | 14 ++++---------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result index d229e1260dd..25a623b200e 100644 --- a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result +++ b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result @@ -266,15 +266,16 @@ Reload master Heartbeat event received *** Circular replication *** -RESET MASTER; -CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; include/stop_slave.inc -RESET MASTER; -RESET SLAVE; -CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_LOG_FILE='MASTER_BINLOG'; -RESET SLAVE; CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='SLAVE_BINLOG'; include/start_slave.inc +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); INSERT INTO t1 VALUES(1, 'on master'); include/start_slave.inc INSERT INTO t1 VALUES(2, 'on slave'); diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test index 10d327eece0..739cbe155ca 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test @@ -473,23 +473,17 @@ let $status_var_comparsion= >; # Circular replication --echo *** Circular replication *** # Configure circular replication ---connection master -RESET MASTER; -let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1); -CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); ---sync_slave_with_master +--source include/master-slave-reset.inc +--connection slave --source include/stop_slave.inc -RESET MASTER; let $slave_binlog= query_get_value(SHOW MASTER STATUS, File, 1); -RESET SLAVE; ---replace_result $MASTER_MYPORT MASTER_PORT $master_binlog MASTER_BINLOG -eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_LOG_FILE='$master_binlog'; --connection master -RESET SLAVE; --replace_result $SLAVE_MYPORT SLAVE_PORT $slave_binlog SLAVE_BINLOG eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$slave_binlog'; --source include/start_slave.inc + # Insert data on master and on slave and make sure that it replicated for both directions +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); INSERT INTO t1 VALUES(1, 'on master'); --save_master_pos --connection slave