MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
check_slave_param.inc
1 # ==== Purpose ====
2 #
3 # Assert that a given column in SHOW SLAVE STATUS has a given value.
4 #
5 # ==== Usage ====
6 #
7 # --let $slave_param= COLUMN_NAME
8 # --let $slave_param_value= VALUE
9 # [--let $rpl_debug= 1]
10 # --source include/check_slave_param.inc
11 #
12 # Parameters:
13 # $slave_param, $slave_param_value
14 # Column name in output of SHOW SLAVE STATUS that should be checked,
15 # and the expected value. Example:
16 # --let $slave_param= Exec_Master_Log_Pos
17 # --let $slave_param_value= 4711
18 #
19 # $rpl_debug
20 # See include/rpl_init.inc
21 
22 
23 --let $include_filename= check_slave_param.inc [$slave_param]
24 --source include/begin_include_file.inc
25 
26 
27 --let $_param_value= query_get_value(SHOW SLAVE STATUS, $slave_param, 1)
28 if ($_param_value != $slave_param_value) {
29  --source include/show_rpl_debug_info.inc
30  --echo Wrong value for $slave_param. Expected '$slave_param_value', got '$_param_value'
31  --die Wrong value for slave parameter
32 }
33 
34 
35 --let $include_filename= check_slave_param.inc
36 --source include/end_include_file.inc