Debian Codegraph @

mysql-test/suite/sys_vars/inc/bin_relay_log_basename_index.inc

raw
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 --disable_warnings
42 --replace_result $basename REPLACED
43 --eval select * from performance_schema.global_variables where variable_name='$rpl_log_var_name'
44
45 --replace_result $basename REPLACED
46 --eval select * from performance_schema.session_variables where variable_name='$rpl_log_var_name'
47 --enable_warnings
48
49 #
50 # Assert it is read-only
51 #
52 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
53 --eval set global $rpl_log_var_name=1
54
55 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
56 --eval set session $rpl_log_var_name=1
57