Debian Codegraph @

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

raw
1
2
3 ################## mysql-test\t\ssl_key_basic.test ############################
4 # #
5 # Variable Name: ssl_key #
6 # Scope: Global #
7 # Access Type: Static #
8 # Data Type: filename #
9 # #
10 # #
11 # Creation Date: 2008-02-07 #
12 # Author : Sharique Abdullah #
13 # #
14 # #
15 # Description:Test Cases of Dynamic System Variable ssl_key #
16 # that checks the behavior of this variable in the following ways #
17 # * Value Check #
18 # * Scope Check #
19 # #
20 # Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
21 # server-system-variables.html #
22 # #
23 ###############################################################################
24
25
26 --echo '#---------------------BS_STVARS_049_01----------------------#'
27 ####################################################################
28 # Displaying default value #
29 ####################################################################
30 SELECT COUNT(@@GLOBAL.ssl_key);
31 --echo 1 Expected
32
33
34 --echo '#---------------------BS_STVARS_049_02----------------------#'
35 ####################################################################
36 # Check if Value can set #
37 ####################################################################
38
39 --error ER_WRONG_TYPE_FOR_VAR
40 SET @@GLOBAL.ssl_key=1;
41 --echo Expected error 'Read only variable'
42
43 SELECT COUNT(@@GLOBAL.ssl_key);
44 --echo 1 Expected
45
46
47
48
49 --echo '#---------------------BS_STVARS_049_03----------------------#'
50 #################################################################
51 # Check if the value in GLOBAL Table matches value in variable #
52 #################################################################
53
54 --disable_warnings
55 SELECT @@GLOBAL.ssl_key = VARIABLE_VALUE
56 FROM performance_schema.global_variables
57 WHERE VARIABLE_NAME='ssl_key';
58 --enable_warnings
59 --echo 1 Expected
60
61 SELECT COUNT(@@GLOBAL.ssl_key);
62 --echo 1 Expected
63
64 --disable_warnings
65 SELECT COUNT(VARIABLE_VALUE)
66 FROM performance_schema.global_variables
67 WHERE VARIABLE_NAME='ssl_key';
68 --enable_warnings
69 --echo 1 Expected
70
71
72
73 --echo '#---------------------BS_STVARS_049_04----------------------#'
74 ################################################################################
75 # Check if accessing variable with and without GLOBAL point to same variable #
76 ################################################################################
77 SELECT @@ssl_key = @@GLOBAL.ssl_key;
78 --echo 1 Expected
79
80
81
82 --echo '#---------------------BS_STVARS_049_05----------------------#'
83 ################################################################################
84 # Check if ssl_key can be accessed with and without @@ sign #
85 ################################################################################
86
87 SELECT COUNT(@@ssl_key);
88 --echo 1 Expected
89
90 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
91 SELECT COUNT(@@local.ssl_key);
92 --echo Expected error 'Variable is a GLOBAL variable'
93
94 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
95 SELECT COUNT(@@SESSION.ssl_key);
96 --echo Expected error 'Variable is a GLOBAL variable'
97
98 SELECT COUNT(@@GLOBAL.ssl_key);
99 --echo 1 Expected
100
101 --Error ER_BAD_FIELD_ERROR
102 SELECT ssl_key;
103 --echo Expected error 'Unknown column'
104
105