[patch 6/6] Add tests for WL3127 slave side TCP address binding
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-new/mysql-test/t/rpl_change_master.test
- telco-new.orig/mysql-test/t/rpl_change_master.test 2007-06-01 17:03:15.282488750 +1000
+++ telco-new/mysql-test/t/rpl_change_master.test 2007-06-01 17:05:28.002783250 +1000
@@ -35,3 +35,48 @@ connection slave;
sync_with_master;
# End of 4.1 tests
+ +connection slave; +stop slave; +--replace_column 1 # 8 # 9 # 10 # 24 # 34 # +--query_vertical show slave status; +change master to master_bind='127.0.0.1'; +--replace_column 1 # 8 # 9 # 10 # 24 # 34 # +--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_column 8 # 9 # 10 # 24 # 34 # +--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_column 8 # 9 # 10 # 24 # 34 # +--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-new/mysql-test/r/rpl_change_master.result
- telco-new.orig/mysql-test/r/rpl_change_master.result 2007-06-01 17:03:15.362493750 +1000
+++ telco-new/mysql-test/r/rpl_change_master.result 2007-06-01 17:06:06.541191750 +1000
@@ -13,14 +13,185 @@ insert into t1 values(2);
stop slave;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Master_Bind Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert
-# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No
+# 127.0.0.1 root MASTER_MYPORT 0.0.0.0 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No
change master to master_user='root';
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Master_Bind Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert
-# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No
+# 127.0.0.1 root MASTER_MYPORT 0.0.0.0 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No
start slave;
select * from t1;
n
1
2
drop table t1;
+stop slave; +show slave status;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port 9306 +Master_Bind 0.0.0.0 +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 441 +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 # +Master_SSL_Verify_Server_Cert No +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 9306 +Master_Bind 127.0.0.1 +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 441 +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 # +Master_SSL_Verify_Server_Cert No +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 9306 +Master_Bind 127.0.0.1 +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 700 +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 # +Master_SSL_Verify_Server_Cert No +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 9306 +Master_Bind 1.1.1.1 +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 700 +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 # +Master_SSL_Verify_Server_Cert No +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;
--
Stewart Smith
--
MySQL Internals Mailing List
For list archives:
http://lists.mysql.com/internals
To unsubscribe:
http://lists.mysql.com/internals?unsub=lists@pantek.com
Received on Fri Jun 1 04:36:08 2007
This archive was generated by hypermail 2.1.8
: Fri Jun 01 2007 - 04:40:02 EDT
|