Debian Codegraph @

mysql-test/suite/sys_vars/t/bind_address_basic.test

raw
1
2
3 ################## mysql-test\t\bind_address_basic.test ############################
4 # #
5 # Variable Name: bind_address #
6 # Scope: Global #
7 # Access Type: Static #
8 # Data Type: filename #
9 ###############################################################################
10
11 --echo '#---------------------BS_STVARS_001_01----------------------#'
12 ####################################################################
13 # Displaying default value #
14 ####################################################################
15 SELECT COUNT(@@GLOBAL.bind_address);
16 --echo 1 Expected
17
18
19 --echo '#---------------------BS_STVARS_001_02----------------------#'
20 ####################################################################
21 # Check if Value can set #
22 ####################################################################
23
24 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
25 SET @@GLOBAL.bind_address=1;
26 --echo Expected error 'Read only variable'
27
28 SELECT COUNT(@@GLOBAL.bind_address);
29 --echo 1 Expected
30
31
32
33
34 --echo '#---------------------BS_STVARS_001_03----------------------#'
35 #################################################################
36 # Check if the value in GLOBAL Table matches value in variable #
37 #################################################################
38
39 --disable_warnings
40 SELECT VARIABLE_VALUE = ''
41 FROM performance_schema.global_variables
42 WHERE VARIABLE_NAME='bind_address';
43 --enable_warnings
44 --echo 0 Expected
45
46 SELECT COUNT(@@GLOBAL.bind_address);
47 --echo 1 Expected
48
49 --disable_warnings
50 SELECT COUNT(VARIABLE_VALUE)
51 FROM performance_schema.global_variables
52 WHERE VARIABLE_NAME='bind_address';
53 --enable_warnings
54 --echo 1 Expected
55
56
57
58 --echo '#---------------------BS_STVARS_001_04----------------------#'
59 ################################################################################
60 # Check if accessing variable with and without GLOBAL point to same variable #
61 ################################################################################
62 SELECT @@bind_address is NULL AND @@GLOBAL.bind_address is NULL;
63 --echo 0 Expected
64
65 SELECT @@bind_address is NOT NULL AND @@GLOBAL.bind_address is NOT NULL;
66 --echo 1 Expected
67
68
69
70 --echo '#---------------------BS_STVARS_001_05----------------------#'
71 ################################################################################
72 # Check if bind_address can be accessed with and without @@ sign #
73 ################################################################################
74
75 SELECT COUNT(@@bind_address);
76 --echo 1 Expected
77
78 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
79 SELECT COUNT(@@local.bind_address);
80 --echo Expected error 'Variable is a GLOBAL variable'
81
82 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
83 SELECT COUNT(@@SESSION.bind_address);
84 --echo Expected error 'Variable is a GLOBAL variable'
85
86 SELECT COUNT(@@GLOBAL.bind_address);
87 --echo 1 Expected
88
89 --Error ER_BAD_FIELD_ERROR
90 SELECT bind_address;
91 --echo Expected error 'Unknown column'
92
93