MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jonathan Miller Date:October 11 2007 8:26am
Subject:RE: [patch 5/5] Add tests for WL3127 slave side TCP address binding
View as plain text  
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 

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@stripped [mailto:stewart@stripped]
> Sent: Monday, October 08, 2007 8:47 PM
> To: dev-ndb@stripped; dev-public@stripped; tomas@stripped
> Cc: commits@stripped; aelkin@stripped; rsomla@stripped
> 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@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

Thread
[patch 0/5] WL3126/WL3127 TCP bind address (client and replication)stewart9 Oct
  • [patch 3/5] BUG#28827 Partition test needs archive enginestewart9 Oct
  • [patch 1/5] WL3126 TCP address binding for mysql client librarystewart9 Oct
    • Re: [patch 1/5] WL3126 TCP address binding for mysql client libraryAndrei Elkin31 Jan
  • [patch 5/5] Add tests for WL3127 slave side TCP address bindingstewart9 Oct
    • Re: [patch 5/5] Add tests for WL3127 slave side TCP address bindingKristian Nielsen9 Oct
      • Re: [patch 5/5] Add tests for WL3127 slave side TCP address bindingStewart Smith10 Oct
    • RE: [patch 5/5] Add tests for WL3127 slave side TCP address bindingJonathan Miller11 Oct
    • Re: [patch 5/5] Add tests for WL3127 slave side TCP address bindingAndrei Elkin31 Jan
  • [patch 4/5] Update tests and results for WL3127 slave side TCP address bindingstewart9 Oct
  • [patch 2/5] WL3127 slave side TCP address bindingstewart9 Oct
    • Re: [patch 2/5] WL3127 slave side TCP address bindingAndrei Elkin31 Jan
  • Re: [patch 0/5] WL3126/WL3127 TCP bind address (client and replication)Andrei Elkin24 Jan
    • Re: [patch 0/5] WL3126/WL3127 TCP bind address (client andreplication)Stewart Smith14 Feb
  • Re: [patch 0/5] WL3126/WL3127 TCP bind address (client and replication)Andrei Elkin31 Jan
Re: [patch 5/5] Add tests for WL3127 slave side TCP address bindingAndrei Elkin13 Oct
Re: [patch 5/5] Add tests for WL3127 slave side TCP address bindingStewart Smith17 Oct
Re: [patch 2/5] WL3127 slave side TCP address bindingAndrei Elkin31 Jan