MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
restart_slave_sql.inc
1 # ==== Purpose ====
2 #
3 # Provide a earier way to restart SQL thread when you want to stop sql thread
4 # and then start it immediately.
5 #
6 # Sources stop_slave_sql.inc to stop SQL thread on the current connection.
7 # Then issues START SLAVE SQL_THREAD and then waits until
8 # the SQL threads have started, or until a timeout is reached.
9 #
10 # Please use this instead of 'STOP|START SLAVE SQL_THREAD', to reduce the risk of
11 # test case bugs.
12 #
13 #
14 # ==== Usage ====
15 #
16 # [--let $slave_timeout= NUMBER]
17 # [--let $rpl_debug= 1]
18 # --source include/restart_slave_sql.inc
19 #
20 # Parameters:
21 # $slave_timeout
22 # See include/wait_for_slave_param.inc
23 #
24 # $rpl_debug
25 # See include/rpl_init.inc
26 
27 
28 --let $include_filename= restart_slave.inc
29 --source include/begin_include_file.inc
30 
31 
32 if (!$rpl_debug)
33 {
34  --disable_query_log
35 }
36 
37 source include/stop_slave_sql.inc;
38 START SLAVE SQL_THREAD;
39 source include/wait_for_slave_sql_to_start.inc;
40 
41 
42 --let $include_filename= restart_slave.inc
43 --source include/end_include_file.inc