MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
bin_relay_log_basename_index.inc
1 # ==== Usage ====
2 # [--let $rpl_debug=1]
3 # --let $rpl_log_var_name= log_bin_basename|relay_log_basename|...
4 # --source suite/sys_vars/inc/bin_relay_log_basename_index.inc
5 #
6 # $rpl_log_var_name
7 # The name of the variable to test, i.e., one of:
8 # - log_bin_basename
9 # - relay_log_basename
10 # - log_bin_index
11 # - relay_log_index
12 #
13 # $rpl_debug
14 # See include/rpl_init.inc
15 
16 if ($rpl_debug)
17 {
18  --echo Testing variable named: $rpl_log_var_name
19 }
20 
21 --let $basename= `SELECT @@global.$rpl_log_var_name`
22 
23 #
24 # Assert that the variable is indeed only global
25 #
26 --replace_result $basename REPLACED
27 --eval select @@global.$rpl_log_var_name
28 
29 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
30 --eval select @@session.$rpl_log_var_name
31 
32 #
33 # Assert that it is retrievable
34 #
35 --replace_result $basename REPLACED
36 --eval show global variables like '$rpl_log_var_name'
37 
38 --replace_result $basename REPLACED
39 --eval show session variables like '$rpl_log_var_name'
40 
41 --replace_result $basename REPLACED
42 --eval select * from information_schema.global_variables where variable_name='$rpl_log_var_name'
43 
44 --replace_result $basename REPLACED
45 --eval select * from information_schema.session_variables where variable_name='$rpl_log_var_name'
46 
47 #
48 # Assert it is read-only
49 #
50 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
51 --eval set global $rpl_log_var_name=1
52 
53 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
54 --eval set session $rpl_log_var_name=1
55