Bug#28772, added waiting Until_Log_Pos when slave starting with UNTIL clause...

Bug#28772, added waiting Until_Log_Pos when slave starting with UNTIL clause and then waiting stop of slave. 
It helps to avoid issues when slave starts too slowly.
parent c4813ae3
...@@ -150,7 +150,7 @@ Last_SQL_Errno 0 ...@@ -150,7 +150,7 @@ Last_SQL_Errno 0
Last_SQL_Error Last_SQL_Error
start slave; start slave;
stop slave; stop slave;
start slave until master_log_file='master-bin.000001', master_log_pos=740; start slave sql_thread until master_log_file='master-bin.000001', master_log_pos=740;
SHOW SLAVE STATUS; SHOW SLAVE STATUS;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
...@@ -162,7 +162,7 @@ Read_Master_Log_Pos 750 ...@@ -162,7 +162,7 @@ Read_Master_Log_Pos 750
Relay_Log_File # Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001 Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes Slave_IO_Running No
Slave_SQL_Running No Slave_SQL_Running No
Replicate_Do_DB Replicate_Do_DB
Replicate_Ignore_DB Replicate_Ignore_DB
...@@ -200,7 +200,7 @@ start slave until relay_log_file='slave-relay-bin.000002'; ...@@ -200,7 +200,7 @@ start slave until relay_log_file='slave-relay-bin.000002';
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave sql_thread; start slave;
start slave until master_log_file='master-bin.000001', master_log_pos=740; start slave until master_log_file='master-bin.000001', master_log_pos=740;
Warnings: Warnings:
Note 1254 Slave is already running Note 1254 Slave is already running
...@@ -58,7 +58,10 @@ stop slave; ...@@ -58,7 +58,10 @@ stop slave;
--source include/wait_for_slave_to_stop.inc --source include/wait_for_slave_to_stop.inc
# this should stop immediately as we are already there # this should stop immediately as we are already there
start slave until master_log_file='master-bin.000001', master_log_pos=740; start slave sql_thread until master_log_file='master-bin.000001', master_log_pos=740;
--let $slave_param= Until_Log_Pos
--let $slave_param_value= 740
--source include/wait_for_slave_param.inc
--source include/wait_for_slave_sql_to_stop.inc --source include/wait_for_slave_sql_to_stop.inc
# here the sql slave thread should be stopped # here the sql slave thread should be stopped
--replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 --replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
...@@ -76,5 +79,5 @@ start slave until relay_log_file='slave-relay-bin.000002'; ...@@ -76,5 +79,5 @@ start slave until relay_log_file='slave-relay-bin.000002';
--error 1277 --error 1277
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
# Warning should be given for second command # Warning should be given for second command
start slave sql_thread; start slave;
start slave until master_log_file='master-bin.000001', master_log_pos=740; start slave until master_log_file='master-bin.000001', master_log_pos=740;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment