Test setting the bind address to something sensible
(that should work) and something silly (that shouldn't work)
and test that data does/doesn't get across.
Index: telco/mysql-test/suite/rpl/t/rpl_change_master.test
===================================================================
--- telco.orig/mysql-test/suite/rpl/t/rpl_change_master.test 2007-10-08 11:54:10.631909266
+1000
+++ telco/mysql-test/suite/rpl/t/rpl_change_master.test 2007-10-08 18:18:20.964742030
+1000
@@ -35,3 +35,52 @@ connection slave;
sync_with_master;
# End of 4.1 tests
+--echo master_bind tests
+connection slave;
+stop slave;
+--replace_column 1 # 7 # 8 # 9 # 22 # 23 #
+--replace_result $MASTER_MYPORT MASTER_PORT
+--query_vertical show slave status;
+change master to master_bind='127.0.0.1';
+--replace_result $MASTER_MYPORT MASTER_PORT
+--replace_column 1 # 7 # 8 # 9 # 22 # 23 #
+--query_vertical show slave status;
+start slave;
+connection master;
+create table t1(n int);
+insert into t1 values(1);
+insert into t1 values(2);
+save_master_pos;
+connection slave;
+sync_with_master;
+select * from t1;
+
+connection slave;
+stop slave;
+--replace_result $MASTER_MYPORT MASTER_PORT
+--replace_column 7 # 8 # 9 # 22 # 23 #
+--query_vertical show slave status;
+change master to master_bind='1.1.1.1';
+connection master;
+insert into t1 values (3);
+save_master_pos;
+connection slave;
+start slave;
+--real_sleep 1 # wait for I/O thread to try connection
+--replace_result $MASTER_MYPORT MASTER_PORT
+--replace_column 7 # 8 # 9 # 22 # 23 #
+--query_vertical show slave status;
+select * from t1;
+
+connection slave;
+stop slave;
+change master to master_bind='127.0.0.1';
+start slave;
+sync_with_master;
+select * from t1;
+
+connection master;
+drop table t1;
+save_master_pos;
+connection slave;
+sync_with_master;
Index: telco/mysql-test/suite/rpl/r/rpl_change_master.result
===================================================================
--- telco.orig/mysql-test/suite/rpl/r/rpl_change_master.result 2007-10-08
11:54:10.863920645 +1000
+++ telco/mysql-test/suite/rpl/r/rpl_change_master.result 2007-10-08 18:22:50.249949554
+1000
@@ -98,3 +98,191 @@ n
1
2
drop table t1;
+master_bind tests
+stop slave;
+show slave status;;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port MASTER_PORT
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running No
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master NULL
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno 0
+Last_IO_Error
+Last_SQL_Errno 0
+Last_SQL_Error
+Master_Bind 0.0.0.0
+change master to master_bind='127.0.0.1';
+show slave status;;
+Slave_IO_State #
+Master_Host 127.0.0.1
+Master_User root
+Master_Port MASTER_PORT
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running No
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master NULL
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno 0
+Last_IO_Error
+Last_SQL_Errno 0
+Last_SQL_Error
+Master_Bind 127.0.0.1
+start slave;
+create table t1(n int);
+insert into t1 values(1);
+insert into t1 values(2);
+select * from t1;
+n
+1
+2
+stop slave;
+show slave status;;
+Slave_IO_State
+Master_Host 127.0.0.1
+Master_User root
+Master_Port MASTER_PORT
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running No
+Slave_SQL_Running No
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master NULL
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno 0
+Last_IO_Error
+Last_SQL_Errno 0
+Last_SQL_Error
+Master_Bind 127.0.0.1
+change master to master_bind='1.1.1.1';
+insert into t1 values (3);
+start slave;
+show slave status;;
+Slave_IO_State Connecting to master
+Master_Host 127.0.0.1
+Master_User root
+Master_Port MASTER_PORT
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running No
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master NULL
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno 2004
+Last_IO_Error error connecting to master 'root@stripped:MASTER_PORT' - retry-time: 1
retries: 10
+Last_SQL_Errno 0
+Last_SQL_Error
+Master_Bind 1.1.1.1
+select * from t1;
+n
+1
+2
+stop slave;
+change master to master_bind='127.0.0.1';
+start slave;
+select * from t1;
+n
+1
+2
+3
+drop table t1;
Index: telco/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
===================================================================
--- telco.orig/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result 2007-10-08
12:05:05.276017334 +1000
+++ telco/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result 2007-10-08 12:03:10.642394944
+1000
@@ -153,6 +153,7 @@ Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
+Master_Bind 0.0.0.0
SELECT count(*) "Slave norm" FROM test.regular_tbl;
Slave norm 500
SELECT count(*) "Slave bykey" FROM test.bykey_tbl;
--
Stewart Smith