Commit 9740e4b5 authored by Serge Kozlov's avatar Serge Kozlov
Browse files

Bug#22442.

1. Replace --sleep by wait_* primitive
2. Vertical output for SHOW SLAVE STATUS
3. Updated result file
parent 5fd99149
Loading
Loading
Loading
Loading
+33 −2
Original line number Diff line number Diff line
@@ -20,5 +20,36 @@ master_password='',master_port=SLAVE_PORT;
start slave;
flush logs;
show slave status;
Slave_IO_State	Master_Host	Master_User	Master_Port	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
#	127.0.0.1	root	SLAVE_PORT	60	slave-bin.000001	208	#	#	slave-bin.000001	Yes	Yes							0		0	208	#	None		0	No						#
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	9306
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	98
Relay_Log_File	#
Relay_Log_Pos	#
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
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	98
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	#
+15 −4
Original line number Diff line number Diff line
@@ -12,16 +12,27 @@ stop slave;
eval change master to master_host='127.0.0.1',master_user='root',
 master_password='',master_port=$MASTER_MYPORT;
start slave;

connection master;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval change master to master_host='127.0.0.1',master_user='root',
 master_password='',master_port=$SLAVE_MYPORT;
start slave;
sleep 5;
--source include/wait_for_slave_to_start.inc

# Calculate file name of relay log after flush logs 
let $relay_file= query_get_value(show slave status, Relay_Log_File,1);
let $relay_name= `select substring_index('$relay_file','.',1);`;
let $relay_index= `select substring_index('$relay_file','.',-1);`;
let $relay_index_len= `select length(substring_index('$relay_file','.',-1));`;
let $relay_index_next=`select $relay_index+1`;
let $relay_file=`select concat('$relay_name','.',repeat('0',($relay_index_len-length($relay_index_next))),$relay_index_next);`;
flush logs;
sleep 5;
let $slave_param= Relay_Log_File;
let $slave_param_value= $relay_file;
source include/wait_for_slave_param.inc;
--replace_result $SLAVE_MYPORT SLAVE_PORT
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
--query_vertical show slave status

# End of 4.1 tests