MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stop_dump_threads.inc
1 # ==== Purpose ====
2 #
3 # Stop all dump threads on the server of the current connection.
4 #
5 # ==== Usage ====
6 #
7 # --source include/stop_dump_threads.inc
8 
9 --let $include_filename= stop_dump_threads.inc
10 --source include/begin_include_file.inc
11 
12 
13 --let $_sdt_show_rpl_debug_info_old= $show_rpl_debug_info
14 --let $show_rpl_debug_info= 1
15 --disable_query_log
16 --disable_result_log
17 
18 --let $_sdt_dump_thread_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND = 'Binlog dump'`
19 
20 while ($_sdt_dump_thread_id != '')
21 {
22  eval KILL $_sdt_dump_thread_id;
23  --let $wait_condition= SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = $_sdt_dump_thread_id
24  --source include/wait_condition.inc
25 
26  --let $_sdt_dump_thread_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND = 'Binlog dump'`
27 }
28 
29 
30 --let $show_rpl_debug_info= $_sdt_show_rpl_debug_info_old
31 
32 --let $include_filename= stop_dump_threads.inc
33 --source include/end_include_file.inc