mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / include / stop_slave_sql.inc
blobf5075b32fda396adbfa63daf0d299c52fab95173
1 # ==== Purpose ====
3 # Issues STOP SLAVE SQL_THREAD on the current connection. Then waits
4 # until the SQL thread has stopped, or until a timeout is reached.
6 # Please use this instead of 'STOP SLAVE SQL_THREAD', to reduce the
7 # risk of races in test cases.
9 # This will fail if the SQL thread has an error.
12 # ==== Usage ====
14 # [--let $slave_timeout= NUMBER]
15 # [--let $rpl_debug= 1]
16 # --source include/stop_slave_sql.inc
18 # Parameters:
19 #   $slave_timeout
20 #     See include/wait_for_slave_param.inc
22 #   $rpl_debug
23 #     See include/rpl_init.inc
26 --let $include_filename= stop_slave_sql.inc
27 --source include/begin_include_file.inc
30 if (!$rpl_debug)
32   --disable_query_log
36 STOP SLAVE SQL_THREAD;
37 --source include/wait_for_slave_sql_to_stop.inc
40 --let $include_filename= stop_slave_sql.inc
41 --source include/end_include_file.inc