Loading mysql-test/include/wait_for_slave_sql_to_start.inc 0 → 100644 +31 −0 Original line number Diff line number Diff line ################################################### #Author: Mats (based on file written by Jeb) #Date: 2008-05-06 #Purpose: To wait for slave SQL thread to start #Details: # 1) Fill in and setup variables # 2) loop through looking for both # io and sql threads to start # 3) If loops too long die. #################################################### connection slave; let $row_number= 1; let $run= 1; let $counter= 300; while ($run) { let $sql_result= query_get_value("SHOW SLAVE STATUS", Slave_SQL_Running, $row_number); if (`SELECT '$sql_result' = 'Yes'`){ let $run= 0; } sleep 0.1; if (!$counter){ --echo "Failed while waiting for slave SQL to start" query_vertical SHOW SLAVE STATUS; exit; } dec $counter; } mysql-test/suite/rpl/r/rpl_found_rows.result +1 −1 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ sect test count 2 6 0 2 6 183 2 7 0 DROP TABLE t1, logtbl; DROP TABLE t1, t2, logtbl; DROP PROCEDURE just_log; DROP PROCEDURE log_me; DROP PROCEDURE log_me_inner; Loading mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` Last_Error Error 'Table 'test.t1' doesn't exist' on opening tables Skip_Counter 0 Exec_Master_Log_Pos 941 Relay_Log_Space # Loading @@ -55,5 +55,5 @@ Master_SSL_Verify_Server_Cert No Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1146 Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening tables drop table t1, t2; mysql-test/suite/rpl/t/rpl_found_rows.test +1 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ sync_slave_with_master; SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test; connection master; DROP TABLE t1, logtbl; DROP TABLE t1, t2, logtbl; DROP PROCEDURE just_log; DROP PROCEDURE log_me; DROP PROCEDURE log_me_inner; Loading mysql-test/suite/rpl/t/rpl_slave_status.test +3 −2 Original line number Diff line number Diff line Loading @@ -36,15 +36,16 @@ connection slave; # 4. Restart slave without privileges # (slave.err will contain access denied error for this START SLAVE command) stop slave; source include/wait_for_slave_to_stop.inc; start slave; source include/wait_for_slave_sql_to_start.inc; # 5. Make sure Slave_IO_Running = No --replace_result $MASTER_MYPORT MASTER_MYPORT # Column 1 is replaced, since the output can be either # "Connecting to master" or "Waiting for master update" --replace_column 1 # 7 # 8 # 9 # 22 # 23 # 35 # 36 # --vertical_results show slave status; query_vertical show slave status; # Cleanup (Note that slave IO thread is not running) connection slave; Loading Loading
mysql-test/include/wait_for_slave_sql_to_start.inc 0 → 100644 +31 −0 Original line number Diff line number Diff line ################################################### #Author: Mats (based on file written by Jeb) #Date: 2008-05-06 #Purpose: To wait for slave SQL thread to start #Details: # 1) Fill in and setup variables # 2) loop through looking for both # io and sql threads to start # 3) If loops too long die. #################################################### connection slave; let $row_number= 1; let $run= 1; let $counter= 300; while ($run) { let $sql_result= query_get_value("SHOW SLAVE STATUS", Slave_SQL_Running, $row_number); if (`SELECT '$sql_result' = 'Yes'`){ let $run= 0; } sleep 0.1; if (!$counter){ --echo "Failed while waiting for slave SQL to start" query_vertical SHOW SLAVE STATUS; exit; } dec $counter; }
mysql-test/suite/rpl/r/rpl_found_rows.result +1 −1 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ sect test count 2 6 0 2 6 183 2 7 0 DROP TABLE t1, logtbl; DROP TABLE t1, t2, logtbl; DROP PROCEDURE just_log; DROP PROCEDURE log_me; DROP PROCEDURE log_me_inner; Loading
mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1146 Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` Last_Error Error 'Table 'test.t1' doesn't exist' on opening tables Skip_Counter 0 Exec_Master_Log_Pos 941 Relay_Log_Space # Loading @@ -55,5 +55,5 @@ Master_SSL_Verify_Server_Cert No Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1146 Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening tables drop table t1, t2;
mysql-test/suite/rpl/t/rpl_found_rows.test +1 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ sync_slave_with_master; SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test; connection master; DROP TABLE t1, logtbl; DROP TABLE t1, t2, logtbl; DROP PROCEDURE just_log; DROP PROCEDURE log_me; DROP PROCEDURE log_me_inner; Loading
mysql-test/suite/rpl/t/rpl_slave_status.test +3 −2 Original line number Diff line number Diff line Loading @@ -36,15 +36,16 @@ connection slave; # 4. Restart slave without privileges # (slave.err will contain access denied error for this START SLAVE command) stop slave; source include/wait_for_slave_to_stop.inc; start slave; source include/wait_for_slave_sql_to_start.inc; # 5. Make sure Slave_IO_Running = No --replace_result $MASTER_MYPORT MASTER_MYPORT # Column 1 is replaced, since the output can be either # "Connecting to master" or "Waiting for master update" --replace_column 1 # 7 # 8 # 9 # 22 # 23 # 35 # 36 # --vertical_results show slave status; query_vertical show slave status; # Cleanup (Note that slave IO thread is not running) connection slave; Loading