Debian Codegraph @

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

raw
1 --echo '#---------------------BS_STVARS_045_01----------------------#'
2 ####################################################################
3 # Displaying default value #
4 ####################################################################
5 SELECT COUNT(@@GLOBAL.admin_ssl_key);
6 --echo 0 Expected
7
8
9 --echo '#---------------------BS_STVARS_045_02----------------------#'
10 ####################################################################
11 # Check if Value can set #
12 ####################################################################
13
14 --error ER_WRONG_TYPE_FOR_VAR
15 SET @@GLOBAL.admin_ssl_key=1;
16 --echo Expected error 'Incorrect argument type'
17
18 SELECT COUNT(@@GLOBAL.admin_ssl_key);
19 --echo 0 Expected
20
21
22
23
24 --echo '#---------------------BS_STVARS_045_03----------------------#'
25 #################################################################
26 # Check if the value in GLOBAL Table matches value in variable #
27 #################################################################
28
29 SELECT VARIABLE_VALUE
30 FROM performance_schema.global_variables
31 WHERE VARIABLE_NAME='admin_ssl_key';
32 --echo NULL Expected
33
34 SELECT COUNT(@@GLOBAL.admin_ssl_key);
35 --echo 0 Expected
36
37 SELECT COUNT(VARIABLE_VALUE)
38 FROM performance_schema.global_variables
39 WHERE VARIABLE_NAME='admin_ssl_key';
40 --echo 1 Expected
41
42
43
44 --echo '#---------------------BS_STVARS_045_04----------------------#'
45 ################################################################################
46 # Check if accessing variable with and without GLOBAL point to same variable #
47 ################################################################################
48 SELECT @@admin_ssl_key = @@GLOBAL.admin_ssl_key;
49 --echo NULL Expected
50
51
52
53 --echo '#---------------------BS_STVARS_045_05----------------------#'
54 ################################################################################
55 # Check if admin_ssl_key can be accessed with and without @@ sign #
56 ################################################################################
57
58 SELECT COUNT(@@admin_ssl_key);
59 --echo 0 Expected
60
61 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
62 SELECT COUNT(@@local.admin_ssl_key);
63 --echo Expected error 'Variable is a GLOBAL variable'
64
65 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
66 SELECT COUNT(@@SESSION.admin_ssl_key);
67 --echo Expected error 'Variable is a GLOBAL variable'
68
69 SELECT COUNT(@@GLOBAL.admin_ssl_key);
70 --echo 0 Expected
71
72 --Error ER_GLOBAL_VARIABLE
73 SET admin_ssl_key = @@GLOBAL.admin_ssl_key;
74 --echo Expected error 'Variable is a GLOBAL variable'