1# ==== Purpose ====
2#
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.
5#
6# Please use this instead of 'STOP SLAVE SQL_THREAD', to reduce the
7# risk of races in test cases.
8#
9# This will fail if the SQL thread has an error.
10#
11#
12# ==== Usage ====
13#
14# [--let $slave_timeout= NUMBER]
15# [--let $rpl_debug= 1]
16# --source include/stop_slave_sql.inc
17#
18# Parameters:
19#   $slave_timeout
20#     See include/wait_for_slave_param.inc
21#
22#   $rpl_debug
23#     See include/rpl_init.inc
24
25
26--let $include_filename= stop_slave_sql.inc
27--source include/begin_include_file.inc
28
29
30if (!$rpl_debug)
31{
32  --disable_query_log
33}
34
35
36STOP SLAVE SQL_THREAD;
37--source include/wait_for_slave_sql_to_stop.inc
38
39
40--let $include_filename= stop_slave_sql.inc
41--source include/end_include_file.inc
42