diff options
Diffstat (limited to 'mysql-test/suite/sys_vars/t')
17 files changed, 1 insertions, 1648 deletions
diff --git a/mysql-test/suite/sys_vars/t/engine_condition_pushdown_basic.test b/mysql-test/suite/sys_vars/t/engine_condition_pushdown_basic.test deleted file mode 100644 index ab9bfc3dd6a..00000000000 --- a/mysql-test/suite/sys_vars/t/engine_condition_pushdown_basic.test +++ /dev/null @@ -1,267 +0,0 @@ -############## mysql-test\t\engine_condition_pushdown_basic.test ############## -# # -# Variable Name: engine_condition_pushdown # -# Scope: GLOBAL | SESSION # -# Access Type: Dynamic # -# Data Type: boolean # -# Default Value: OFF # -# Valid Values: ON, OFF # -# # -# # -# Creation Date: 2008-02-07 # -# Author: Rizwan # -# # -# Description: Test Cases of Dynamic System Variable engine_condition_pushdown# -# that checks the behavior of this variable in the following ways# -# * Default Value # -# * Valid & Invalid values # -# * Scope & Access method # -# * Data Integrity # -# # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-system-variables.html # -# # -############################################################################### - ---source include/load_sysvars.inc - -######################################################################## -# START OF engine_condition_pushdown TESTS # -######################################################################## - - -############################################################################### -# Saving initial value of engine_condition_pushdown in a temporary variable # -############################################################################### - -SET @session_start_value = @@session.engine_condition_pushdown; -SELECT @session_start_value; - -SET @global_start_value = @@global.engine_condition_pushdown; -SELECT @global_start_value; - -# same for optimizer_switch -select @old_session_opt_switch:=@@session.optimizer_switch, -@old_global_opt_switch:=@@global.optimizer_switch; - ---echo '#--------------------FN_DYNVARS_028_01------------------------#' -######################################################################## -# Display the DEFAULT value of engine_condition_pushdown # -######################################################################## - -SET @@session.engine_condition_pushdown = 0; -SET @@session.engine_condition_pushdown = DEFAULT; -SELECT @@session.engine_condition_pushdown; - -SET @@global.engine_condition_pushdown = 0; -SET @@global.engine_condition_pushdown = DEFAULT; -SELECT @@global.engine_condition_pushdown; - ---echo '#---------------------FN_DYNVARS_028_02-------------------------#' -############################################################################### -# Check if engine_condition_pushdown can be accessed with and without @@ sign # -############################################################################### - -SET engine_condition_pushdown = 1; -SELECT @@engine_condition_pushdown; - ---Error ER_UNKNOWN_TABLE -SELECT session.engine_condition_pushdown; - ---Error ER_UNKNOWN_TABLE -SELECT local.engine_condition_pushdown; - ---Error ER_UNKNOWN_TABLE -SELECT global.engine_condition_pushdown; - -SET session engine_condition_pushdown = 0; -SELECT @@session.engine_condition_pushdown; - -SET global engine_condition_pushdown = 0; -SELECT @@global.engine_condition_pushdown; - - ---echo '#--------------------FN_DYNVARS_028_03------------------------#' -########################################################################## -# change the value of engine_condition_pushdown to a valid value # -########################################################################## - -SET @@session.engine_condition_pushdown = 0; -SELECT @@session.engine_condition_pushdown; -SET @@session.engine_condition_pushdown = 1; -SELECT @@session.engine_condition_pushdown; - - -SET @@global.engine_condition_pushdown = 0; -SELECT @@global.engine_condition_pushdown; -SET @@global.engine_condition_pushdown = 1; -SELECT @@global.engine_condition_pushdown; - - ---echo '#--------------------FN_DYNVARS_028_04-------------------------#' -########################################################################### -# Change the value of engine_condition_pushdown to invalid value # -########################################################################### - ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.engine_condition_pushdown = -1; ---Error ER_WRONG_TYPE_FOR_VAR -SET @@session.engine_condition_pushdown = 1.6; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.engine_condition_pushdown = "T"; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.engine_condition_pushdown = "Y"; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.engine_condition_pushdown = TRÜE; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.engine_condition_pushdown = ÕN; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.engine_condition_pushdown = OF; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.engine_condition_pushdown = ÓFF; - - ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.engine_condition_pushdown = -1; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.engine_condition_pushdown = 2; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.engine_condition_pushdown = "T"; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.engine_condition_pushdown = "Y"; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.engine_condition_pushdown = TRÜE; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.engine_condition_pushdown = ÕN; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.engine_condition_pushdown = OF; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.engine_condition_pushdown = ÓFF; - - ---echo '#-------------------FN_DYNVARS_028_05----------------------------#' -########################################################################### -# Test if changing global variable effects session and vice versa # -########################################################################### - -SET @@global.engine_condition_pushdown = 0; -SET @@session.engine_condition_pushdown = 1; -SELECT @@global.engine_condition_pushdown AS res_is_0; - -SET @@global.engine_condition_pushdown = 0; -SELECT @@session.engine_condition_pushdown AS res_is_1; - ---echo '#----------------------FN_DYNVARS_028_06------------------------#' -######################################################################### -# Check if the value in GLOBAL Table matches value in variable # -######################################################################### - -SELECT IF(@@global.engine_condition_pushdown, "ON", "OFF") = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='engine_condition_pushdown'; -SELECT @@global.engine_condition_pushdown; -SELECT VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='engine_condition_pushdown'; - ---echo '#----------------------FN_DYNVARS_028_07------------------------#' -######################################################################### -# Check if the value in SESSION Table matches value in variable # -######################################################################### - -SELECT IF(@@session.engine_condition_pushdown, "ON", "OFF") = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='engine_condition_pushdown'; -SELECT @@session.engine_condition_pushdown; -SELECT VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='engine_condition_pushdown'; - - ---echo '#---------------------FN_DYNVARS_028_08-------------------------#' -################################################################### -# Check if ON and OFF values can be used on variable # -################################################################### - -SET @@session.engine_condition_pushdown = OFF; -SELECT @@session.engine_condition_pushdown; -SET @@session.engine_condition_pushdown = ON; -SELECT @@session.engine_condition_pushdown; - -SET @@global.engine_condition_pushdown = OFF; -SELECT @@global.engine_condition_pushdown; -SET @@global.engine_condition_pushdown = ON; -SELECT @@global.engine_condition_pushdown; - ---echo '#---------------------FN_DYNVARS_028_09----------------------#' -################################################################### -# Check if TRUE and FALSE values can be used on variable # -################################################################### - -SET @@session.engine_condition_pushdown = TRUE; -SELECT @@session.engine_condition_pushdown; -SET @@session.engine_condition_pushdown = FALSE; -SELECT @@session.engine_condition_pushdown; - -SET @@global.engine_condition_pushdown = TRUE; -SELECT @@global.engine_condition_pushdown; -SET @@global.engine_condition_pushdown = FALSE; -SELECT @@global.engine_condition_pushdown; - ---echo Check that @@engine_condition_pushdown influences ---echo @@optimizer_switch and vice-versa -select @@session.engine_condition_pushdown, -@@global.engine_condition_pushdown, -@@session.optimizer_switch, @@global.optimizer_switch; -set @@session.engine_condition_pushdown = TRUE; -select @@session.engine_condition_pushdown, -@@global.engine_condition_pushdown, -@@session.optimizer_switch, @@global.optimizer_switch; -set @@session.engine_condition_pushdown = FALSE; -select @@session.engine_condition_pushdown, -@@global.engine_condition_pushdown, -@@session.optimizer_switch, @@global.optimizer_switch; -set @@global.engine_condition_pushdown = TRUE; -select @@session.engine_condition_pushdown, -@@global.engine_condition_pushdown, -@@session.optimizer_switch, @@global.optimizer_switch; -set @@global.engine_condition_pushdown = FALSE; -select @@session.engine_condition_pushdown, -@@global.engine_condition_pushdown, -@@session.optimizer_switch, @@global.optimizer_switch; -set @@session.optimizer_switch = "engine_condition_pushdown=on"; -select @@session.engine_condition_pushdown, -@@global.engine_condition_pushdown, -@@session.optimizer_switch, @@global.optimizer_switch; -set @@session.optimizer_switch = "engine_condition_pushdown=off"; -select @@session.engine_condition_pushdown, -@@global.engine_condition_pushdown, -@@session.optimizer_switch, @@global.optimizer_switch; -set @@global.optimizer_switch = "engine_condition_pushdown=on"; -select @@session.engine_condition_pushdown, -@@global.engine_condition_pushdown, -@@session.optimizer_switch, @@global.optimizer_switch; -set @@global.optimizer_switch = "engine_condition_pushdown=off"; -select @@session.engine_condition_pushdown, -@@global.engine_condition_pushdown, -@@session.optimizer_switch, @@global.optimizer_switch; - -############################## -# Restore initial value # -############################## - -SET @@session.engine_condition_pushdown = @session_start_value; -SELECT @@session.engine_condition_pushdown; - -SET @@global.engine_condition_pushdown = @global_start_value; -SELECT @@global.engine_condition_pushdown; - -set @session.optimizer_switch=@old_session_opt_switch, -@@global.optimizer_switch=@old_global_opt_switch; -select @@session.engine_condition_pushdown, -@@global.engine_condition_pushdown, -@@session.optimizer_switch, @@global.optimizer_switch; - -############################################################### -# END OF engine_condition_pushdown TESTS # -############################################################### diff --git a/mysql-test/suite/sys_vars/t/have_csv_basic.test b/mysql-test/suite/sys_vars/t/have_csv_basic.test deleted file mode 100644 index 12081ff270e..00000000000 --- a/mysql-test/suite/sys_vars/t/have_csv_basic.test +++ /dev/null @@ -1,100 +0,0 @@ - - -################## mysql-test\t\have_csv_basic.test ########################### -# # -# Variable Name: have_csv # -# Scope: Global # -# Access Type: Static # -# Data Type: boolean # -# # -# # -# Creation Date: 2008-02-07 # -# Author : Sharique Abdullah # -# # -# # -# Description:Test Cases of Dynamic System Variable have_csv # -# 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 # -# # -############################################################################### - ---echo '#---------------------BS_STVARS_008_01----------------------#' -#################################################################### -# Displaying default value # -#################################################################### -SELECT COUNT(@@GLOBAL.have_csv); ---echo 1 Expected - - ---echo '#---------------------BS_STVARS_008_02----------------------#' -#################################################################### -# Check if Value can set # -#################################################################### - ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@GLOBAL.have_csv=1; ---echo Expected error 'Read only variable' - -SELECT COUNT(@@GLOBAL.have_csv); ---echo 1 Expected - - - - ---echo '#---------------------BS_STVARS_008_03----------------------#' -################################################################# -# Check if the value in GLOBAL Table matches value in variable # -################################################################# - -SELECT @@GLOBAL.have_csv = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='have_csv'; ---echo 1 Expected - -SELECT COUNT(@@GLOBAL.have_csv); ---echo 1 Expected - -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='have_csv'; ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_008_04----------------------#' -################################################################################ -# Check if accessing variable with and without GLOBAL point to same variable # -################################################################################ -SELECT @@have_csv = @@GLOBAL.have_csv; ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_008_05----------------------#' -################################################################################ -# Check if have_csv can be accessed with and without @@ sign # -################################################################################ - -SELECT COUNT(@@have_csv); ---echo 1 Expected - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@local.have_csv); ---echo Expected error 'Variable is a GLOBAL variable' - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@SESSION.have_csv); ---echo Expected error 'Variable is a GLOBAL variable' - -SELECT COUNT(@@GLOBAL.have_csv); ---echo 1 Expected - ---Error ER_BAD_FIELD_ERROR -SELECT have_csv = @@SESSION.have_csv; ---echo Expected error 'Readonly variable' - - diff --git a/mysql-test/suite/sys_vars/t/have_innodb_basic.test b/mysql-test/suite/sys_vars/t/have_innodb_basic.test deleted file mode 100644 index 9ae1bb0d443..00000000000 --- a/mysql-test/suite/sys_vars/t/have_innodb_basic.test +++ /dev/null @@ -1,100 +0,0 @@ - - -################## mysql-test\t\have_innodb_basic.test ######################## -# # -# Variable Name: have_innodb # -# Scope: Global # -# Access Type: Static # -# Data Type: boolean # -# # -# # -# Creation Date: 2008-02-07 # -# Author : Sharique Abdullah # -# # -# # -# Description:Test Cases of Dynamic System Variable have_innodb # -# 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 # -# # -############################################################################### - ---echo '#---------------------BS_STVARS_011_01----------------------#' -#################################################################### -# Displaying default value # -#################################################################### -SELECT COUNT(@@GLOBAL.have_innodb); ---echo 1 Expected - - ---echo '#---------------------BS_STVARS_011_02----------------------#' -#################################################################### -# Check if Value can set # -#################################################################### - ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@GLOBAL.have_innodb=1; ---echo Expected error 'Read only variable' - -SELECT COUNT(@@GLOBAL.have_innodb); ---echo 1 Expected - - - - ---echo '#---------------------BS_STVARS_011_03----------------------#' -################################################################# -# Check if the value in GLOBAL Table matches value in variable # -################################################################# - -SELECT @@GLOBAL.have_innodb = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='have_innodb'; ---echo 1 Expected - -SELECT COUNT(@@GLOBAL.have_innodb); ---echo 1 Expected - -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='have_innodb'; ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_011_04----------------------#' -################################################################################ -# Check if accessing variable with and without GLOBAL point to same variable # -################################################################################ -SELECT @@have_innodb = @@GLOBAL.have_innodb; ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_011_05----------------------#' -################################################################################ -# Check if have_innodb can be accessed with and without @@ sign # -################################################################################ - -SELECT COUNT(@@have_innodb); ---echo 1 Expected - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@local.have_innodb); ---echo Expected error 'Variable is a GLOBAL variable' - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@SESSION.have_innodb); ---echo Expected error 'Variable is a GLOBAL variable' - -SELECT COUNT(@@GLOBAL.have_innodb); ---echo 1 Expected - ---Error ER_BAD_FIELD_ERROR -SELECT have_innodb = @@SESSION.have_innodb; ---echo Expected error 'Readonly variable' - - diff --git a/mysql-test/suite/sys_vars/t/have_ndbcluster_basic.test b/mysql-test/suite/sys_vars/t/have_ndbcluster_basic.test deleted file mode 100644 index 1ac341ff62e..00000000000 --- a/mysql-test/suite/sys_vars/t/have_ndbcluster_basic.test +++ /dev/null @@ -1,100 +0,0 @@ - - -################## mysql-test\t\have_ndbcluster_basic.test #################### -# # -# Variable Name: have_ndbcluster # -# Scope: Global # -# Access Type: Static # -# Data Type: boolean # -# # -# # -# Creation Date: 2008-02-07 # -# Author : Sharique Abdullah # -# # -# # -# Description:Test Cases of Dynamic System Variable have_ndbcluster # -# 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 # -# # -############################################################################### - ---echo '#---------------------BS_STVARS_012_01----------------------#' -#################################################################### -# Displaying default value # -#################################################################### -SELECT COUNT(@@GLOBAL.have_ndbcluster); ---echo 1 Expected - - ---echo '#---------------------BS_STVARS_012_02----------------------#' -#################################################################### -# Check if Value can set # -#################################################################### - ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@GLOBAL.have_ndbcluster=1; ---echo Expected error 'Read only variable' - -SELECT COUNT(@@GLOBAL.have_ndbcluster); ---echo 1 Expected - - - - ---echo '#---------------------BS_STVARS_012_03----------------------#' -################################################################# -# Check if the value in GLOBAL Table matches value in variable # -################################################################# - -SELECT @@GLOBAL.have_ndbcluster = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='have_ndbcluster'; ---echo 1 Expected - -SELECT COUNT(@@GLOBAL.have_ndbcluster); ---echo 1 Expected - -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='have_ndbcluster'; ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_012_04----------------------#' -################################################################################ -# Check if accessing variable with and without GLOBAL point to same variable # -################################################################################ -SELECT @@have_ndbcluster = @@GLOBAL.have_ndbcluster; ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_012_05----------------------#' -################################################################################ -# Check if have_ndbcluster can be accessed with and without @@ sign # -################################################################################ - -SELECT COUNT(@@have_ndbcluster); ---echo 1 Expected - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@local.have_ndbcluster); ---echo Expected error 'Variable is a GLOBAL variable' - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@SESSION.have_ndbcluster); ---echo Expected error 'Variable is a GLOBAL variable' - -SELECT COUNT(@@GLOBAL.have_ndbcluster); ---echo 1 Expected - ---Error ER_BAD_FIELD_ERROR -SELECT have_ndbcluster = @@SESSION.have_ndbcluster; ---echo Expected error 'Readonly variable' - - diff --git a/mysql-test/suite/sys_vars/t/have_partitioning_basic.test b/mysql-test/suite/sys_vars/t/have_partitioning_basic.test deleted file mode 100644 index b37abdb1498..00000000000 --- a/mysql-test/suite/sys_vars/t/have_partitioning_basic.test +++ /dev/null @@ -1,100 +0,0 @@ - - -################## mysql-test\t\have_partitioning_basic.test ################## -# # -# Variable Name: have_partitioning # -# Scope: Global # -# Access Type: Static # -# Data Type: boolean # -# # -# # -# Creation Date: 2008-02-07 # -# Author : Sharique Abdullah # -# # -# # -# Description:Test Cases of Dynamic System Variable have_partitioning # -# 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 # -# # -############################################################################### - ---echo '#---------------------BS_STVARS_014_01----------------------#' -#################################################################### -# Displaying default value # -#################################################################### -SELECT COUNT(@@GLOBAL.have_partitioning); ---echo 1 Expected - - ---echo '#---------------------BS_STVARS_014_02----------------------#' -#################################################################### -# Check if Value can set # -#################################################################### - ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@GLOBAL.have_partitioning=1; ---echo Expected error 'Read only variable' - -SELECT COUNT(@@GLOBAL.have_partitioning); ---echo 1 Expected - - - - ---echo '#---------------------BS_STVARS_014_03----------------------#' -################################################################# -# Check if the value in GLOBAL Table matches value in variable # -################################################################# - -SELECT @@GLOBAL.have_partitioning = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='have_partitioning'; ---echo 1 Expected - -SELECT COUNT(@@GLOBAL.have_partitioning); ---echo 1 Expected - -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='have_partitioning'; ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_014_04----------------------#' -################################################################################ -# Check if accessing variable with and without GLOBAL point to same variable # -################################################################################ -SELECT @@have_partitioning = @@GLOBAL.have_partitioning; ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_014_05----------------------#' -################################################################################ -# Check if have_partitioning can be accessed with and without @@ sign # -################################################################################ - -SELECT COUNT(@@have_partitioning); ---echo 1 Expected - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@local.have_partitioning); ---echo Expected error 'Variable is a GLOBAL variable' - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@SESSION.have_partitioning); ---echo Expected error 'Variable is a GLOBAL variable' - -SELECT COUNT(@@GLOBAL.have_partitioning); ---echo 1 Expected - ---Error ER_BAD_FIELD_ERROR -SELECT have_partitioning = @@SESSION.have_partitioning; ---echo Expected error 'Readonly variable' - - diff --git a/mysql-test/suite/sys_vars/t/log_basic.test b/mysql-test/suite/sys_vars/t/log_basic.test deleted file mode 100644 index 74b344cff6d..00000000000 --- a/mysql-test/suite/sys_vars/t/log_basic.test +++ /dev/null @@ -1,62 +0,0 @@ -###################### mysql-test\t\log_basic.test ############################ -# # -# Variable Name: log_basic # -# Scope: GLOBAL # -# Access Type: Dynamic # -# Data Type: string # -# Default Value: # -# Range: # -# # -# # -# Creation Date: 2008-02-07 # -# Author: Rizwan # -# # -# Description: # -# Test Cases of Dynamic System Variable log that checks the behavior of # -# this variable in the following ways # -# * Default Value # -# * Valid & Invalid values # -# * Scope & Access method # -# * Data Integrity # -# # -# Reference: # -# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html # -# # -############################################################################### - ---source include/load_sysvars.inc - -##################################### -## START OF log TESTS ## -##################################### - ---echo '#--------------------FN_DYNVARS_062_01------------------#' -############################################################# -# Accessing variable # -############################################################# - -SET @start_log= @@global.log; - -SELECT @@global.log AS INIT_VALUE; - -SELECT @@log AS INIT_VALUE; - -SET @@global.log = ON; - -SET global log = 0; - ---echo '#--------------------FN_DYNVARS_062_02-------------------------#' -################################################################################ -# Check if the value in GLOBAL Table matches value in variable # -################################################################################ -# We can only access log value from information schema global_variables table -SELECT VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='log'; - -SET @@global.log= @start_log; - -############################################ -# END OF log TESTS # -############################################ - diff --git a/mysql-test/suite/sys_vars/t/log_slow_queries_basic.test b/mysql-test/suite/sys_vars/t/log_slow_queries_basic.test deleted file mode 100644 index 22fe4dfaa6e..00000000000 --- a/mysql-test/suite/sys_vars/t/log_slow_queries_basic.test +++ /dev/null @@ -1,186 +0,0 @@ -##################### mysql-test\t\slow_query_log_basic.test ################### -# # -# Variable Name: log_slow_queries # -# Scope: GLOBAL # -# Access Type: Dynamic # -# Data Type: BOOLEAN # -# Default Value: OFF # -# Valid Values: ON, OFF # -# # -# # -# Creation Date: 2008-03-16 # -# Author: Salman Rawala # -# # -# Description: Test Cases of Dynamic System Variable "log_slow_queries" # -# that checks behavior of this variable in the following ways # -# * Default Value # -# * Valid & Invalid values # -# * Scope & Access method # -# * Data Integrity # -# # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-options.html#option_mysqld_event-scheduler # -# # -# # -# 2010-01-20 OBN - Added check for variable value matching I_S tables after # -# variable value change # -# # -################################################################################ - ---source include/load_sysvars.inc - -########################################################### -# START OF log_slow_queries TESTS # -########################################################### - - -###################################################################### -# Saving initial value of log_slow_queries in a temporary variable # -###################################################################### - -SET @start_value = @@global.log_slow_queries; -SELECT @start_value; - - ---echo '#---------------------FN_DYNVARS_004_01-------------------------#' -############################################### -# Verify default value of variable # -############################################### - -SET @@global.log_slow_queries = DEFAULT; -SELECT @@global.log_slow_queries = 0; - - ---echo '#--------------------FN_DYNVARS_004_02------------------------#' -###################################################################### -# Change the value of log_slow_queries to a valid value # -###################################################################### - -SET @@global.log_slow_queries = ON; -SELECT @@global.log_slow_queries; -SET @@global.log_slow_queries = OFF; -SELECT @@global.log_slow_queries; - ---echo '#--------------------FN_DYNVARS_004_03-------------------------#' -###################################################################### -# Change the value of log_slow_queries to invalid value # -###################################################################### - ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.log_slow_queries = 2; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.log_slow_queries = -1; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.log_slow_queries = TRUEF; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.log_slow_queries = TRUE_F; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.log_slow_queries = FALSE0; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.log_slow_queries = OON; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.log_slow_queries = ONN; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.log_slow_queries = OOFF; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.log_slow_queries = 0FF; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.log_slow_queries = ' '; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.log_slow_queries = " "; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.log_slow_queries = ''; - - ---echo '#-------------------FN_DYNVARS_004_04----------------------------#' -################################################################## -# Test if accessing session log_slow_queries gives error # -################################################################## - ---Error ER_GLOBAL_VARIABLE -SET @@session.log_slow_queries = OFF; ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT @@session.log_slow_queries; - - ---echo '#----------------------FN_DYNVARS_004_05------------------------#' -############################################################################## -# Check if the value in GLOBAL Tables matches values in variable # -############################################################################## - -SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='log_slow_queries'; - - ---echo '#---------------------FN_DYNVARS_004_06----------------------#' -################################################################ -# Check if 0 and 1 values can be used on variable # -################################################################ - -SET @@global.log_slow_queries = 0; -SELECT @@global.log_slow_queries; -SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='log_slow_queries'; -SET @@global.log_slow_queries = 1; -SELECT @@global.log_slow_queries; -SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='log_slow_queries'; - ---echo '#---------------------FN_DYNVARS_004_07----------------------#' -################################################################### -# Check if TRUE and FALSE values can be used on variable # -################################################################### - -SET @@global.log_slow_queries = TRUE; -SELECT @@global.log_slow_queries; -SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='log_slow_queries'; -SET @@global.log_slow_queries = FALSE; -SELECT @@global.log_slow_queries; -SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='log_slow_queries'; - ---echo '#---------------------FN_DYNVARS_004_08----------------------#' -############################################################################## -# Check if accessing variable with SESSION,LOCAL and without SCOPE points # -# to same session variable # -############################################################################## - -SET @@global.log_slow_queries = ON; -SELECT @@log_slow_queries = @@global.log_slow_queries; - ---echo '#---------------------FN_DYNVARS_004_09----------------------#' -###################################################################### -# Check if log_slow_queries can be accessed with and without @@ sign # -###################################################################### ---Error ER_GLOBAL_VARIABLE -SET log_slow_queries = ON; ---Error ER_PARSE_ERROR -SET local.log_slow_queries = OFF; ---Error ER_UNKNOWN_TABLE -SELECT local.log_slow_queries; ---Error ER_PARSE_ERROR -SET global.log_slow_queries = ON; ---Error ER_UNKNOWN_TABLE -SELECT global.log_slow_queries; ---Error ER_BAD_FIELD_ERROR -SELECT log_slow_queries = @@session.log_slow_queries; - - - -############################## -# Restore initial value # -############################## - -SET @@global.log_slow_queries = @start_value; -SELECT @@global.log_slow_queries; - - -#################################################### -# END OF log_slow_queries TESTS # -#################################################### diff --git a/mysql-test/suite/sys_vars/t/optimizer_switch_eng_cond_pushdown1-master.opt b/mysql-test/suite/sys_vars/t/optimizer_switch_eng_cond_pushdown1-master.opt deleted file mode 100644 index 89aa07976ac..00000000000 --- a/mysql-test/suite/sys_vars/t/optimizer_switch_eng_cond_pushdown1-master.opt +++ /dev/null @@ -1 +0,0 @@ ---optimizer-switch=engine_condition_pushdown=off --engine-condition-pushdown=1 diff --git a/mysql-test/suite/sys_vars/t/optimizer_switch_eng_cond_pushdown1.test b/mysql-test/suite/sys_vars/t/optimizer_switch_eng_cond_pushdown1.test deleted file mode 100644 index 187aa145408..00000000000 --- a/mysql-test/suite/sys_vars/t/optimizer_switch_eng_cond_pushdown1.test +++ /dev/null @@ -1,5 +0,0 @@ -# check how --engine-condition-pushdown and --optimizer-switch -# influence each other when used together (last wins). -select @@session.engine_condition_pushdown, -@@global.engine_condition_pushdown, -@@session.optimizer_switch, @@global.optimizer_switch; diff --git a/mysql-test/suite/sys_vars/t/optimizer_switch_eng_cond_pushdown2-master.opt b/mysql-test/suite/sys_vars/t/optimizer_switch_eng_cond_pushdown2-master.opt deleted file mode 100644 index f48ab5b963b..00000000000 --- a/mysql-test/suite/sys_vars/t/optimizer_switch_eng_cond_pushdown2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---engine-condition-pushdown=1 --optimizer-switch=engine_condition_pushdown=off diff --git a/mysql-test/suite/sys_vars/t/optimizer_switch_eng_cond_pushdown2.test b/mysql-test/suite/sys_vars/t/optimizer_switch_eng_cond_pushdown2.test deleted file mode 100644 index 187aa145408..00000000000 --- a/mysql-test/suite/sys_vars/t/optimizer_switch_eng_cond_pushdown2.test +++ /dev/null @@ -1,5 +0,0 @@ -# check how --engine-condition-pushdown and --optimizer-switch -# influence each other when used together (last wins). -select @@session.engine_condition_pushdown, -@@global.engine_condition_pushdown, -@@session.optimizer_switch, @@global.optimizer_switch; diff --git a/mysql-test/suite/sys_vars/t/sql_big_selects_func.test b/mysql-test/suite/sys_vars/t/sql_big_selects_func.test index 4aefda5e15e..6cff8cfe553 100644 --- a/mysql-test/suite/sys_vars/t/sql_big_selects_func.test +++ b/mysql-test/suite/sys_vars/t/sql_big_selects_func.test @@ -28,7 +28,7 @@ SET @session_sql_big_selects = @@SESSION.sql_big_selects; SET @session_max_join_size = @@SESSION.max_join_size; SET @global_max_join_size = @@GLOBAL.max_join_size; -SET SQL_MAX_JOIN_SIZE=9; +SET MAX_JOIN_SIZE=9; # # Create tables diff --git a/mysql-test/suite/sys_vars/t/sql_big_tables_basic.test b/mysql-test/suite/sys_vars/t/sql_big_tables_basic.test deleted file mode 100644 index 373ae06c850..00000000000 --- a/mysql-test/suite/sys_vars/t/sql_big_tables_basic.test +++ /dev/null @@ -1,170 +0,0 @@ -###################### mysql-test\t\sql_big_tables_basic.test ################# -# # -# Variable Name: sql_big_tables # -# Scope: SESSION # -# Access Type: Dynamic # -# Data Type: boolean # -# Default Value: # -# Valid Values : 0,1 # -# # -# # -# Creation Date: 2008-02-07 # -# Author: Rizwan # -# # -# Description: Test Cases of Dynamic System Variable sql_big_tables # -# that checks the behavior of this variable in the following ways# -# * Default Value # -# * Valid & Invalid values # -# * Scope & Access method # -# * Data Integrity # -# # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-system-variables.html # -# # -############################################################################### - ---source include/load_sysvars.inc -######################################################################## -# START OF sql_big_tables TESTS # -######################################################################## - - -############################################################################## -# Saving initial value of sql_big_tables in a temporary variable # -############################################################################## - -SET @session_start_value = @@session.sql_big_tables; -SELECT @session_start_value; - ---echo '#--------------------FN_DYNVARS_154_01------------------------#' -######################################################################## -# Display the DEFAULT value of sql_big_tables # -######################################################################## - -SET @@session.sql_big_tables = 0; -SET @@session.sql_big_tables = DEFAULT; -SELECT @@session.sql_big_tables; - -SET @@session.sql_big_tables = 1; -SET @@session.sql_big_tables = DEFAULT; -SELECT @@session.sql_big_tables; - - ---echo '#---------------------FN_DYNVARS_154_02-------------------------#' -############################################################################# -# Check if sql_big_tables can be accessed with and without @@ sign # -############################################################################# - -SET sql_big_tables = 1; -SELECT @@sql_big_tables; - ---Error ER_UNKNOWN_TABLE -SELECT session.sql_big_tables; - ---Error ER_UNKNOWN_TABLE -SELECT local.sql_big_tables; - -SET session sql_big_tables = 0; -SELECT @@session.sql_big_tables; - - ---echo '#--------------------FN_DYNVARS_154_03------------------------#' -######################################################################## -# change the value of sql_big_tables to a valid value # -######################################################################## - -SET @@session.sql_big_tables = 0; -SELECT @@session.sql_big_tables; -SET @@session.sql_big_tables = 1; -SELECT @@session.sql_big_tables; - - ---echo '#--------------------FN_DYNVARS_154_04-------------------------#' -########################################################################### -# Change the value of sql_big_tables to invalid value # -########################################################################### - ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_big_tables = -1; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_big_tables = 2; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_big_tables = "T"; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_big_tables = "Y"; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_big_tables = TRÜE; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_big_tables = ÕN; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_big_tables = OF; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_big_tables = ÓFF; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_big_tables = '¹'; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_big_tables = NO; - - ---echo '#-------------------FN_DYNVARS_154_05----------------------------#' -########################################################################### -# Test if accessing global sql_big_tables gives error # -########################################################################### - -SET @@global.sql_big_tables = 1-@@global.sql_big_tables; -SELECT @@global.sql_big_tables; -SET @@global.sql_big_tables = 1-@@global.sql_big_tables; -SELECT @@global.sql_big_tables; - ---echo '#----------------------FN_DYNVARS_154_06------------------------#' -######################################################################### -# Check if the value in GLOBAL Table contains variable value # -######################################################################### - -SELECT count(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='sql_big_tables'; - ---echo '#----------------------FN_DYNVARS_154_07------------------------#' -######################################################################### -# Check if the value in GLOBAL Table matches value in variable # -######################################################################### - -SELECT IF(@@session.sql_big_tables, "ON", "OFF") = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='sql_big_tables'; -SELECT @@session.sql_big_tables; -SELECT VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='sql_big_tables'; - ---echo '#---------------------FN_DYNVARS_154_08-------------------------#' -################################################################### -# Check if ON and OFF values can be used on variable # -################################################################### - -SET @@session.sql_big_tables = OFF; -SELECT @@session.sql_big_tables; -SET @@session.sql_big_tables = ON; -SELECT @@session.sql_big_tables; - ---echo '#---------------------FN_DYNVARS_154_09----------------------#' -################################################################### -# Check if TRUE and FALSE values can be used on variable # -################################################################### - -SET @@session.sql_big_tables = TRUE; -SELECT @@session.sql_big_tables; -SET @@session.sql_big_tables = FALSE; -SELECT @@session.sql_big_tables; - -############################## -# Restore initial value # -############################## - -SET @@session.sql_big_tables = @session_start_value; -SELECT @@session.sql_big_tables; - -############################################################### -# END OF sql_big_tables TESTS # -############################################################### diff --git a/mysql-test/suite/sys_vars/t/sql_big_tables_func.test b/mysql-test/suite/sys_vars/t/sql_big_tables_func.test deleted file mode 100644 index 8bbec202efa..00000000000 --- a/mysql-test/suite/sys_vars/t/sql_big_tables_func.test +++ /dev/null @@ -1,145 +0,0 @@ -############# mysql-test\t\sql_big_tables_func.test ######################## -# # -# Variable Name: sql_big_tables # -# Scope: SESSION # -# Access Type: Dynamic # -# Data Type: BOOLEAN # -# Default Value: 0 FALSE # -# Values: 1 TRUE, 0 FALSE # -# # -# # -# Creation Date: 2008-02-25 # -# Author: Sharique Abdullah # -# # -# Description: Test Cases of Dynamic System Variable "sql_big_tables" # -# that checks behavior of this variable in the following ways # -# * Functionality based on different values # -# # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/set-option.html # -# # -############################################################################ - -# Due to difference in the result the ps-protocol is disabled ---disable_ps_protocol - ---echo ** Setup ** ---echo -# -# Setup -# - -SET @old_big_tables = @@SESSION.sql_big_tables; - -# -# Create tables -# - -CREATE TABLE t1(a varchar(20), b varchar(20)); - -INSERT INTO t1 VALUES('aa','bb'); -INSERT INTO t1 VALUES('aa','bb'); -INSERT INTO t1 VALUES('aa','bb'); -INSERT INTO t1 VALUES('aa','bb'); -INSERT INTO t1 VALUES('aa','bb'); - ---echo '#--------------------FN_DYNVARS_155_01-------------------------#' -# -# TRUE mode -# - -SET SESSION sql_big_tables = 1; - -let $diskTablesBig = query_get_value(SHOW STATUS LIKE 'Created_tmp_disk_tables', Value, 1); -let $totalTablesBig = query_get_value(SHOW STATUS LIKE 'Created_tmp_tables', Value, 1); - -eval SET @diskTableCount = $diskTablesBig; -eval SET @tempTableCount = $totalTablesBig; - -select count(a), b from t1 group by b; - -let $newDiskTablesBig = query_get_value(SHOW STATUS LIKE 'Created_tmp_disk_tables', Value, 1); -let $newTotalTablesBig = query_get_value(SHOW STATUS LIKE 'Created_tmp_tables', Value, 1); - -eval SET @diskTableCount = $newDiskTablesBig - @diskTableCount; -eval SET @tempTableCount = $newTotalTablesBig - @tempTableCount; - -SELECT @diskTableCount; ---echo 1 Expected -SELECT @tempTableCount; ---echo 1 Expected - ---echo '#--------------------FN_DYNVARS_155_02-------------------------#' -# -# FALSE mode -# - -SET SESSION sql_big_tables = 0; - -let $diskTables = query_get_value(SHOW STATUS LIKE 'Created_tmp_disk_tables', Value, 1); -let $totalTables = query_get_value(SHOW STATUS LIKE 'Created_tmp_tables', Value, 1); - -eval SET @diskTableCount = $diskTables; -eval SET @tempTableCount = $totalTables; - -SELECT * FROM (SELECT ta.b as a, tb.a as b FROM t1 as ta INNER JOIN t1 as tb ON ta.a = tb.a) sub; - -let $newDiskTables= query_get_value(SHOW STATUS LIKE 'Created_tmp_disk_tables', Value, 1); -let $newTotalTables= query_get_value(SHOW STATUS LIKE 'Created_tmp_tables', Value, 1); - -eval SET @diskTableCount = $newDiskTables - @diskTableCount; -eval SET @tempTableCount = $newTotalTables - @tempTableCount; - -SELECT @diskTableCount; ---echo 0 Expected -SELECT @tempTableCount; ---echo 1 Expected - ---echo '#--------------------FN_DYNVARS_155_03-------------------------#' -# -# Session data integrity check -# ---echo ** Connecting con_int1 using root ** -connect (con_int1,localhost,root,,); ---echo ** Connection con_int1 ** -connection con_int1; - -SELECT @@SESSION.sql_big_tables; ---echo 0 / FALSE Expected; -SET SESSION sql_big_tables = FALSE; - ---echo ** Connecting con_int2 using root ** -connect (con_int2,localhost,root,,); ---echo ** Connection con_int2 ** -connection con_int2; - -SELECT @@SESSION.sql_big_tables; ---echo 0 / FALSE Expected; - -SET SESSION sql_big_tables = TRUE; - ---echo ** Connection con_int1 ** -connection con_int1; -SELECT @@SESSION.sql_big_tables; ---echo 0 / FALSE Expected; - ---echo ** Connection con_int2 ** -connection con_int2; -SELECT @@SESSION.sql_big_tables; ---echo 1 / TRUE Expected; - ---echo ** Connection default ** -connection default; ---echo Disconnecting Connections con_int1, con_int2 -disconnect con_int1; -disconnect con_int2; - -# -# Cleanup -# - -SET SESSION sql_big_tables = @old_big_tables; - -DROP TABLE t1; - ---enable_ps_protocol - diff --git a/mysql-test/suite/sys_vars/t/sql_low_priority_updates_basic.test b/mysql-test/suite/sys_vars/t/sql_low_priority_updates_basic.test deleted file mode 100644 index 5b21bd4c79a..00000000000 --- a/mysql-test/suite/sys_vars/t/sql_low_priority_updates_basic.test +++ /dev/null @@ -1,221 +0,0 @@ -############## mysql-test\t\sql_low_priority_updates_basic.test ############### -# # -# Variable Name: sql_low_priority_updates # -# Scope: GLOBAL | SESSION # -# Access Type: Dynamic # -# Data Type: boolean # -# Default Value: # -# Valid Values: 0,1 # -# # -# # -# Creation Date: 2008-02-07 # -# Author: Rizwan # -# # -# Description: Test Cases of Dynamic System Variable sql_low_priority_updates # -# that checks the behavior of this variable in the following ways# -# * Default Value # -# * Valid & Invalid values # -# * Scope & Access method # -# * Data Integrity # -# # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-system-variables.html # -# # -############################################################################### - ---source include/load_sysvars.inc - -######################################################################## -# START OF sql_low_priority_updates TESTS # -######################################################################## - - -############################################################################### -# Saving initial value of sql_low_priority_updates in a temporary variable # -############################################################################### - -SET @session_start_value = @@session.sql_low_priority_updates; -SELECT @session_start_value; - -SET @global_start_value = @@global.sql_low_priority_updates; -SELECT @global_start_value; - ---echo '#--------------------FN_DYNVARS_159_01------------------------#' -######################################################################## -# Display the DEFAULT value of sql_low_priority_updates # -######################################################################## - -SET @@session.sql_low_priority_updates = 1; -SET @@session.sql_low_priority_updates = DEFAULT; -SELECT @@session.sql_low_priority_updates; - -SET @@global.sql_low_priority_updates = 1; -SET @@global.sql_low_priority_updates = DEFAULT; - ---echo '#---------------------FN_DYNVARS_159_02-------------------------#' -#################################################################################### -# Check if sql_low_priority_updates can be accessed with and without @@ sign # -#################################################################################### - -SET sql_low_priority_updates = 1; -SELECT @@sql_low_priority_updates; - ---Error ER_UNKNOWN_TABLE -SELECT session.sql_low_priority_updates; - ---Error ER_UNKNOWN_TABLE -SELECT local.sql_low_priority_updates; - ---Error ER_UNKNOWN_TABLE -SELECT global.sql_low_priority_updates; - -#using another syntax for accessing system variables -SET session sql_low_priority_updates = 0; -SELECT @@session.sql_low_priority_updates; - -SET global sql_low_priority_updates = 0; -SELECT @@global.sql_low_priority_updates; - - ---echo '#--------------------FN_DYNVARS_159_03------------------------#' -########################################################################## -# change the value of sql_low_priority_updates to a valid value # -########################################################################## -# for session -SET @@session.sql_low_priority_updates = 0; -SELECT @@session.sql_low_priority_updates; -SET @@session.sql_low_priority_updates = 1; -SELECT @@session.sql_low_priority_updates; - -# for global -SET @@global.sql_low_priority_updates = 0; -SELECT @@global.sql_low_priority_updates; -SET @@global.sql_low_priority_updates = 1; -SELECT @@global.sql_low_priority_updates; - - ---echo '#--------------------FN_DYNVARS_159_04-------------------------#' -########################################################################### -# Change the value of sql_low_priority_updates to invalid value # -########################################################################### - -# for session ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_low_priority_updates = -1; ---Error ER_WRONG_TYPE_FOR_VAR -SET @@session.sql_low_priority_updates = 1.6; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_low_priority_updates = "T"; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_low_priority_updates = "Y"; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_low_priority_updates = TRÜE; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_low_priority_updates = ÕN; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_low_priority_updates = OF; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@session.sql_low_priority_updates = ÓFF; - -# for global - ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.sql_low_priority_updates = -1; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.sql_low_priority_updates = 2; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.sql_low_priority_updates = "T"; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.sql_low_priority_updates = "Y"; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.sql_low_priority_updates = TRÜE; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.sql_low_priority_updates = ÕN; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.sql_low_priority_updates = OF; ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.sql_low_priority_updates = ÓFF; - - ---echo '#-------------------FN_DYNVARS_159_05----------------------------#' -########################################################################### -# Test if changing global variable effects session and vice versa # -########################################################################### - -SET @@global.sql_low_priority_updates = 0; -SET @@session.sql_low_priority_updates = 1; -SELECT @@global.sql_low_priority_updates AS res_is_0; - -SET @@global.sql_low_priority_updates = 0; -SELECT @@session.sql_low_priority_updates AS res_is_1; - ---echo '#----------------------FN_DYNVARS_159_06------------------------#' -######################################################################### -# Check if the value in GLOBAL Table matches value in variable # -######################################################################### - -SELECT IF(@@global.sql_low_priority_updates, "ON", "OFF") = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='sql_low_priority_updates'; -SELECT @@global.sql_low_priority_updates; -SELECT VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='sql_low_priority_updates'; - ---echo '#----------------------FN_DYNVARS_159_07------------------------#' -######################################################################### -# Check if the value in SESSION Table matches value in variable # -######################################################################### - -SELECT IF(@@session.sql_low_priority_updates, "ON", "OFF") = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='sql_low_priority_updates'; -SELECT @@session.sql_low_priority_updates; -SELECT VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='sql_low_priority_updates'; - ---echo '#---------------------FN_DYNVARS_159_08-------------------------#' -################################################################### -# Check if ON and OFF values can be used on variable # -################################################################### - -SET @@session.sql_low_priority_updates = OFF; -SELECT @@session.sql_low_priority_updates; -SET @@session.sql_low_priority_updates = ON; -SELECT @@session.sql_low_priority_updates; - -SET @@global.sql_low_priority_updates = OFF; -SELECT @@global.sql_low_priority_updates; -SET @@global.sql_low_priority_updates = ON; -SELECT @@global.sql_low_priority_updates; - ---echo '#---------------------FN_DYNVARS_159_09----------------------#' -################################################################### -# Check if TRUE and FALSE values can be used on variable # -################################################################### - -SET @@session.sql_low_priority_updates = TRUE; -SELECT @@session.sql_low_priority_updates; -SET @@session.sql_low_priority_updates = FALSE; -SELECT @@session.sql_low_priority_updates; - -SET @@global.sql_low_priority_updates = TRUE; -SELECT @@global.sql_low_priority_updates; -SET @@global.sql_low_priority_updates = FALSE; -SELECT @@global.sql_low_priority_updates; - -############################## -# Restore initial value # -############################## - -SET @@session.sql_low_priority_updates = @session_start_value; -SELECT @@session.sql_low_priority_updates; - -SET @@global.sql_low_priority_updates = @global_start_value; -SELECT @@global.sql_low_priority_updates; - -########################################################### -# END OF sql_low_priority_updates TESTS # -########################################################### - diff --git a/mysql-test/suite/sys_vars/t/sql_max_join_size_basic.test b/mysql-test/suite/sys_vars/t/sql_max_join_size_basic.test deleted file mode 100644 index 9a72846b29c..00000000000 --- a/mysql-test/suite/sys_vars/t/sql_max_join_size_basic.test +++ /dev/null @@ -1,51 +0,0 @@ - -# -# 2010-01-20 OBN - Added check of I_S values after variable value change -# - -SET @start_global_value = @@global.sql_max_join_size; -SELECT @start_global_value; - -# -# exists as global and session -# -select @@global.sql_max_join_size; -select @@session.sql_max_join_size; -show global variables like 'sql_max_join_size'; -show session variables like 'sql_max_join_size'; -select * from information_schema.global_variables where variable_name='sql_max_join_size'; -select * from information_schema.session_variables where variable_name='sql_max_join_size'; - -# -# show that it's writable -# -set global sql_max_join_size=10; -set session sql_max_join_size=20; -select @@global.sql_max_join_size; -select @@session.sql_max_join_size; -show global variables like 'sql_max_join_size'; -show session variables like 'sql_max_join_size'; -select * from information_schema.global_variables where variable_name='sql_max_join_size'; -select * from information_schema.session_variables where variable_name='sql_max_join_size'; - -# -# incorrect types -# ---error ER_WRONG_TYPE_FOR_VAR -set global sql_max_join_size=1.1; ---error ER_WRONG_TYPE_FOR_VAR -set global sql_max_join_size=1e1; ---error ER_WRONG_TYPE_FOR_VAR -set global sql_max_join_size="foo"; - -# -# affects OPTION_BIG_SELECTS -# -select @@sql_big_selects; -set sql_max_join_size=cast(-1 as unsigned int); -select @@sql_big_selects; -set sql_max_join_size=100; -select @@sql_big_selects; - -SET @@global.sql_max_join_size = @start_global_value; -SELECT @@global.sql_max_join_size; diff --git a/mysql-test/suite/sys_vars/t/sql_max_join_size_func.test b/mysql-test/suite/sys_vars/t/sql_max_join_size_func.test deleted file mode 100644 index 17b7d911b94..00000000000 --- a/mysql-test/suite/sys_vars/t/sql_max_join_size_func.test +++ /dev/null @@ -1,133 +0,0 @@ -############# mysql-test\t\sql_max_join_size_func.test #################### -# # -# Variable Name: sql_max_join_size # -# Scope: GLOBAL & SESSION # -# Access Type: Dynamic # -# Data Type: BOOLEAN # -# Default Value: 4294967295 # -# Values: 1-4294967295 # -# # -# # -# Creation Date: 2008-02-25 # -# Author: Sharique Abdullah # -# # -# Description: Test Cases of Dynamic System Variable "sql_max_join_size" # -# that checks behavior of this variable in the following ways# -# * Functionality based on different values # -# # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/server-system # -# -variables.html#option_mysqld_max_join_size # -# # -########################################################################### - ---echo ** Setup ** -# -# Setup -# - -SET @session_max_join_size = @@SESSION.sql_max_join_size; -SET @global_max_join_size = @@GLOBAL.sql_max_join_size; -SET @session_sql_big_selects = @@SESSION.sql_big_selects; - -# -# Create tables -# - -CREATE TEMPORARY TABLE t1(a varchar(20) not null, b varchar(20)); -CREATE TEMPORARY TABLE t2(a varchar(20) null, b varchar(20)); - -INSERT INTO t1 VALUES('aa','bb'); -INSERT INTO t1 VALUES('aa1','bb'); -INSERT INTO t1 VALUES('aa2','bb'); -INSERT INTO t1 VALUES('aa3','bb'); -INSERT INTO t1 VALUES('aa4','bb'); - -INSERT INTO t2 VALUES('aa','bb'); -INSERT INTO t2 VALUES('aa1','bb'); -INSERT INTO t2 VALUES('aa2','bb'); -INSERT INTO t2 VALUES('aa3','bb'); -INSERT INTO t2 VALUES('aa4','bb'); - ---echo '#--------------------FN_DYNVARS_161_01-------------------------#' -# -# Testing fail condition -# - -SET SESSION sql_max_join_size=9; ---error ER_TOO_BIG_SELECT -SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a; ---echo Expected error The SELECT would examine more than MAX_JOIN_SIZE rows. - ---echo '#--------------------FN_DYNVARS_161_02-------------------------#' -# -# Testing pass conditions -# - -SET SESSION SQL_BIG_SELECTS = 1; - -SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a; ---echo This should work - -SET SESSION sql_max_join_size=DEFAULT; - -DELETE FROM t2 WHERE a = 'aa4'; -SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a; ---echo This should work - ---echo '#----------------------------FN_DYNVARS_136_05-------------------------#' -# -# Session data integrity check & GLOBAL Value check -# - -SET GLOBAL sql_max_join_size = 4; ---echo ** Connecting con_int1 using root ** -connect (con_int1,localhost,root,,); - ---echo ** Connection con_int1 ** -connection con_int1; -SELECT @@SESSION.sql_max_join_size; ---echo 4 Expected - -SET SESSION sql_max_join_size = 2; ---echo ** Connecting con_int2 using root ** -connect (con_int2,localhost,root,,); - ---echo ** Connection con_int2 ** -connection con_int2; -SELECT @@SESSION.sql_max_join_size; ---echo 4 Expected - -SET SESSION sql_max_join_size = 10; - ---echo ** Connection con_int2 ** -connection con_int2; -SELECT @@SESSION.sql_max_join_size; ---echo 10 Expected - ---echo ** Connection con_int1 ** -connection con_int1; -SELECT @@SESSION.sql_max_join_size; ---echo 2 Expected - - -SELECT @@GLOBAL.sql_max_join_size; ---echo 4 Expected - ---echo ** Connection default ** -connection default; - ---echo Disconnecting Connections con_int1, con_int2 -disconnect con_int1; -disconnect con_int2; - - -# -# Cleanup -# - -SET @@SESSION.sql_max_join_size = @session_max_join_size; -SET @@GLOBAL.sql_max_join_size = @global_max_join_size ; -SET @@SESSION.sql_big_selects = @session_sql_big_selects; - -DROP TABLE t1; -DROP TABLE t2; |