#At file:///home/andrei/MySQL/BZR/FIXES/bug36818_2-rpl_server_id1/
2662 Andrei Elkin 2008-06-17
Bug #36818 rpl_server_id1 fails expecting slave has stopped
the test was vulnerable because there was a possibility for the slave io thread start
reconnecting in between of two cycles of source include/wait_for_slave_io_to_stop.inc.
The supposed to stay still slave mananged to re-start because the delay between reconnecting
was apparently small - 1 sec.
At restarting show slave status faces IO running which can happen before comparing the master id
with the local id that is supposed to stop the IO thread.
Fixed with changing master_connect_retry from a small default to an impossible to exceed large.
modified:
mysql-test/suite/rpl/r/rpl_server_id1.result
mysql-test/suite/rpl/t/rpl_server_id1.test
=== modified file 'mysql-test/suite/rpl/r/rpl_server_id1.result'
--- a/mysql-test/suite/rpl/r/rpl_server_id1.result 2008-02-26 21:00:31 +0000
+++ b/mysql-test/suite/rpl/r/rpl_server_id1.result 2008-06-17 19:01:05 +0000
@@ -6,7 +6,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
start slave;
reset master;
stop slave;
-change master to master_port=SLAVE_PORT;
+change master to master_port=SLAVE_PORT, master_connect_retry= 999999;
start slave;
*** must be having the replicate-same-server-id IO thread error ***
show slave status;
@@ -14,7 +14,7 @@ Slave_IO_State
Master_Host 127.0.0.1
Master_User root
Master_Port SLAVE_PORT
-Connect_Retry 1
+Connect_Retry 999999
Master_Log_File
Read_Master_Log_Pos 4
Relay_Log_File slave-relay-bin.000001
=== modified file 'mysql-test/suite/rpl/t/rpl_server_id1.test'
--- a/mysql-test/suite/rpl/t/rpl_server_id1.test 2008-05-20 15:14:03 +0000
+++ b/mysql-test/suite/rpl/t/rpl_server_id1.test 2008-06-17 19:01:05 +0000
@@ -10,9 +10,11 @@ reset master;
# replicate ourselves
stop slave;
-source include/wait_for_slave_to_stop.inc;
--replace_result $SLAVE_MYPORT SLAVE_PORT
-eval change master to master_port=$SLAVE_MYPORT;
+# master_connect_retry needs setting to some high never reachable value.
+# that warrants the slave will be stuck.
+# otherwise the slave can slip away trying to reconnect.
+eval change master to master_port=$SLAVE_MYPORT, master_connect_retry= 999999;
start slave;
--echo *** must be having the replicate-same-server-id IO thread error ***
| Thread |
|---|
| • bzr commit into mysql-6.0 branch (aelkin:2662) Bug#36818 | Andrei Elkin | 17 Jun |