3
################## mysql-test\t\ssl_cipher_basic.test #########################
5
# Variable Name: ssl_cipher #
7
# Access Type: Static #
8
# Data Type: filename #
11
# Creation Date: 2008-02-07 #
12
# Author : Sharique Abdullah #
15
# Description:Test Cases of Dynamic System Variable ssl_cipher #
16
# that checks the behavior of this variable in the following ways #
20
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
21
# server-system-variables.html #
23
###############################################################################
25
--echo '#---------------------BS_STVARS_048_01----------------------#'
26
####################################################################
27
# Displaying default value #
28
####################################################################
29
SELECT COUNT(@@GLOBAL.ssl_cipher);
33
--echo '#---------------------BS_STVARS_048_02----------------------#'
34
####################################################################
35
# Check if Value can set #
36
####################################################################
38
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
39
SET @@GLOBAL.ssl_cipher=1;
40
--echo Expected error 'Read only variable'
42
SELECT COUNT(@@GLOBAL.ssl_cipher);
48
--echo '#---------------------BS_STVARS_048_03----------------------#'
49
#################################################################
50
# Check if the value in GLOBAL Table matches value in variable #
51
#################################################################
53
SELECT @@GLOBAL.ssl_cipher = VARIABLE_VALUE
54
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
55
WHERE VARIABLE_NAME='ssl_cipher';
58
SELECT COUNT(@@GLOBAL.ssl_cipher);
61
SELECT COUNT(VARIABLE_VALUE)
62
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
63
WHERE VARIABLE_NAME='ssl_cipher';
68
--echo '#---------------------BS_STVARS_048_04----------------------#'
69
################################################################################
70
# Check if accessing variable with and without GLOBAL point to same variable #
71
################################################################################
72
SELECT @@ssl_cipher = @@GLOBAL.ssl_cipher;
77
--echo '#---------------------BS_STVARS_048_05----------------------#'
78
################################################################################
79
# Check if ssl_cipher can be accessed with and without @@ sign #
80
################################################################################
82
SELECT COUNT(@@ssl_cipher);
85
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
86
SELECT COUNT(@@local.ssl_cipher);
87
--echo Expected error 'Variable is a GLOBAL variable'
89
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
90
SELECT COUNT(@@SESSION.ssl_cipher);
91
--echo Expected error 'Variable is a GLOBAL variable'
93
SELECT COUNT(@@GLOBAL.ssl_cipher);
96
--Error ER_BAD_FIELD_ERROR
97
SELECT ssl_cipher = @@SESSION.ssl_cipher;
98
--echo Expected error 'Readonly variable'