Debian Codegraph @

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

raw
1
2
3 ################## mysql-test\t\ssl_ca_basic.test #############################
4 # #
5 # Variable Name: ssl_ca #
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_ca #
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 -- source include/have_ssl_communication.inc
26
27 --echo '#---------------------BS_STVARS_045_01----------------------#'
28 ####################################################################
29 # Displaying default value #
30 ####################################################################
31 SELECT COUNT(@@GLOBAL.ssl_ca);
32 --echo 1 Expected
33
34
35 --echo '#---------------------BS_STVARS_045_02----------------------#'
36 ####################################################################
37 # Check if Value can set #
38 ####################################################################
39
40 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
41 SET @@GLOBAL.ssl_ca=1;
42 --echo Expected error 'Read only variable'
43
44 SELECT COUNT(@@GLOBAL.ssl_ca);
45 --echo 1 Expected
46
47
48
49
50 --echo '#---------------------BS_STVARS_045_03----------------------#'
51 #################################################################
52 # Check if the value in GLOBAL Table matches value in variable #
53 #################################################################
54
55 SELECT @@GLOBAL.ssl_ca = VARIABLE_VALUE
56 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
57 WHERE VARIABLE_NAME='ssl_ca';
58 --echo 1 Expected
59
60 SELECT COUNT(@@GLOBAL.ssl_ca);
61 --echo 1 Expected
62
63 SELECT COUNT(VARIABLE_VALUE)
64 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
65 WHERE VARIABLE_NAME='ssl_ca';
66 --echo 1 Expected
67
68
69
70 --echo '#---------------------BS_STVARS_045_04----------------------#'
71 ################################################################################
72 # Check if accessing variable with and without GLOBAL point to same variable #
73 ################################################################################
74 SELECT @@ssl_ca = @@GLOBAL.ssl_ca;
75 --echo 1 Expected
76
77
78
79 --echo '#---------------------BS_STVARS_045_05----------------------#'
80 ################################################################################
81 # Check if ssl_ca can be accessed with and without @@ sign #
82 ################################################################################
83
84 SELECT COUNT(@@ssl_ca);
85 --echo 1 Expected
86
87 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
88 SELECT COUNT(@@local.ssl_ca);
89 --echo Expected error 'Variable is a GLOBAL variable'
90
91 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
92 SELECT COUNT(@@SESSION.ssl_ca);
93 --echo Expected error 'Variable is a GLOBAL variable'
94
95 SELECT COUNT(@@GLOBAL.ssl_ca);
96 --echo 1 Expected
97
98 --Error ER_BAD_FIELD_ERROR
99 SELECT ssl_ca = @@SESSION.ssl_ca;
100 --echo Expected error 'Readonly variable'
101
102