mariadb/mysql-test/suite/sys_vars/t/ssl_cert_basic.test
Sergei Golubchik 416d0aebbf more fixes for test cases
mysql-test/suite/innodb/include/restart_and_reinit.inc:
  drop and recreate mysql.innodb* tables when deleting innodb table spaces
mysql-test/t/ssl_8k_key-master.opt:
  with loose- prefix ssl errors are ignored
sql-common/client.c:
  compiler warnings
sql/field.cc:
  use the new function
sql/item.cc:
  don't convert time to double or decimal via longlong,
  this loses sub-second part.
  Use dedicated functions.
sql/item.h:
  incorrect cast_to_int type for params
sql/item_strfunc.cc:
  use the new function
sql/lex.h:
  unused
sql/my_decimal.h:
  helper macro
sql/sql_plugin.cc:
  workaround for a compiler warning
sql/sql_yacc.yy:
  unused
sql/transaction.cc:
  fix the merge for SERVER_STATUS_IN_TRANS_READONLY protocol flag
storage/sphinx/CMakeLists.txt:
  compiler warnings
2012-10-01 13:15:29 +02:00

102 lines
4.1 KiB
Text

################## mysql-test\t\ssl_cert_basic.test ###########################
# #
# Variable Name: ssl_cert #
# Scope: Global #
# Access Type: Static #
# Data Type: filename #
# #
# #
# Creation Date: 2008-02-07 #
# Author : Sharique Abdullah #
# #
# #
# Description:Test Cases of Dynamic System Variable ssl_cert #
# that checks the behavior of this variable in the following ways #
# * Value Check #
# * Scope Check #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
-- source include/have_ssl_communication.inc
--echo '#---------------------BS_STVARS_047_01----------------------#'
####################################################################
# Displaying default value #
####################################################################
SELECT COUNT(@@GLOBAL.ssl_cert);
--echo 1 Expected
--echo '#---------------------BS_STVARS_047_02----------------------#'
####################################################################
# Check if Value can set #
####################################################################
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.ssl_cert=1;
--echo Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.ssl_cert);
--echo 1 Expected
--echo '#---------------------BS_STVARS_047_03----------------------#'
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
SELECT @@GLOBAL.ssl_cert = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='ssl_cert';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.ssl_cert);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='ssl_cert';
--echo 1 Expected
--echo '#---------------------BS_STVARS_047_04----------------------#'
################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
################################################################################
SELECT @@ssl_cert = @@GLOBAL.ssl_cert;
--echo 1 Expected
--echo '#---------------------BS_STVARS_047_05----------------------#'
################################################################################
# Check if ssl_cert can be accessed with and without @@ sign #
################################################################################
SELECT COUNT(@@ssl_cert);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.ssl_cert);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.ssl_cert);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.ssl_cert);
--echo 1 Expected
--Error ER_BAD_FIELD_ERROR
SELECT ssl_cert = @@SESSION.ssl_cert;
--echo Expected error 'Readonly variable'