Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

RE: [patch 5/5] Add tests for WL3127 slave side TCP address binding

From: Jonathan Miller <jmiller(at)mysql.com>
Date: Thu Oct 11 2007 - 04:26:49 EDT


Hi,

Instead of sleep, you may want to try one of the include files such as :

wait_for_slave_to_start.inc

    Wait until the slave to start, as indicated by "SHOW SLAVE STATUS", or at most 30 seconds.

You can read about all of them here:

https://inside.mysql.com/wiki/MTRReplicationInclude#wait_for_slave_to_start. inc

Best wishes,
/Jeb

Jonathan Miller
Austin, Texas USA
Senior QA Developer
MySQL AB www.mysql.com

    __  ___     ___ ____  __
   /  |/  /_ __/ __/ __ \/ /  
  / /|_/ / // /\ \/ /_/ / /__ 
 /_/  /_/\_, /___/\___\_\___/ 
        <___/   www.mysql.com 
Do you need help?X

Jumpstart your cluster!
http://www.mysql.com/consulting/packaged/cluster.html

Get training on clusters
http://www.mysql.com/training/courses/mysql_cluster.html

All-in-one Enterprise-grade Database, Support and Services http://www.mysql.com/network/

> -----Original Message-----
> From: stewart@mysql.com [mailto:stewart@mysql.com]
> Sent: Monday, October 08, 2007 8:47 PM
> To: dev-ndb@mysql.com; dev-public@mysql.com; tomas@mysql.com
> Cc: commits@lists.mysql.com; aelkin@mysql.com; rsomla@mysql.com
> Subject: [patch 5/5] 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/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@127.0.0.1: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

-- 
MySQL Code Commits Mailing List
For list archives: 
http://lists.mysql.com/commits
To unsubscribe:    
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Thu Oct 11 04:28:26 2007

This archive was generated by hypermail 2.1.8 : Thu Jul 03 2008 - 09:41:46 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library