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