Commit 3b194176 authored by hhunger@hh-nb.hungers's avatar hhunger@hh-nb.hungers

Merge hh-nb.hungers:/work/merge/mysql-5.1-bugteam

into  hh-nb.hungers:/work/merge/mysql-5.1-36522
parents d7964151 313e6c77
...@@ -3024,3 +3024,7 @@ win/vs8cache.txt ...@@ -3024,3 +3024,7 @@ win/vs8cache.txt
ylwrap ylwrap
zlib/*.ds? zlib/*.ds?
zlib/*.vcproj zlib/*.vcproj
mysql-test/bug36522-64.tar
mysql-test/bug36522.tar
mysql-test/t.log
mysql-test/tps.log
################# mysql-test\t\binlog_cache_size_basic.test ####################
# #
# Variable Name: binlog_cache_size #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 32768 #
# Range: 4096 - 4294967295 #
# #
# #
# Creation Date: 2008-04-28 #
# Author: Salman Rawala/Horst Hunger #
# #
# Description: Test Cases of Dynamic System Variable "binlog_cache_size" #
# 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-system-variables.html#option_mysqld_binlog_cache_size #
# #
################################################################################
#################################################################
# START OF binlog_cache_size TESTS #
#################################################################
#########################################################################
# Saving initial value of binlog_cache_size in a temporary variable #
#########################################################################
SET @start_value = @@global.binlog_cache_size;
SELECT @start_value;
--echo '#--------------------FN_DYNVARS_006_01------------------------#'
#########################################################################
# Display the DEFAULT value of binlog_cache_size #
#########################################################################
SET @@global.binlog_cache_size = 100;
SET @@global.binlog_cache_size = DEFAULT;
SELECT @@global.binlog_cache_size;
--echo '#---------------------FN_DYNVARS_006_02-------------------------#'
###############################################
# Verify default value of variable #
###############################################
SET @@global.binlog_cache_size = @start_value;
SELECT @@global.binlog_cache_size = 32768;
--echo '#--------------------FN_DYNVARS_006_03------------------------#'
#########################################################################
# Change the value of binlog_cache_size to a valid value #
#########################################################################
SET @@global.binlog_cache_size = 4096;
SELECT @@global.binlog_cache_size;
SET @@global.binlog_cache_size = 4294967295;
SELECT @@global.binlog_cache_size;
SET @@global.binlog_cache_size = 10000;
SELECT @@global.binlog_cache_size;
SET @@global.binlog_cache_size = 21221204;
SELECT @@global.binlog_cache_size;
echo 'Bug: Invalid values are coming in variable on assigning valid values';
--echo '#--------------------FN_DYNVARS_006_04-------------------------#'
############################################################################
# Change the value of binlog_cache_size to invalid value #
############################################################################
SET @@global.binlog_cache_size = 1024;
SELECT @@global.binlog_cache_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.binlog_cache_size = 10000.01;
SET @@global.binlog_cache_size = -1024;
SELECT @@global.binlog_cache_size;
SET @@global.binlog_cache_size = 42949672950;
SELECT @@global.binlog_cache_size;
echo 'Bug: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.binlog_cache_size = ON;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.binlog_cache_size = 'test';
--echo '#-------------------FN_DYNVARS_006_05----------------------------#'
############################################################################
# Test if accessing session binlog_cache_size gives error #
############################################################################
--Error ER_GLOBAL_VARIABLE
SET @@session.binlog_cache_size = 0;
--echo '#----------------------FN_DYNVARS_006_06------------------------#'
##############################################################################
# Check if the value in GLOBAL Tables matches values in variable #
##############################################################################
SELECT @@global.binlog_cache_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='binlog_cache_size';
--echo '#---------------------FN_DYNVARS_006_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.binlog_cache_size = TRUE;
SELECT @@global.binlog_cache_size;
SET @@global.binlog_cache_size = FALSE;
SELECT @@global.binlog_cache_size;
echo 'Bug: Errors are not coming on assigning TRUE/FALSE to variable';
--echo '#---------------------FN_DYNVARS_006_08----------------------#'
###############################################################################
# Check if accessing variable without SCOPE points to same global variable #
###############################################################################
SET @@global.binlog_cache_size = 1;
SELECT @@binlog_cache_size = @@global.binlog_cache_size;
--echo '#---------------------FN_DYNVARS_006_09----------------------#'
###########################################################################
# Check if binlog_cache_size can be accessed with and without @@ sign #
###########################################################################
--Error ER_GLOBAL_VARIABLE
SET binlog_cache_size = 1;
--Error ER_PARSE_ERROR
SET global.binlog_cache_size = 1;
--Error ER_UNKNOWN_TABLE
SELECT global.binlog_cache_size;
--Error ER_BAD_FIELD_ERROR
SELECT binlog_cache_size = @@session.binlog_cache_size;
##############################
# Restore initial value #
##############################
SET @@global.binlog_cache_size = @start_value;
SELECT @@global.binlog_cache_size;
###########################################################
# END OF binlog_cache_size TESTS #
###########################################################
############## mysql-test\t\bulk_insert_buffer_size_basic.test #################
# #
# Variable Name: bulk_insert_buffer_size #
# Scope: GLOBAL & SESSION #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 8388608 #
# Range: 0 - 4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman Rawala #
# #
# Description: Test Cases of Dynamic System Variable "bulk_insert_buffer_size" #
# 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-system-variables.html#option_mysqld_bulk_insert_buffer_size #
# #
################################################################################
--source include/load_sysvars.inc
#######################################################################
# START OF bulk_insert_buffer_size TESTS #
#######################################################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.bulk_insert_buffer_size;
SELECT @start_global_value;
SET @start_session_value = @@session.bulk_insert_buffer_size;
SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_007_01-------------------------#'
#######################################################################
# Display the DEFAULT value of bulk_insert_buffer_size #
#######################################################################
SET @@global.bulk_insert_buffer_size = 100;
SET @@global.bulk_insert_buffer_size = DEFAULT;
SELECT @@global.bulk_insert_buffer_size;
SET @@session.bulk_insert_buffer_size = 200;
SET @@session.bulk_insert_buffer_size = DEFAULT;
SELECT @@session.bulk_insert_buffer_size;
--echo '#--------------------FN_DYNVARS_007_02-------------------------#'
#######################################################################
# Check the DEFAULT value of bulk_insert_buffer_size #
#######################################################################
SET @@global.bulk_insert_buffer_size = @start_global_value;
SELECT @@global.bulk_insert_buffer_size = 8388608;
SET @@session.bulk_insert_buffer_size = @start_session_value;
SELECT @@session.bulk_insert_buffer_size = 8388608;
--echo '#--------------------FN_DYNVARS_007_03-------------------------#'
###############################################################################
#Change the value of bulk_insert_buffer_size to valid values for GLOBAL Scope #
###############################################################################
SET @@global.bulk_insert_buffer_size = 0;
SELECT @@global.bulk_insert_buffer_size;
SET @@global.bulk_insert_buffer_size = 1;
SELECT @@global.bulk_insert_buffer_size;
SET @@global.bulk_insert_buffer_size = 4294967295;
SELECT @@global.bulk_insert_buffer_size;
SET @@global.bulk_insert_buffer_size = 429496;
SELECT @@global.bulk_insert_buffer_size;
--echo '#--------------------FN_DYNVARS_007_04-------------------------#'
###############################################################################
#Change the value of bulk_insert_buffer_size to valid values for SESSION Scope#
###############################################################################
SET @@session.bulk_insert_buffer_size = 0;
SELECT @@session.bulk_insert_buffer_size;
SET @@session.bulk_insert_buffer_size = 1;
SELECT @@session.bulk_insert_buffer_size;
SET @@session.bulk_insert_buffer_size = 4294967295;
SELECT @@session.bulk_insert_buffer_size;
SET @@session.bulk_insert_buffer_size = 429496;
SELECT @@session.bulk_insert_buffer_size;
--echo '#------------------FN_DYNVARS_007_05-----------------------#'
###################################################################
# Change the value of bulk_insert_buffer_size to an invalid value #
###################################################################
SET @@global.bulk_insert_buffer_size = 42949672950;
SELECT @@global.bulk_insert_buffer_size;
SET @@global.bulk_insert_buffer_size = -1024;
SELECT @@global.bulk_insert_buffer_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.bulk_insert_buffer_size = test;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.bulk_insert_buffer_size = ON;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.bulk_insert_buffer_size = 429496.10;
SET @@session.bulk_insert_buffer_size = 42949672950;
SELECT @@session.bulk_insert_buffer_size;
SET @@session.bulk_insert_buffer_size = -2;
SELECT @@session.bulk_insert_buffer_size;
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.bulk_insert_buffer_size = test;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.bulk_insert_buffer_size = 429496.10;
--echo '#------------------FN_DYNVARS_007_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SELECT @@global.bulk_insert_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='bulk_insert_buffer_size';
--echo '#------------------FN_DYNVARS_007_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
SELECT @@session.bulk_insert_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='bulk_insert_buffer_size';
--echo '#------------------FN_DYNVARS_007_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.bulk_insert_buffer_size = TRUE;
SELECT @@global.bulk_insert_buffer_size;
SET @@global.bulk_insert_buffer_size = FALSE;
SELECT @@global.bulk_insert_buffer_size;
SET @@session.bulk_insert_buffer_size = TRUE;
SELECT @@session.bulk_insert_buffer_size;
SET @@session.bulk_insert_buffer_size = FALSE;
SELECT @@session.bulk_insert_buffer_size;
--echo '#---------------------FN_DYNVARS_007_09----------------------#'
##############################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points #
# to same session variable #
##############################################################################
SET @@bulk_insert_buffer_size = 100;
SELECT @@bulk_insert_buffer_size = @@local.bulk_insert_buffer_size;
SELECT @@local.bulk_insert_buffer_size = @@session.bulk_insert_buffer_size;
--echo '#---------------------FN_DYNVARS_007_10----------------------#'
###############################################################################
# Check if bulk_insert_buffer_size can be accessed with and without @@ sign #
###############################################################################
SET bulk_insert_buffer_size = 1;
SELECT @@bulk_insert_buffer_size;
--Error ER_PARSE_ERROR
SET local.bulk_insert_buffer_size = 1;
--Error ER_UNKNOWN_TABLE
SELECT local.bulk_insert_buffer_size;
--Error ER_PARSE_ERROR
SET session.bulk_insert_buffer_size = 1;
--Error ER_UNKNOWN_TABLE
SELECT session.bulk_insert_buffer_size;
--Error ER_BAD_FIELD_ERROR
SELECT bulk_insert_buffer_size = @@session.bulk_insert_buffer_size;
####################################
# Restore initial value #
####################################
SET @@global.bulk_insert_buffer_size = @start_global_value;
SELECT @@global.bulk_insert_buffer_size;
SET @@session.bulk_insert_buffer_size = @start_session_value;
SELECT @@session.bulk_insert_buffer_size;
####################################################
# END OF bulk_insert_buffer_size TESTS #
####################################################
############### mysql-test\t\delayed_insert_limit_basic.test ###################
# #
# Variable Name: delayed_insert_limit #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 100 #
# Range: 1 - 4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman Rawala #
# #
# Description: Test Cases of Dynamic System Variable "delayed_insert_limit" #
# 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-system-variables.html#option_mysqld_delayed_insert_limit #
# #
################################################################################
--source include/load_sysvars.inc
#################################################################
# START OF delayed_insert_limit TESTS #
#################################################################
#########################################################################
# Saving initial value of delayed_insert_limit in a temporary variable #
#########################################################################
SET @start_value = @@global.delayed_insert_limit;
SELECT @start_value;
--echo '#--------------------FN_DYNVARS_024_01------------------------#'
#########################################################################
# Display the DEFAULT value of delayed_insert_limit #
#########################################################################
SET @@global.delayed_insert_limit = 100;
SET @@global.delayed_insert_limit = DEFAULT;
SELECT @@global.delayed_insert_limit;
--echo '#---------------------FN_DYNVARS_024_02-------------------------#'
###############################################
# Verify default value of variable #
###############################################
SET @@global.delayed_insert_limit = @start_value;
SELECT @@global.delayed_insert_limit = 100;
--echo '#--------------------FN_DYNVARS_024_03------------------------#'
#########################################################################
# Change the value of delayed_insert_limit to a valid value #
#########################################################################
SET @@global.delayed_insert_limit = 10000;
SELECT @@global.delayed_insert_limit;
SET @@global.delayed_insert_limit = 4294967295;
SELECT @@global.delayed_insert_limit;
SET @@global.delayed_insert_limit = 1;
SELECT @@global.delayed_insert_limit;
--echo '#--------------------FN_DYNVARS_024_04-------------------------#'
############################################################################
# Change the value of delayed_insert_limit to invalid value #
############################################################################
SET @@global.delayed_insert_limit = 0;
SELECT @@global.delayed_insert_limit;
SET @@global.delayed_insert_limit = -1024;
SELECT @@global.delayed_insert_limit;
SET @@global.delayed_insert_limit = 42949672950;
SELECT @@global.delayed_insert_limit;
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.delayed_insert_limit = 429496729.5;
SELECT @@global.delayed_insert_limit;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.delayed_insert_limit = ON;
SELECT @@global.delayed_insert_limit;
--echo '#-------------------FN_DYNVARS_024_05----------------------------#'
############################################################################
# Test if accessing session delayed_insert_limit gives error #
############################################################################
--Error ER_GLOBAL_VARIABLE
SET @@session.delayed_insert_limit = 0;
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@Session.delayed_insert_limit;
--echo '#----------------------FN_DYNVARS_024_06------------------------#'
##############################################################################
# Check if the value in GLOBAL & SESSION Tables matches values in variable #
##############################################################################
SELECT @@global.delayed_insert_limit =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='delayed_insert_limit';
SELECT @@delayed_insert_limit =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='delayed_insert_limit';
--echo '#---------------------FN_DYNVARS_024_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.delayed_insert_limit = TRUE;
SELECT @@global.delayed_insert_limit;
SET @@global.delayed_insert_limit = FALSE;
SELECT @@global.delayed_insert_limit;
--echo '#---------------------FN_DYNVARS_024_08----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@global.delayed_insert_limit = 1;
SELECT @@delayed_insert_limit = @@global.delayed_insert_limit;
--echo '#---------------------FN_DYNVARS_024_09----------------------#'
##############################################################################
# Check if delayed_insert_limit can be accessed with and without @@ sign #
##############################################################################
--Error ER_GLOBAL_VARIABLE
SET delayed_insert_limit = 1;
SELECT @@delayed_insert_limit;
--Error ER_PARSE_ERROR
SET local.delayed_insert_limit = 1;
--Error ER_UNKNOWN_TABLE
SELECT local.delayed_insert_limit;
--Error ER_PARSE_ERROR
SET global.delayed_insert_limit = 1;
--Error ER_UNKNOWN_TABLE
SELECT global.delayed_insert_limit;
--Error ER_BAD_FIELD_ERROR
SELECT delayed_insert_limit = @@session.delayed_insert_limit;
##############################
# Restore initial value #
##############################
SET @@global.delayed_insert_limit = @start_value;
SELECT @@global.delayed_insert_limit;
###########################################################
# END OF delayed_insert_limit TESTS #
###########################################################
################# mysql-test\t\delayed_queue_size_basic.test ###################
# #
# Variable Name: delayed_queue_size #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 1000 #
# Range: 1 - 4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman Rawala #
# #
# Description: Test Cases of Dynamic System Variable "delayed_queue_size" #
# 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-system-variables.html#option_mysqld_delayed_queue_size #
# #
################################################################################
--source include/load_sysvars.inc
#################################################################
# START OF delayed_queue_size TESTS #
#################################################################
#########################################################################
# Saving initial value of delayed_queue_size in a temporary variable #
#########################################################################
SET @start_value = @@global.delayed_queue_size;
SELECT @start_value;
--echo '#--------------------FN_DYNVARS_026_01------------------------#'
#########################################################################
# Display the DEFAULT value of delayed_queue_size #
#########################################################################
SET @@global.delayed_queue_size = 100;
SET @@global.delayed_queue_size = DEFAULT;
SELECT @@global.delayed_queue_size;
--echo '#---------------------FN_DYNVARS_026_02-------------------------#'
###############################################
# Verify default value of variable #
###############################################
SET @@global.delayed_queue_size = @start_value;
SELECT @@global.delayed_queue_size = 1000;
--echo '#--------------------FN_DYNVARS_026_03------------------------#'
#########################################################################
# Change the value of delayed_queue_size to a valid value #
#########################################################################
SET @@global.delayed_queue_size = 10000;
SELECT @@global.delayed_queue_size;
SET @@global.delayed_queue_size = 4294967295;
SELECT @@global.delayed_queue_size;
SET @@global.delayed_queue_size = 1;
SELECT @@global.delayed_queue_size;
--echo '#--------------------FN_DYNVARS_026_04-------------------------#'
############################################################################
# Change the value of delayed_queue_size to invalid value #
############################################################################
SET @@global.delayed_queue_size = 0;
SELECT @@global.delayed_queue_size;
SET @@global.delayed_queue_size = -1024;
SELECT @@global.delayed_queue_size;
SET @@global.delayed_queue_size = 42949672950;
SELECT @@global.delayed_queue_size;
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.delayed_queue_size = 429496729.5;
SELECT @@global.delayed_queue_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.delayed_queue_size = ON;
SELECT @@delayed_queue_size;
--echo '#-------------------FN_DYNVARS_026_05----------------------------#'
############################################################################
# Test if accessing session delayed_queue_size gives error #
############################################################################
--Error 1229
SET @@session.delayed_queue_size = 0;
--Error 1238
SELECT @@session.delayed_queue_size;
--echo '#----------------------FN_DYNVARS_026_06------------------------#'
##############################################################################
# Check if the value in GLOBAL & SESSION Tables matches values in variable #
##############################################################################
SELECT @@global.delayed_queue_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='delayed_queue_size';
SELECT @@delayed_queue_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='delayed_queue_size';
--echo '#---------------------FN_DYNVARS_026_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.delayed_queue_size = TRUE;
SELECT @@global.delayed_queue_size;
SET @@global.delayed_queue_size = FALSE;
SELECT @@global.delayed_queue_size;
--echo '#---------------------FN_DYNVARS_026_08----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@global.delayed_queue_size = 1;
SELECT @@delayed_queue_size = @@global.delayed_queue_size;
--echo '#---------------------FN_DYNVARS_026_09----------------------#'
###########################################################################
# Check if delayed_queue_size can be accessed with and without @@ sign #
###########################################################################
--Error 1229
SET delayed_queue_size = 1;
SELECT @@delayed_queue_size;
--Error ER_PARSE_ERROR
SET local.delayed_queue_size = 1;
--Error ER_UNKNOWN_TABLE
SELECT local.delayed_queue_size;
--Error ER_PARSE_ERROR
SET global.delayed_queue_size = 1;
--Error ER_UNKNOWN_TABLE
SELECT global.delayed_queue_size;
--Error ER_BAD_FIELD_ERROR
SELECT delayed_queue_size = @@session.delayed_queue_size;
##############################
# Restore initial value #
##############################
SET @@global.delayed_queue_size = @start_value;
SELECT @@global.delayed_queue_size;
###########################################################
# END OF delayed_queue_size TESTS #
###########################################################
# Created by Horst Hunger 2008-04-15
# see also have_64bit.inc
--disable_query_log
--disable_warnings
let $save = `SELECT @@global.sort_buffer_size`;
SET @@global.sort_buffer_size = 4294967296;
let $mach32 = `SELECT @@global.sort_buffer_size <= 4294967295`;
eval SET @@global.sort_buffer_size = $save;
--enable_warnings
--enable_query_log
if (!$mach32)
{
skip Need a 32 bit machine;
}
# Created by Horst Hunger 2008-04-15
# see also have_32bit.inc
--disable_query_log
let $save = `SELECT @@session.sort_buffer_size`;
SET @@session.sort_buffer_size = 4294967296;
let $mach64 = `SELECT @@session.sort_buffer_size > 4294967295`;
eval SET @@session.sort_buffer_size = $save;
--enable_query_log
if (!$mach64)
{
skip Need a 64 bit machine;
}
################# mysql-test\t\innodb_concurrency_tickets_basic.test ##########
# #
# Variable Name: innodb_concurrency_tickets #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 500 #
# Range: 1-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Rizwan #
# #
#Description:Test Cases of Dynamic System Variable innodb_concurrency_tickets #
# 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/have_innodb.inc
--source include/load_sysvars.inc
########################################################################
# START OF innodb_concurrency_tickets TESTS #
########################################################################
################################################################################
# Saving initial value of innodb_concurrency_tickets in a temporary variable #
################################################################################
SET @global_start_value = @@global.innodb_concurrency_tickets;
SELECT @global_start_value;
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
########################################################################
# Display the DEFAULT value of innodb_concurrency_tickets #
########################################################################
SET @@global.innodb_concurrency_tickets = 0;
SET @@global.innodb_concurrency_tickets = DEFAULT;
SELECT @@global.innodb_concurrency_tickets;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
################################################################################
# Check if innodb_concurrency_tickets can be accessed with and without @@ sign #
################################################################################
--Error ER_GLOBAL_VARIABLE
SET innodb_concurrency_tickets = 1;
SELECT @@innodb_concurrency_tickets;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_concurrency_tickets;
SET global innodb_concurrency_tickets = 0;
SELECT @@global.innodb_concurrency_tickets;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
##########################################################################
# change the value of innodb_concurrency_tickets to a valid value #
##########################################################################
SET @@global.innodb_concurrency_tickets = 1;
SELECT @@global.innodb_concurrency_tickets;
SET @@global.innodb_concurrency_tickets = 1000;
SELECT @@global.innodb_concurrency_tickets;
SET @@global.innodb_concurrency_tickets = 4294967295;
SELECT @@global.innodb_concurrency_tickets;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
###########################################################################
# Change the value of innodb_concurrency_tickets to invalid value #
###########################################################################
SET @@global.innodb_concurrency_tickets = -1;
SELECT @@global.innodb_concurrency_tickets;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_concurrency_tickets = "T";
SELECT @@global.innodb_concurrency_tickets;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_concurrency_tickets = "Y";
SELECT @@global.innodb_concurrency_tickets;
SET @@global.innodb_concurrency_tickets = 1001;
SELECT @@global.innodb_concurrency_tickets;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
SELECT @@global.innodb_concurrency_tickets =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_concurrency_tickets';
SELECT @@global.innodb_concurrency_tickets;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_concurrency_tickets';
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_concurrency_tickets = OFF;
SELECT @@global.innodb_concurrency_tickets;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_concurrency_tickets = ON;
SELECT @@global.innodb_concurrency_tickets;
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.innodb_concurrency_tickets = TRUE;
SELECT @@global.innodb_concurrency_tickets;
SET @@global.innodb_concurrency_tickets = FALSE;
SELECT @@global.innodb_concurrency_tickets;
##############################
# Restore initial value #
##############################
SET @@global.innodb_concurrency_tickets = @global_start_value;
SELECT @@global.innodb_concurrency_tickets;
###############################################################
# END OF innodb_concurrency_tickets TESTS #
###############################################################
################# mysql-test\t\innodb_max_purge_lag_basic.test ################
# #
# Variable Name: innodb_max_purge_lag #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 0 #
# Range: 0-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Rizwan #
# #
#Description:Test Cases of Dynamic System Variable innodb_max_purge_lag #
# 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/have_innodb.inc
--source include/load_sysvars.inc
########################################################################
# START OF innodb_max_purge_lag TESTS #
########################################################################
################################################################################
# Saving initial value of innodb_max_purge_lag in a temporary variable #
################################################################################
SET @global_start_value = @@global.innodb_max_purge_lag;
SELECT @global_start_value;
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
########################################################################
# Display the DEFAULT value of innodb_max_purge_lag #
########################################################################
SET @@global.innodb_max_purge_lag = 0;
SET @@global.innodb_max_purge_lag = DEFAULT;
SELECT @@global.innodb_max_purge_lag;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
############################################################################
# Check if innodb_max_purge_lag can be accessed with and without @@ sign #
############################################################################
--Error ER_GLOBAL_VARIABLE
SET innodb_max_purge_lag = 1;
SELECT @@innodb_max_purge_lag;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_max_purge_lag;
SET global innodb_max_purge_lag = 0;
SELECT @@global.innodb_max_purge_lag;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
##########################################################################
# change the value of innodb_max_purge_lag to a valid value #
##########################################################################
SET @@global.innodb_max_purge_lag = 0;
SELECT @@global.innodb_max_purge_lag;
SET @@global.innodb_max_purge_lag = 1;
SELECT @@global.innodb_max_purge_lag;
SET @@global.innodb_max_purge_lag = 4294967295;
SELECT @@global.innodb_max_purge_lag;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
###########################################################################
# Change the value of innodb_max_purge_lag to invalid value #
###########################################################################
SET @@global.innodb_max_purge_lag = -1;
SELECT @@global.innodb_max_purge_lag;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_max_purge_lag = "T";
SELECT @@global.innodb_max_purge_lag;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_max_purge_lag = "Y";
SELECT @@global.innodb_max_purge_lag;
SET @@global.innodb_max_purge_lag = 1001;
SELECT @@global.innodb_max_purge_lag;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
SELECT @@global.innodb_max_purge_lag =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_purge_lag';
SELECT @@global.innodb_max_purge_lag;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_purge_lag';
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_max_purge_lag = OFF;
SELECT @@global.innodb_max_purge_lag;
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_max_purge_lag = ON;
SELECT @@global.innodb_max_purge_lag;
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.innodb_max_purge_lag = TRUE;
SELECT @@global.innodb_max_purge_lag;
SET @@global.innodb_max_purge_lag = FALSE;
SELECT @@global.innodb_max_purge_lag;
##############################
# Restore initial value #
##############################
SET @@global.innodb_max_purge_lag = @global_start_value;
SELECT @@global.innodb_max_purge_lag;
###############################################################
# END OF innodb_max_purge_lag TESTS #
###############################################################
################# mysql-test\t\innodb_sync_spin_loops_basic.test ##############
# #
# Variable Name: innodb_sync_spin_loops #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 20 #
# Range: 0-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Rizwan #
# #
#Description:Test Cases of Dynamic System Variable innodb_sync_spin_loops #
# 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/have_innodb.inc
--source include/load_sysvars.inc
########################################################################
# START OF innodb_sync_spin_loops TESTS #
########################################################################
############################################################################
# Saving initial value of innodb_sync_spin_loops in a temporary variable #
############################################################################
SET @global_start_value = @@global.innodb_sync_spin_loops;
SELECT @global_start_value;
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
########################################################################
# Display the DEFAULT value of innodb_sync_spin_loops #
########################################################################
SET @@global.innodb_sync_spin_loops = 0;
SET @@global.innodb_sync_spin_loops = DEFAULT;
SELECT @@global.innodb_sync_spin_loops;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
##############################################################################
# Check if innodb_sync_spin_loops can be accessed with and without @@ sign #
##############################################################################
--Error ER_GLOBAL_VARIABLE
SET innodb_sync_spin_loops = 1;
SELECT @@innodb_sync_spin_loops;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_sync_spin_loops;
SET global innodb_sync_spin_loops = 0;
SELECT @@global.innodb_sync_spin_loops;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
##########################################################################
# change the value of innodb_sync_spin_loops to a valid value #
##########################################################################
SET @@global.innodb_sync_spin_loops = 0;
SELECT @@global.innodb_sync_spin_loops;
SET @@global.innodb_sync_spin_loops = 1;
SELECT @@global.innodb_sync_spin_loops;
SET @@global.innodb_sync_spin_loops = 1000;
SELECT @@global.innodb_sync_spin_loops;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
###########################################################################
# Change the value of innodb_sync_spin_loops to invalid value #
###########################################################################
SET @@global.innodb_sync_spin_loops = -1;
SELECT @@global.innodb_sync_spin_loops;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_sync_spin_loops = "T";
SELECT @@global.innodb_sync_spin_loops;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_sync_spin_loops = "Y";
SELECT @@global.innodb_sync_spin_loops;
SET @@global.innodb_sync_spin_loops = 1001;
SELECT @@global.innodb_sync_spin_loops;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
SELECT @@global.innodb_sync_spin_loops =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_sync_spin_loops';
SELECT @@global.innodb_sync_spin_loops;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_sync_spin_loops';
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_sync_spin_loops = OFF;
SELECT @@global.innodb_sync_spin_loops;
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_sync_spin_loops = ON;
SELECT @@global.innodb_sync_spin_loops;
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.innodb_sync_spin_loops = TRUE;
SELECT @@global.innodb_sync_spin_loops;
SET @@global.innodb_sync_spin_loops = FALSE;
SELECT @@global.innodb_sync_spin_loops;
##############################
# Restore initial value #
##############################
SET @@global.innodb_sync_spin_loops = @global_start_value;
SELECT @@global.innodb_sync_spin_loops;
###############################################################
# END OF innodb_sync_spin_loops TESTS #
###############################################################
############## mysql-test\t\join_buffer_size_basic.test ###############
# #
# Variable Name: join_buffer_size #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 131072 #
# Range: 8200-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable join_buffer_size #
# 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 join_buffer_size TESTS #
################################################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.join_buffer_size;
SELECT @start_global_value;
SET @start_session_value = @@session.join_buffer_size;
SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_053_01-------------------------#'
################################################################
# Display the DEFAULT value of join_buffer_size #
################################################################
SET @@global.join_buffer_size = 8200;
SET @@global.join_buffer_size = DEFAULT;
SELECT @@global.join_buffer_size;
SET @@session.join_buffer_size = 8200;
SET @@session.join_buffer_size = DEFAULT;
SELECT @@session.join_buffer_size;
--echo '#--------------------FN_DYNVARS_053_02-------------------------#'
###################################################################
# Check the DEFAULT value of join_buffer_size #
###################################################################
SET @@global.join_buffer_size = DEFAULT;
SELECT @@global.join_buffer_size = 131072;
SET @@session.join_buffer_size = DEFAULT;
SELECT @@session.join_buffer_size = 131072;
--echo '#--------------------FN_DYNVARS_053_03-------------------------#'
##########################################################################
# Change the value of join_buffer_size to a valid value for GLOBAL Scope #
##########################################################################
SET @@global.join_buffer_size = 8200;
SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
SET @@global.join_buffer_size = 65536;
SELECT @@global.join_buffer_size;
SET @@global.join_buffer_size = 4294967295;
SELECT @@global.join_buffer_size;
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--echo '#--------------------FN_DYNVARS_053_04-------------------------#'
###########################################################################
# Change the value of join_buffer_size to a valid value for SESSION Scope #
###########################################################################
SET @@session.join_buffer_size = 8200;
SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
SET @@session.join_buffer_size = 65536;
SELECT @@session.join_buffer_size;
SET @@session.join_buffer_size = 4294967295;
SELECT @@session.join_buffer_size;
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--echo '#------------------FN_DYNVARS_053_05-----------------------#'
############################################################
# Change the value of join_buffer_size to an invalid value #
############################################################
SET @@global.join_buffer_size = 0;
SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
SET @@global.join_buffer_size = -1024;
SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
SET @@global.join_buffer_size = 8199;
SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
SET @@global.join_buffer_size = 42949672951;
SELECT @@global.join_buffer_size;
--Error ER_PARSE_ERROR
SET @@global.join_buffer_size = 65530.34.;
SELECT @@global.join_buffer_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.join_buffer_size = test;
SELECT @@global.join_buffer_size;
SET @@session.join_buffer_size = 0;
SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
SET @@session.join_buffer_size = -2;
SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
SET @@session.join_buffer_size = 8199;
SELECT @@session.join_buffer_size=8200 OR @@session.join_buffer_size= 8228;
SET @@session.join_buffer_size = 42949672951;
SELECT @@session.join_buffer_size;
--Error ER_PARSE_ERROR
SET @@session.join_buffer_size = 65530.34.;
SELECT @@session.join_buffer_size;
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.join_buffer_size = test;
SELECT @@session.join_buffer_size;
--echo '#------------------FN_DYNVARS_053_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SELECT @@global.join_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='join_buffer_size';
--echo '#------------------FN_DYNVARS_053_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
SELECT @@session.join_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='join_buffer_size';
--echo '#------------------FN_DYNVARS_053_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.join_buffer_size = TRUE;
SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
SET @@global.join_buffer_size = FALSE;
SELECT @@global.join_buffer_size=8200 OR @@global.join_buffer_size= 8228;
--echo 'Bug: Errors are not coming on assigning TRUE/FALSE to variable';
--echo '#---------------------FN_DYNVARS_001_09----------------------#'
#################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
#################################################################################
SET @@global.join_buffer_size = 10;
SELECT @@join_buffer_size = @@global.join_buffer_size;
--echo '#---------------------FN_DYNVARS_001_10----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@join_buffer_size = 100;
SELECT @@join_buffer_size = @@local.join_buffer_size;
SELECT @@local.join_buffer_size = @@session.join_buffer_size;
--echo '#---------------------FN_DYNVARS_001_11----------------------#'
##############################################################################
# Check if join_buffer_size can be accessed with and without @@ sign #
##############################################################################
SET join_buffer_size = 1;
SELECT @@join_buffer_size=8200 OR @@join_buffer_size= 8228;
--Error ER_UNKNOWN_TABLE
SELECT local.join_buffer_size;
--Error ER_UNKNOWN_TABLE
SELECT session.join_buffer_size;
--Error ER_BAD_FIELD_ERROR
SELECT join_buffer_size = @@session.join_buffer_size;
####################################
# Restore initial value #
####################################
SET @@global.join_buffer_size = @start_global_value;
SELECT @@global.join_buffer_size;
SET @@session.join_buffer_size = @start_session_value;
SELECT @@session.join_buffer_size;
########################################################
# END OF join_buffer_size TESTS #
########################################################
############## mysql-test\t\key_buffer_size_basic.test ########################
# #
# Variable Name: key_buffer_size #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 131072 #
# Range:8-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable key_buffer_size #
# 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 #
# #
###############################################################################
# Changes: #
# 2008-03-06 hhunger Got "lost connections with 5.1.24 #
########################################################################
--source include/load_sysvars.inc
########################################################################
# START OF key_buffer_size TESTS #
########################################################################
--disable_warnings
########################################################################
# Saving initial value of key_buffer_size in a temporary variable #
########################################################################
SET @start_value = @@global.key_buffer_size;
SELECT @start_value;
--echo '#--------------------FN_DYNVARS_055_01------------------------#'
########################################################################
# Display the DEFAULT value of key_buffer_size #
########################################################################
SET @@global.key_buffer_size = 99;
--Error ER_NO_DEFAULT
SET @@global.key_buffer_size = DEFAULT;
--echo 'Bug# 34878: This variable has default value according to documentation';
SELECT @@global.key_buffer_size = @min_key_buffer_size;
--echo '#---------------------FN_DYNVARS_055_02-------------------------#'
###############################################
# Verify default value of variable #
###############################################
SET @@global.key_buffer_size = @start_value;
SELECT @@global.key_buffer_size = @start_value;
--echo '#--------------------FN_DYNVARS_055_03------------------------#'
########################################################################
# Change the value of key_buffer_size to a valid value #
########################################################################
SET @@global.key_buffer_size = @min_key_buffer_size;
SELECT @@global.key_buffer_size= @min_key_buffer_size;
--disable_warnings
#Due to "lost connection"
#SET @@global.key_buffer_size = 4294967295;
--enable_warnings
#SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 1800;
SELECT @@global.key_buffer_size = @min_key_buffer_size;
SET @@global.key_buffer_size = 65535;
SELECT @@global.key_buffer_size;
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--echo '#--------------------FN_DYNVARS_055_04-------------------------#'
###########################################################################
# Change the value of key_buffer_size to invalid value #
###########################################################################
# Due to "lost connection"
#SET @@global.key_buffer_size = -1;
#SELECT @@global.key_buffer_size;
#SET @@global.key_buffer_size = 100000000000;
#SELECT @@global.key_buffer_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_buffer_size = 10000.01;
SELECT @@global.key_buffer_size;
#SET @@global.key_buffer_size = -1024;
#SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 4;
SELECT @@global.key_buffer_size = @min_key_buffer_size;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_buffer_size = ON;
SELECT @@global.key_buffer_size = @min_key_buffer_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_buffer_size = 'test';
SELECT @@global.key_buffer_size = @min_key_buffer_size;
--echo '#-------------------FN_DYNVARS_055_05----------------------------#'
###########################################################################
# Test if accessing session key_buffer_size gives error #
###########################################################################
--Error ER_GLOBAL_VARIABLE
SET @@session.key_buffer_size = 0;
SELECT @@key_buffer_size = @min_key_buffer_size;
--echo '#----------------------FN_DYNVARS_055_06------------------------#'
##############################################################################
# Check if the value in GLOBAL & SESSION Tables matches values in variable #
##############################################################################
SELECT @@global.key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='key_buffer_size';
SELECT @@key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='key_buffer_size';
--echo '#---------------------FN_DYNVARS_055_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.key_buffer_size = TRUE;
SELECT @@global.key_buffer_size = @min_key_buffer_size;
SET @@global.key_buffer_size = FALSE;
SELECT @@global.key_buffer_size = @min_key_buffer_size;
--echo '#---------------------FN_DYNVARS_055_08----------------------#'
#####################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE #
# points to same session variable #
#####################################################################
# due to differences in contents of the warnings
--disable_warnings
SET @@global.key_buffer_size = @min_key_buffer_size;
SELECT @@key_buffer_size = @@global.key_buffer_size;
--enable_warnings
--echo '#---------------------FN_DYNVARS_055_09----------------------#'
##########################################################################
# Check if key_buffer_size can be accessed with and without @@ sign #
##########################################################################
--Error ER_GLOBAL_VARIABLE
SET key_buffer_size = @min_key_buffer_size;
SELECT @@key_buffer_size = @min_key_buffer_size;
--Error ER_PARSE_ERROR
SET local.key_buffer_size = 10;
--Error ER_UNKNOWN_TABLE
SELECT local.key_buffer_size;
--Error ER_PARSE_ERROR
SET global.key_buffer_size = 10;
--Error ER_UNKNOWN_TABLE
SELECT global.key_buffer_size;
--Error ER_BAD_FIELD_ERROR
SELECT key_buffer_size = @@session.key_buffer_size;
##############################
# Restore initial value #
##############################
SET @@global.key_buffer_size = @start_value;
SELECT @@global.key_buffer_size;
--enable_warnings
#######################################################################
# END OF key_buffer_size TESTS #
#######################################################################
############## mysql-test\t\key_cache_age_threshold_basic.test ###############
# #
# Variable Name: key_cache_age_threshold #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 300 #
# Range: 100-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable key_cache_age_threshold #
# 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 key_cache_age_threshold TESTS #
########################################################################
#############################################################################
# Saving initial value of key_cache_age_threshold in a temporary variable #
#############################################################################
SET @start_value = @@global.key_cache_age_threshold;
SELECT @start_value;
--echo '#--------------------FN_DYNVARS_056_01------------------------#'
################################################################################
# Display the DEFAULT value of key_cache_age_threshold #
################################################################################
SET @@global.key_cache_age_threshold = 99;
--Error ER_NO_DEFAULT
SET @@global.key_cache_age_threshold = DEFAULT;
--echo 'Bug# 34878: This variable has default value according to documentation';
SELECT @@global.key_cache_age_threshold;
--echo '#---------------------FN_DYNVARS_056_02-------------------------#'
###############################################
# Verify default value of variable #
###############################################
SET @@global.key_cache_age_threshold = @start_value;
SELECT @@global.key_cache_age_threshold = 300;
--echo '#--------------------FN_DYNVARS_056_03------------------------#'
###############################################################################
# Change the value of key_cache_age_threshold to a valid value #
###############################################################################
SET @@global.key_cache_age_threshold = 100;
SELECT @@global.key_cache_age_threshold;
SET @@global.key_cache_age_threshold = 4294967295;
SELECT @@global.key_cache_age_threshold;
SET @@global.key_cache_age_threshold = 1800;
SELECT @@global.key_cache_age_threshold;
SET @@global.key_cache_age_threshold = 65535;
SELECT @@global.key_cache_age_threshold;
--echo 'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
--echo '#--------------------FN_DYNVARS_056_04-------------------------#'
###########################################################################
# Change the value of key_cache_age_threshold to invalid value #
###########################################################################
SET @@global.key_cache_age_threshold = -1;
SELECT @@global.key_cache_age_threshold;
SET @@global.key_cache_age_threshold = 42949672951;
SELECT @@global.key_cache_age_threshold;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_cache_age_threshold = 10000.01;
SELECT @@global.key_cache_age_threshold;
SET @@global.key_cache_age_threshold = -1024;
SELECT @@global.key_cache_age_threshold;
SET @@global.key_cache_age_threshold = 99;
SELECT @@global.key_cache_age_threshold;
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_cache_age_threshold = ON;
SELECT @@global.key_cache_age_threshold;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_cache_age_threshold = 'test';
SELECT @@global.key_cache_age_threshold;
--echo '#-------------------FN_DYNVARS_056_05----------------------------#'
###########################################################################
# Test if accessing session key_cache_age_threshold gives error #
###########################################################################
--Error ER_GLOBAL_VARIABLE
SET @@session.key_cache_age_threshold = 0;
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.key_cache_age_threshold;
--echo '#----------------------FN_DYNVARS_056_06------------------------#'
##############################################################################
# Check if the value in GLOBAL & SESSION Tables matches values in variable #
##############################################################################
SELECT @@global.key_cache_age_threshold = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='key_cache_age_threshold';
SELECT @@key_cache_age_threshold = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='key_cache_age_threshold';
--echo '#---------------------FN_DYNVARS_056_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.key_cache_age_threshold = TRUE;
SELECT @@global.key_cache_age_threshold;
SET @@global.key_cache_age_threshold = FALSE;
SELECT @@global.key_cache_age_threshold;
--echo '#---------------------FN_DYNVARS_056_08----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@global.key_cache_age_threshold = 101;
SELECT @@key_cache_age_threshold = @@global.key_cache_age_threshold;
--echo '#---------------------FN_DYNVARS_056_09----------------------#'
########################################################################## #######
# Check if key_cache_age_threshold can be accessed with and without @@ sign #
##################################################################################
--Error ER_GLOBAL_VARIABLE
SET key_cache_age_threshold = 8000;
SELECT @@key_cache_age_threshold;
--Error ER_PARSE_ERROR
SET local.key_cache_age_threshold = 10;
--Error ER_UNKNOWN_TABLE
SELECT local.key_cache_age_threshold;
--Error ER_PARSE_ERROR
SET global.key_cache_age_threshold = 10;
--Error ER_UNKNOWN_TABLE
SELECT global.key_cache_age_threshold;
--Error ER_BAD_FIELD_ERROR
SELECT key_cache_age_threshold = @@session.key_cache_age_threshold;
##############################
# Restore initial value #
##############################
SET @@global.key_cache_age_threshold = @start_value;
SELECT @@global.key_cache_age_threshold;
########################################################################
# END OF key_cache_age_threshold TESTS #
########################################################################
############## mysql-test\t\key_cache_block_size_basic.test ###############
# #
# Variable Name: key_cache_block_size #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: numeric 1024 #
# Default Value: #
# Range: 512-16384 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable key_cache_block_size #
# 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 key_cache_block_size TESTS #
#####################################################################
##########################################################################
# Saving initial value of key_cache_block_size in a temporary variable #
##########################################################################
SET @start_value = @@global.key_cache_block_size;
SELECT @start_value;
--echo '#--------------------FN_DYNVARS_057_01------------------------#'
################################################################################
# Display the DEFAULT value of key_cache_block_size #
################################################################################
SET @@global.key_cache_block_size = 600;
--Error ER_NO_DEFAULT
SET @@global.key_cache_block_size = DEFAULT;
--echo 'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
SELECT @@global.key_cache_block_size;
--echo '#---------------------FN_DYNVARS_057_02-------------------------#'
###############################################
# Verify default value of variable #
###############################################
SET @@global.key_cache_block_size = @start_value;
SELECT @@global.key_cache_block_size = 1024;
--echo '#--------------------FN_DYNVARS_057_03------------------------#'
###############################################################################
# Change the value of key_cache_block_size to a valid value #
###############################################################################
SET @@global.key_cache_block_size = 1024;
SELECT @@global.key_cache_block_size;
SET @@global.key_cache_block_size = 16384;
SELECT @@global.key_cache_block_size;
SET @@global.key_cache_block_size = 1800;
SELECT @@global.key_cache_block_size;
SET @@global.key_cache_block_size = 16383;
SELECT @@global.key_cache_block_size;
--echo 'Bug# 34877 : Invalid Values are coming in variable on assigning valid values and Out Of Memory Warnings are coming';
--echo '#--------------------FN_DYNVARS_057_04-------------------------#'
###########################################################################
# Change the value of key_cache_block_size to invalid value #
###########################################################################
SET @@global.key_cache_block_size = -1;
SELECT @@global.key_cache_block_size;
SET @@global.key_cache_block_size = 42949672951;
SELECT @@global.key_cache_block_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_cache_block_size = 10000.01;
SELECT @@global.key_cache_block_size;
SET @@global.key_cache_block_size = -1024;
SELECT @@global.key_cache_block_size;
SET @@global.key_cache_block_size = 256;
SELECT @@global.key_cache_block_size;
SET @@global.key_cache_block_size = 511;
SELECT @@global.key_cache_block_size;
SET @@global.key_cache_block_size = 16385;
SELECT @@global.key_cache_block_size;
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_cache_block_size = ON;
SELECT @@global.key_cache_block_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_cache_block_size = 'test';
SELECT @@global.key_cache_block_size;
--echo '#-------------------FN_DYNVARS_057_05----------------------------#'
###########################################################################
# Test if accessing session key_cache_block_size gives error #
###########################################################################
--Error ER_GLOBAL_VARIABLE
SET @@session.key_cache_block_size = 0;
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.key_cache_block_size;
--echo '#----------------------FN_DYNVARS_057_06------------------------#'
##############################################################################
# Check if the value in GLOBAL & SESSION Tables matches values in variable #
##############################################################################
SELECT @@global.key_cache_block_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='key_cache_block_size';
SELECT @@key_cache_block_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='key_cache_block_size';
--echo '#---------------------FN_DYNVARS_057_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.key_cache_block_size = TRUE;
SELECT @@global.key_cache_block_size;
SET @@global.key_cache_block_size = FALSE;
SELECT @@global.key_cache_block_size;
--echo '#---------------------FN_DYNVARS_057_08----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@global.key_cache_block_size = 1024;
SELECT @@key_cache_block_size = @@global.key_cache_block_size;
--echo '#---------------------FN_DYNVARS_057_09----------------------#'
###############################################################################
# Check if key_cache_block_size can be accessed with and without @@ sign #
###############################################################################;
--Error ER_GLOBAL_VARIABLE
SET key_cache_block_size = 8000;
SELECT @@key_cache_block_size;
--Error ER_PARSE_ERROR
SET local.key_cache_block_size = 10;
--Error ER_UNKNOWN_TABLE
SELECT local.key_cache_block_size;
--Error ER_PARSE_ERROR
SET global.key_cache_block_size = 10;
--Error ER_UNKNOWN_TABLE
SELECT global.key_cache_block_size;
--Error ER_BAD_FIELD_ERROR
SELECT key_cache_block_size = @@session.key_cache_block_size;
##############################
# Restore initial value #
##############################
SET @@global.key_cache_block_size = @start_value;
SELECT @@global.key_cache_block_size;
#####################################################################
# END OF key_cache_block_size TESTS #
#####################################################################
############## mysql-test\t\key_cache_division_limit_basic.test ###############
# #
# Variable Name: key_cache_division_limit #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 100 #
# Range: 1-100 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable key_cache_division_limit #
# 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 key_cache_division_limit TESTS #
#####################################################################
##############################################################################
# Saving initial value of key_cache_division_limit in a temporary variable #
##############################################################################
SET @start_value = @@global.key_cache_division_limit;
SELECT @start_value;
--echo '#--------------------FN_DYNVARS_058_01------------------------#'
################################################################################
# Display the DEFAULT value of key_cache_division_limit #
################################################################################
SET @@global.key_cache_division_limit = 50;
--Error ER_NO_DEFAULT
SET @@global.key_cache_division_limit = DEFAULT;
--echo 'Bug# 34878: This variable has default value according to documentation';
SELECT @@global.key_cache_division_limit;
--echo '#---------------------FN_DYNVARS_058_02-------------------------#'
###############################################
# Verify default value of variable #
###############################################
SET @@global.key_cache_division_limit = @start_value;
SELECT @@global.key_cache_division_limit = 100;
--echo '#--------------------FN_DYNVARS_058_03------------------------#'
###############################################################################
# Change the value of key_cache_division_limit to a valid value #
###############################################################################
SET @@global.key_cache_division_limit = 1;
SELECT @@global.key_cache_division_limit;
SET @@global.key_cache_division_limit = 50;
SELECT @@global.key_cache_division_limit;
SET @@global.key_cache_division_limit = 99;
SELECT @@global.key_cache_division_limit;
SET @@global.key_cache_division_limit = 2;
SELECT @@global.key_cache_division_limit;
--echo '#--------------------FN_DYNVARS_058_04-------------------------#'
###########################################################################
# Change the value of key_cache_division_limit to invalid value #
###########################################################################
SET @@global.key_cache_division_limit = -1;
SELECT @@global.key_cache_division_limit;
SET @@global.key_cache_division_limit = 101;
SELECT @@global.key_cache_division_limit;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_cache_division_limit = 10000.01;
SELECT @@global.key_cache_division_limit;
SET @@global.key_cache_division_limit = -1024;
SELECT @@global.key_cache_division_limit;
SET @@global.key_cache_division_limit = 0;
SELECT @@global.key_cache_division_limit;
SET @@global.key_cache_division_limit = 200;
SELECT @@global.key_cache_division_limit;
SET @@global.key_cache_division_limit = 65535;
SELECT @@global.key_cache_division_limit;
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_cache_division_limit = ON;
SELECT @@global.key_cache_division_limit;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_cache_division_limit = 'test';
SELECT @@global.key_cache_division_limit;
--echo '#-------------------FN_DYNVARS_058_05----------------------------#'
###########################################################################
# Test if accessing session key_cache_division_limit gives error #
###########################################################################
--Error ER_GLOBAL_VARIABLE
SET @@session.key_cache_division_limit = 0;
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.key_cache_division_limit;
--echo '#----------------------FN_DYNVARS_058_06------------------------#'
##############################################################################
# Check if the value in GLOBAL & SESSION Tables matches values in variable #
##############################################################################
SELECT @@global.key_cache_division_limit = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='key_cache_division_limit';
SELECT @@key_cache_division_limit = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='key_cache_division_limit';
--echo '#---------------------FN_DYNVARS_058_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.key_cache_division_limit = TRUE;
SELECT @@global.key_cache_division_limit;
SET @@global.key_cache_division_limit = FALSE;
SELECT @@global.key_cache_division_limit;
--echo '#---------------------FN_DYNVARS_058_08----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@global.key_cache_division_limit = 90;
SELECT @@key_cache_division_limit = @@global.key_cache_division_limit;
--echo '#---------------------FN_DYNVARS_058_09----------------------#'
###############################################################################
# Check if key_cache_division_limit can be accessed with and without @@ sign #
###############################################################################;
--Error ER_GLOBAL_VARIABLE
SET key_cache_division_limit = 80;
SELECT @@key_cache_division_limit;
--Error ER_PARSE_ERROR
SET local.key_cache_division_limit = 10;
--Error ER_UNKNOWN_TABLE
SELECT local.key_cache_division_limit;
--Error ER_PARSE_ERROR
SET global.key_cache_division_limit = 10;
--Error ER_UNKNOWN_TABLE
SELECT global.key_cache_division_limit;
--Error ER_BAD_FIELD_ERROR
SELECT key_cache_division_limit = @@session.key_cache_division_limit;
##############################
# Restore initial value #
##############################
SET @@global.key_cache_division_limit = @start_value;
SELECT @@global.key_cache_division_limit;
#####################################################################
# END OF key_cache_division_limit TESTS #
#####################################################################
# #
# This script is included by every test to include system dependant variables' # This script is included by tests of system variables to include system
# default, minimum and maximum values # dependant values for the variables: default, minimum and maximum values
# #
if (`SELECT convert(@@version_compile_os using latin1)
if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows")`) IN ('Win32','Win64','Windows')`)
{ {
--source include/windows_sys_vars.inc --source include/windows_sys_vars.inc
} }
if (`select convert(@@version_compile_os using latin1) IN ("suse-linux-gnu","redhat-linux-gnu","pc-solaris2.10")`) if (!`SELECT convert(@@version_compile_os using latin1)
IN ('Win32','Win64','Windows')`)
{ {
--source include/linux_sys_vars.inc --source include/linux_sys_vars.inc
} }
############## mysql-test\t\log_warnings_basic.test ###############
# #
# Variable Name: log_warnings #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 1 #
# Range: - #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable log_warnings #
# 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_warnings TESTS #
############################################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.log_warnings;
SELECT @start_global_value;
SET @start_session_value = @@session.log_warnings;
SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_067_01-------------------------#'
########################################################################
# Display the DEFAULT value of log_warnings #
########################################################################
SET @@global.log_warnings = 100;
SET @@global.log_warnings = DEFAULT;
SELECT @@global.log_warnings;
SET @@session.log_warnings = 200;
SET @@session.log_warnings = DEFAULT;
SELECT @@session.log_warnings;
--echo '#--------------------FN_DYNVARS_067_02-------------------------#'
########################################################################
# Check the DEFAULT value of log_warnings #
########################################################################
SET @@global.log_warnings = DEFAULT;
SELECT @@global.log_warnings = 1;
SET @@session.log_warnings = DEFAULT;
SELECT @@session.log_warnings = 1;
--echo '#--------------------FN_DYNVARS_067_03-------------------------#'
######################################################################
# Change the value of log_warnings to a valid value for GLOBAL Scope #
######################################################################
SET @@global.log_warnings = 0;
SELECT @@global.log_warnings;
SET @@global.log_warnings = 1;
SELECT @@global.log_warnings;
SET @@global.log_warnings = 60020;
SELECT @@global.log_warnings;
SET @@global.log_warnings = 65535;
SELECT @@global.log_warnings;
SET @@global.log_warnings = 65536;
SELECT @@global.log_warnings;
--echo '#--------------------FN_DYNVARS_067_04-------------------------#'
#######################################################################
# Change the value of log_warnings to a valid value for SESSION Scope #
#######################################################################
SET @@session.log_warnings = 0;
SELECT @@session.log_warnings;
SET @@session.log_warnings = 1;
SELECT @@session.log_warnings;
SET @@session.log_warnings = 50050;
SELECT @@session.log_warnings;
SET @@session.log_warnings = 65535;
SELECT @@session.log_warnings;
SET @@session.log_warnings = 65550;
SELECT @@session.log_warnings;
--echo '#------------------FN_DYNVARS_067_05-----------------------#'
########################################################
# Change the value of log_warnings to an invalid value #
########################################################
SET @@global.log_warnings = 100000000000;
SELECT @@global.log_warnings;
SET @@global.log_warnings = -1024;
SELECT @@global.log_warnings;
--Error ER_PARSE_ERROR
SET @@global.log_warnings = 65530.34.;
SELECT @@global.log_warnings;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.log_warnings = test;
SELECT @@global.log_warnings;
SET @@session.log_warnings = 100000000000;
SELECT @@session.log_warnings;
SET @@session.log_warnings = -2;
SELECT @@session.log_warnings;
--Error ER_PARSE_ERROR
SET @@session.log_warnings = 65530.34.;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.log_warnings = test;
SELECT @@session.log_warnings;
--echo '#------------------FN_DYNVARS_067_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SELECT @@global.log_warnings = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_warnings';
--echo '#------------------FN_DYNVARS_067_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
SELECT @@session.log_warnings = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='log_warnings';
--echo '#------------------FN_DYNVARS_067_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.log_warnings = TRUE;
SELECT @@global.log_warnings;
SET @@global.log_warnings = FALSE;
SELECT @@global.log_warnings;
--echo '#---------------------FN_DYNVARS_067_09----------------------#'
#################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
#################################################################################
SET @@global.log_warnings = 10;
SELECT @@log_warnings = @@global.log_warnings;
--echo '#---------------------FN_DYNVARS_067_10----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@log_warnings = 100;
SELECT @@log_warnings = @@local.log_warnings;
SELECT @@local.log_warnings = @@session.log_warnings;
--echo '#---------------------FN_DYNVARS_067_11----------------------#'
#######################################################################
# Check if log_warnings can be accessed with and without @@ sign #
#######################################################################
SET log_warnings = 1;
SELECT @@log_warnings;
--Error ER_UNKNOWN_TABLE
SELECT local.log_warnings;
--Error ER_UNKNOWN_TABLE
SELECT session.log_warnings;
--Error ER_BAD_FIELD_ERROR
SELECT log_warnings = @@session.log_warnings;
####################################
# Restore initial value #
####################################
SET @@global.log_warnings = @start_global_value;
SELECT @@global.log_warnings;
SET @@session.log_warnings = @start_session_value;
SELECT @@session.log_warnings;
#############################################################
# END OF log_warnings TESTS #
#############################################################
############## mysql-test\t\max_binlog_cache_size_basic.test ###############
# #
# Variable Name: max_binlog_cache_size #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value:4294967295 #
# Range: 4096-4294967295 #
# #
# #
# #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable max_binlog_cache_size #
# 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 max_binlog_cache_size TESTS #
########################################################################
########################################################################
# Saving initial value of max_binlog_cache_size in a temporary variable#
########################################################################
SET @start_value = @@global.max_binlog_cache_size;
SELECT @start_value;
--echo '#--------------------FN_DYNVARS_072_01------------------------#'
########################################################################
# Display the DEFAULT value of max_binlog_cache_size #
########################################################################
SET @@global.max_binlog_cache_size = 5000;
SET @@global.max_binlog_cache_size = DEFAULT;
SELECT @@global.max_binlog_cache_size;
--echo '#---------------------FN_DYNVARS_072_02-------------------------#'
###############################################
# Verify default value of variable #
###############################################
SET @@global.max_binlog_cache_size = @start_value;
SELECT @@global.max_binlog_cache_size = 4294967295;
--echo 'Bug# 34876: Incorrect Default Value is assigned to variable';
--echo '#--------------------FN_DYNVARS_072_03------------------------#'
########################################################################
# Change the value of max_binlog_cache_size to a valid value #
########################################################################
SET @@global.max_binlog_cache_size = 4096;
SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = 4294967295;
SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = 4294967294;
SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = 4097;
SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = 65535;
SELECT @@global.max_binlog_cache_size;
--echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#--------------------FN_DYNVARS_072_04-------------------------#'
###########################################################################
# Change the value of max_binlog_cache_size to invalid value #
###########################################################################
SET @@global.max_binlog_cache_size = -1;
SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = 100000000000;
SELECT @@global.max_binlog_cache_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_binlog_cache_size = 10000.01;
SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = -1024;
SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = 1024;
SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = 4294967296;
SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = 4095;
SELECT @@global.max_binlog_cache_size;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_binlog_cache_size = ON;
SELECT @@global.max_binlog_cache_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_binlog_cache_size = 'test';
SELECT @@global.max_binlog_cache_size;
--echo '#-------------------FN_DYNVARS_072_05----------------------------#'
###########################################################################
# Test if accessing session max_binlog_cache_size gives error #
###########################################################################
--Error ER_GLOBAL_VARIABLE
SET @@session.max_binlog_cache_size = 4096;
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.max_binlog_cache_size;
--echo '#----------------------FN_DYNVARS_072_06------------------------#'
##############################################################################
# Check if the value in GLOBAL & SESSION Tables matches values in variable #
##############################################################################
SELECT @@global.max_binlog_cache_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='max_binlog_cache_size';
SELECT @@max_binlog_cache_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='max_binlog_cache_size';
--echo '#---------------------FN_DYNVARS_072_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.max_binlog_cache_size = TRUE;
SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = FALSE;
SELECT @@global.max_binlog_cache_size;
--echo '#---------------------FN_DYNVARS_072_08----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@global.max_binlog_cache_size = 5000;
SELECT @@max_binlog_cache_size = @@global.max_binlog_cache_size;
--echo '#---------------------FN_DYNVARS_072_09----------------------#'
################################################################################
# Check if max_binlog_cache_size can be accessed with and without @@ sign #
################################################################################
--Error ER_GLOBAL_VARIABLE
SET max_binlog_cache_size = 6000;
SELECT @@max_binlog_cache_size;
--Error ER_PARSE_ERROR
SET local.max_binlog_cache_size = 7000;
--Error ER_UNKNOWN_TABLE
SELECT local.max_binlog_cache_size;
--Error ER_PARSE_ERROR
SET global.max_binlog_cache_size = 8000;
--Error ER_UNKNOWN_TABLE
SELECT global.max_binlog_cache_size;
--Error ER_BAD_FIELD_ERROR
SELECT max_binlog_cache_size = @@session.max_binlog_cache_size;
##############################
# Restore initial value #
##############################
SET @@global.max_binlog_cache_size = @start_value;
SELECT @@global.max_binlog_cache_size;
########################################################################
# END OF max_binlog_cache_size TESTS #
########################################################################
############## mysql-test\t\max_connect_errors_basic.test ###############
# #
# Variable Name: max_connect_errors #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 10 #
# Range: 1-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable max_connect_errors #
# 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 max_connect_errors TESTS #
##################################################################
######################################################################
# Saving initial value of max_connect_errors in a temporary variable #
######################################################################
SET @start_value = @@global.max_connect_errors;
SELECT @start_value;
--echo '#--------------------FN_DYNVARS_073_01------------------------#'
##################################################################
# Display the DEFAULT value of max_connect_errors #
##################################################################
SET @@global.max_connect_errors = 5000;
SET @@global.max_connect_errors = DEFAULT;
SELECT @@global.max_connect_errors;
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
--echo '#---------------------FN_DYNVARS_073_02-------------------------#'
###############################################
# Verify default value of variable #
###############################################
SET @@global.max_connect_errors = @start_value;
SELECT @@global.max_connect_errors = 10;
--echo '#--------------------FN_DYNVARS_073_03------------------------#'
##################################################################
# Change the value of max_connect_errors to a valid value #
##################################################################
SET @@global.max_connect_errors = 4096;
SELECT @@global.max_connect_errors;
SET @@global.max_connect_errors = 4294967294;
SELECT @@global.max_connect_errors;
SET @@global.max_connect_errors = 4294967295;
SELECT @@global.max_connect_errors;
SET @@global.max_connect_errors = 1;
SELECT @@global.max_connect_errors;
SET @@global.max_connect_errors = 2;
SELECT @@global.max_connect_errors;
--echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#--------------------FN_DYNVARS_073_04-------------------------#'
#####################################################################
# Change the value of max_connect_errors to invalid value #
#####################################################################
SET @@global.max_connect_errors = -1;
SELECT @@global.max_connect_errors;
SET @@global.max_connect_errors = 100000000000;
SELECT @@global.max_connect_errors;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_connect_errors = 10000.01;
SELECT @@global.max_connect_errors;
SET @@global.max_connect_errors = -1024;
SELECT @@global.max_connect_errors;
SET @@global.max_connect_errors = 0;
SELECT @@global.max_connect_errors;
SET @@global.max_connect_errors = 4294967296;
SELECT @@global.max_connect_errors;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_connect_errors = ON;
SELECT @@global.max_connect_errors;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_connect_errors = 'test';
SELECT @@global.max_connect_errors;
--echo '#-------------------FN_DYNVARS_073_05----------------------------#'
#####################################################################
# Test if accessing session max_connect_errors gives error #
#####################################################################
--Error ER_GLOBAL_VARIABLE
SET @@session.max_connect_errors = 4096;
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.max_connect_errors;
--echo '#----------------------FN_DYNVARS_073_06------------------------#'
##############################################################################
# Check if the value in GLOBAL & SESSION Tables matches values in variable #
##############################################################################
SELECT @@global.max_connect_errors = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='max_connect_errors';
SELECT @@max_connect_errors = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='max_connect_errors';
--echo '#---------------------FN_DYNVARS_073_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.max_connect_errors = TRUE;
SELECT @@global.max_connect_errors;
SET @@global.max_connect_errors = FALSE;
SELECT @@global.max_connect_errors;
--echo '#---------------------FN_DYNVARS_073_08----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@global.max_connect_errors = 5000;
SELECT @@max_connect_errors = @@global.max_connect_errors;
--echo '#---------------------FN_DYNVARS_073_09----------------------#'
##########################################################################
# Check if max_connect_errors can be accessed with and without @@ sign #
##########################################################################
--Error ER_GLOBAL_VARIABLE
SET max_connect_errors = 6000;
SELECT @@max_connect_errors;
--Error ER_PARSE_ERROR
SET local.max_connect_errors = 7000;
--Error ER_UNKNOWN_TABLE
SELECT local.max_connect_errors;
--Error ER_PARSE_ERROR
SET global.max_connect_errors = 8000;
--Error ER_UNKNOWN_TABLE
SELECT global.max_connect_errors;
--Error ER_BAD_FIELD_ERROR
SELECT max_connect_errors = @@session.max_connect_errors;
##############################
# Restore initial value #
##############################
SET @@global.max_connect_errors = @start_value;
SELECT @@global.max_connect_errors;
##################################################################
# END OF max_connect_errors TESTS #
##################################################################
############## mysql-test\t\max_heap_table_size_basic.test ###############
# #
# Variable Name: max_heap_table_size #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 16777216 #
# Range: 16384-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable max_heap_table_size #
# 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 max_heap_table_size TESTS #
###############################################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.max_heap_table_size;
SELECT @start_global_value;
SET @start_session_value = @@session.max_heap_table_size;
SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_077_01-------------------------#'
###############################################################
# Display the DEFAULT value of max_heap_table_size #
###############################################################
SET @@global.max_heap_table_size = 1677721610;
SET @@global.max_heap_table_size = DEFAULT;
SELECT @@global.max_heap_table_size;
SET @@session.max_heap_table_size = 1677721610;
SET @@session.max_heap_table_size = DEFAULT;
SELECT @@session.max_heap_table_size;
--echo '#--------------------FN_DYNVARS_077_02-------------------------#'
##################################################################
# Check the DEFAULT value of max_heap_table_size #
##################################################################
SET @@global.max_heap_table_size = DEFAULT;
SELECT @@global.max_heap_table_size = 16777216;
SET @@session.max_heap_table_size = DEFAULT;
SELECT @@session.max_heap_table_size = 16777216;
--echo '#--------------------FN_DYNVARS_077_03-------------------------#'
############################################################################
# Change the value of max_heap_table_size to a valid value for GLOBAL Scope #
############################################################################
SET @@global.max_heap_table_size = 16384;
SELECT @@global.max_heap_table_size;
SET @@global.max_heap_table_size = 16385;
SELECT @@global.max_heap_table_size;
SET @@global.max_heap_table_size = 65535;
SELECT @@global.max_heap_table_size;
SET @@global.max_heap_table_size = 4294967294;
SELECT @@global.max_heap_table_size;
SET @@global.max_heap_table_size = 4294967295;
SELECT @@global.max_heap_table_size;
--echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#--------------------FN_DYNVARS_077_04-------------------------#'
#############################################################################
# Change the value of max_heap_table_size to a valid value for SESSION Scope #
#############################################################################
SET @@session.max_heap_table_size = 16384;
SELECT @@session.max_heap_table_size;
SET @@session.max_heap_table_size = 16385;
SELECT @@session.max_heap_table_size;
SET @@session.max_heap_table_size = 65535;
SELECT @@session.max_heap_table_size;
SET @@session.max_heap_table_size = 4294967294;
SELECT @@session.max_heap_table_size;
SET @@session.max_heap_table_size = 4294967295;
SELECT @@session.max_heap_table_size;
--echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values';
--echo '#------------------FN_DYNVARS_077_05-----------------------#'
##############################################################
# Change the value of max_heap_table_size to an invalid value #
##############################################################
SET @@global.max_heap_table_size = -1;
SELECT @@global.max_heap_table_size;
SET @@global.max_heap_table_size = -1024;
SELECT @@global.max_heap_table_size;
SET @@global.max_heap_table_size = 1024;
SELECT @@global.max_heap_table_size;
SET @@global.max_heap_table_size = 16383;
SELECT @@global.max_heap_table_size;
SET @@global.max_heap_table_size = 4294967296;
SELECT @@global.max_heap_table_size;
--Error ER_PARSE_ERROR
SET @@global.max_heap_table_size = 65530.34.;
SELECT @@global.max_heap_table_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_heap_table_size = test;
SELECT @@global.max_heap_table_size;
SET @@session.max_heap_table_size = -1;
SELECT @@session.max_heap_table_size;
SET @@session.max_heap_table_size = 16383;
SELECT @@session.max_heap_table_size;
SET @@session.max_heap_table_size = 4294967296;
SELECT @@session.max_heap_table_size;
--Error ER_PARSE_ERROR
SET @@session.max_heap_table_size = 65530.34.;
SET @@session.max_heap_table_size = 10737418241;
SELECT @@session.max_heap_table_size;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.max_heap_table_size = test;
SELECT @@session.max_heap_table_size;
--echo '#------------------FN_DYNVARS_077_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SELECT @@global.max_heap_table_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='max_heap_table_size';
--echo '#------------------FN_DYNVARS_077_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
SELECT @@session.max_heap_table_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='max_heap_table_size';
--echo '#------------------FN_DYNVARS_077_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.max_heap_table_size = TRUE;
SELECT @@global.max_heap_table_size;
SET @@global.max_heap_table_size = FALSE;
SELECT @@global.max_heap_table_size;
--echo '#---------------------FN_DYNVARS_077_09----------------------#'
#################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
#################################################################################
SET @@global.max_heap_table_size = 163845;
SELECT @@max_heap_table_size = @@global.max_heap_table_size;
--echo '#---------------------FN_DYNVARS_077_10----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@max_heap_table_size = 16777216;
SELECT @@max_heap_table_size = @@local.max_heap_table_size;
SELECT @@local.max_heap_table_size = @@session.max_heap_table_size;
--echo '#---------------------FN_DYNVARS_077_11----------------------#'
#############################################################################
# Check if max_heap_table_size can be accessed with and without @@ sign #
#############################################################################
SET max_heap_table_size = 316777216;
SELECT @@max_heap_table_size;
--Error ER_UNKNOWN_TABLE
SELECT local.max_heap_table_size;
--Error ER_UNKNOWN_TABLE
SELECT session.max_heap_table_size;
--Error ER_BAD_FIELD_ERROR
SELECT max_heap_table_size = @@session.max_heap_table_size;
####################################
# Restore initial value #
####################################
SET @@global.max_heap_table_size = @start_global_value;
SELECT @@global.max_heap_table_size;
SET @@session.max_heap_table_size = @start_session_value;
SELECT @@session.max_heap_table_size;
#######################################################
# END OF max_heap_table_size TESTS #
#######################################################
############## mysql-test\t\max_seeks_for_key_basic.test ###############
# #
# Variable Name: max_seeks_for_key #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 4294967295 #
# Range: 1-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable max_seeks_for_key #
# 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 max_seeks_for_key TESTS #
#################################################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.max_seeks_for_key;
SELECT @start_global_value;
SET @start_session_value = @@session.max_seeks_for_key;
SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_083_01-------------------------#'
#################################################################
# Display the DEFAULT value of max_seeks_for_key #
#################################################################
SET @@global.max_seeks_for_key = 100;
SET @@global.max_seeks_for_key = DEFAULT;
SELECT @@global.max_seeks_for_key;
SET @@session.max_seeks_for_key = 200;
SET @@session.max_seeks_for_key = DEFAULT;
SELECT @@session.max_seeks_for_key;
--echo '#--------------------FN_DYNVARS_083_02-------------------------#'
#################################################################
# Check the DEFAULT value of max_seeks_for_key #
#################################################################
SET @@global.max_seeks_for_key = DEFAULT;
SELECT @@global.max_seeks_for_key = 4294967295;
SET @@session.max_seeks_for_key = DEFAULT;
SELECT @@session.max_seeks_for_key = 4294967295;
--echo '#--------------------FN_DYNVARS_083_03-------------------------#'
###########################################################################
# Change the value of max_seeks_for_key to a valid value for GLOBAL Scope #
###########################################################################
SET @@global.max_seeks_for_key = 1;
SELECT @@global.max_seeks_for_key;
SET @@global.max_seeks_for_key = 2;
SELECT @@global.max_seeks_for_key;
SET @@global.max_seeks_for_key = 65536;
SELECT @@global.max_seeks_for_key;
SET @@global.max_seeks_for_key = 4294967295;
SELECT @@global.max_seeks_for_key;
SET @@global.max_seeks_for_key = 4294967294;
SELECT @@global.max_seeks_for_key;
--echo '#--------------------FN_DYNVARS_083_04-------------------------#'
############################################################################
# Change the value of max_seeks_for_key to a valid value for SESSION Scope #
############################################################################
SET @@session.max_seeks_for_key = 1;
SELECT @@session.max_seeks_for_key;
SET @@session.max_seeks_for_key = 2;
SELECT @@session.max_seeks_for_key;
SET @@session.max_seeks_for_key = 4294967295;
SELECT @@session.max_seeks_for_key;
SET @@session.max_seeks_for_key = 4294967294;
SELECT @@session.max_seeks_for_key;
SET @@session.max_seeks_for_key = 65535;
SELECT @@session.max_seeks_for_key;
--echo '#------------------FN_DYNVARS_083_05-----------------------#'
#############################################################
# Change the value of max_seeks_for_key to an invalid value #
#############################################################
SET @@global.max_seeks_for_key = 0;
SELECT @@global.max_seeks_for_key;
SET @@global.max_seeks_for_key = -1024;
SELECT @@global.max_seeks_for_key;
SET @@global.max_seeks_for_key = 4294967296;
SELECT @@global.max_seeks_for_key;
--Error ER_PARSE_ERROR
SET @@global.max_seeks_for_key = 65530.34.;
SELECT @@global.max_seeks_for_key;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_seeks_for_key = test;
SELECT @@global.max_seeks_for_key;
SET @@session.max_seeks_for_key = 0;
SELECT @@session.max_seeks_for_key;
SET @@session.max_seeks_for_key = -2;
SELECT @@session.max_seeks_for_key;
--Error ER_PARSE_ERROR
SET @@session.max_seeks_for_key = 65530.34.;
SET @@session.max_seeks_for_key = 4294967296;
SELECT @@session.max_seeks_for_key;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.max_seeks_for_key = test;
SELECT @@session.max_seeks_for_key;
--echo '#------------------FN_DYNVARS_083_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SELECT @@global.max_seeks_for_key = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='max_seeks_for_key';
--echo '#------------------FN_DYNVARS_083_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
SELECT @@session.max_seeks_for_key = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='max_seeks_for_key';
--echo '#------------------FN_DYNVARS_083_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.max_seeks_for_key = TRUE;
SELECT @@global.max_seeks_for_key;
SET @@global.max_seeks_for_key = FALSE;
SELECT @@global.max_seeks_for_key;
--echo '#---------------------FN_DYNVARS_083_09----------------------#'
#################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
#################################################################################
SET @@global.max_seeks_for_key = 10;
SELECT @@max_seeks_for_key = @@global.max_seeks_for_key;
--echo '#---------------------FN_DYNVARS_083_10----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@max_seeks_for_key = 100;
SELECT @@max_seeks_for_key = @@local.max_seeks_for_key;
SELECT @@local.max_seeks_for_key = @@session.max_seeks_for_key;
--echo '#---------------------FN_DYNVARS_083_11----------------------#'
############################################################################
# Check if max_seeks_for_key can be accessed with and without @@ sign #
############################################################################
SET max_seeks_for_key = 1;
SELECT @@max_seeks_for_key;
--Error ER_UNKNOWN_TABLE
SELECT local.max_seeks_for_key;
--Error ER_UNKNOWN_TABLE
SELECT session.max_seeks_for_key;
--Error ER_BAD_FIELD_ERROR
SELECT max_seeks_for_key = @@session.max_seeks_for_key;
####################################
# Restore initial value #
####################################
SET @@global.max_seeks_for_key = @start_global_value;
SELECT @@global.max_seeks_for_key;
SET @@session.max_seeks_for_key = @start_session_value;
SELECT @@session.max_seeks_for_key;
#############################################################
# END OF max_seeks_for_key TESTS #
#############################################################
############## mysql-test\t\max_tmp_tables_basic.test ###############
# #
# Variable Name: max_tmp_tables #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 32 #
# Range: 1-4294967295 #
# #
# #
# #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable max_tmp_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 max_tmp_tables TESTS #
####################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.max_tmp_tables;
SELECT @start_global_value;
SET @start_session_value = @@session.max_tmp_tables;
SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_086_01-------------------------#'
######################################################
# Display the DEFAULT value of max_tmp_tables #
######################################################
SET @@global.max_tmp_tables = 1000;
SET @@global.max_tmp_tables = DEFAULT;
SELECT @@global.max_tmp_tables;
SET @@session.max_tmp_tables = 1000;
SET @@session.max_tmp_tables = DEFAULT;
SELECT @@session.max_tmp_tables;
--echo '#--------------------FN_DYNVARS_086_02-------------------------#'
######################################################
# Check the DEFAULT value of max_tmp_tables #
######################################################
SET @@global.max_tmp_tables = DEFAULT;
SELECT @@global.max_tmp_tables = 32;
SET @@session.max_tmp_tables = DEFAULT;
SELECT @@session.max_tmp_tables = 32;
--echo '#--------------------FN_DYNVARS_086_03-------------------------#'
########################################################################
# Change the value of max_tmp_tables to a valid value for GLOBAL Scope #
########################################################################
SET @@global.max_tmp_tables = 1;
SELECT @@global.max_tmp_tables;
SET @@global.max_tmp_tables = 2;
SELECT @@global.max_tmp_tables;
SET @@global.max_tmp_tables = 65536;
SELECT @@global.max_tmp_tables;
SET @@global.max_tmp_tables = 4294967295;
SELECT @@global.max_tmp_tables;
SET @@global.max_tmp_tables = 4294967294;
SELECT @@global.max_tmp_tables;
--echo '#--------------------FN_DYNVARS_086_04-------------------------#'
#########################################################################
# Change the value of max_tmp_tables to a valid value for SESSION Scope #
#########################################################################
SET @@session.max_tmp_tables = 1;
SELECT @@session.max_tmp_tables;
SET @@session.max_tmp_tables = 2;
SELECT @@session.max_tmp_tables;
SET @@session.max_tmp_tables = 65536;
SELECT @@session.max_tmp_tables;
SET @@session.max_tmp_tables = 4294967295;
SELECT @@session.max_tmp_tables;
SET @@session.max_tmp_tables = 4294967294;
SELECT @@session.max_tmp_tables;
--echo '#------------------FN_DYNVARS_086_05-----------------------#'
##########################################################
# Change the value of max_tmp_tables to an invalid value #
##########################################################
SET @@global.max_tmp_tables = -1024;
SELECT @@global.max_tmp_tables;
SET @@global.max_tmp_tables = 4294967296;
SELECT @@global.max_tmp_tables;
SET @@global.max_tmp_tables = -1;
SELECT @@global.max_tmp_tables;
SET @@global.max_tmp_tables = 429496729500;
SELECT @@global.max_tmp_tables;
--Error ER_PARSE_ERROR
SET @@global.max_tmp_tables = 65530.34.;
SELECT @@global.max_tmp_tables;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_tmp_tables = test;
SELECT @@global.max_tmp_tables;
SET @@session.max_tmp_tables = 4294967296;
SELECT @@session.max_tmp_tables;
SET @@session.max_tmp_tables = -1;
SELECT @@session.max_tmp_tables;
SET @@session.max_tmp_tables = 429496729500;
SELECT @@session.max_tmp_tables;
SET @@session.max_tmp_tables = -001;
SELECT @@session.max_tmp_tables;
--Error ER_PARSE_ERROR
SET @@session.max_tmp_tables = 65530.34.;
SET @@session.max_tmp_tables = 10737418241;
SELECT @@session.max_tmp_tables;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.max_tmp_tables = test;
SELECT @@session.max_tmp_tables;
--echo '#------------------FN_DYNVARS_086_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SELECT @@global.max_tmp_tables = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='max_tmp_tables';
--echo '#------------------FN_DYNVARS_086_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
SELECT @@session.max_tmp_tables = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='max_tmp_tables';
--echo '#------------------FN_DYNVARS_086_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.max_tmp_tables = TRUE;
SELECT @@global.max_tmp_tables;
SET @@global.max_tmp_tables = FALSE;
SELECT @@global.max_tmp_tables;
--echo '#---------------------FN_DYNVARS_086_09----------------------#'
#################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
#################################################################################
SET @@global.max_tmp_tables = 20;
SELECT @@max_tmp_tables = @@global.max_tmp_tables;
--echo '#---------------------FN_DYNVARS_086_10----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@max_tmp_tables = 255;
SELECT @@max_tmp_tables = @@local.max_tmp_tables;
SELECT @@local.max_tmp_tables = @@session.max_tmp_tables;
--echo '#---------------------FN_DYNVARS_086_11----------------------#'
#########################################################################
# Check if max_tmp_tables can be accessed with and without @@ sign #
#########################################################################
SET max_tmp_tables = 102;
SELECT @@max_tmp_tables;
--Error ER_UNKNOWN_TABLE
SELECT local.max_tmp_tables;
--Error ER_UNKNOWN_TABLE
SELECT session.max_tmp_tables;
--Error ER_BAD_FIELD_ERROR
SELECT max_tmp_tables = @@session.max_tmp_tables;
####################################
# Restore initial value #
####################################
SET @@global.max_tmp_tables = @start_global_value;
SELECT @@global.max_tmp_tables;
SET @@session.max_tmp_tables = @start_session_value;
SELECT @@session.max_tmp_tables;
###################################################
# END OF max_tmp_tables TESTS #
###################################################
############## mysql-test\t\max_write_lock_count_basic.test ###############
# #
# Variable Name: max_write_lock_count #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 4294967295 #
# Range:1-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable max_write_lock_count #
# 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 max_write_lock_count TESTS #
##########################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.max_write_lock_count;
SELECT @start_global_value;
--echo '#--------------------FN_DYNVARS_088_01-------------------------#'
############################################################
# Display the DEFAULT value of max_write_lock_count #
############################################################
SET @@global.max_write_lock_count = 1000;
SET @@global.max_write_lock_count = DEFAULT;
SELECT @@global.max_write_lock_count;
--echo '#--------------------FN_DYNVARS_088_02-------------------------#'
############################################################
# Check the DEFAULT value of max_write_lock_count #
############################################################
SET @@global.max_write_lock_count = DEFAULT;
SELECT @@global.max_write_lock_count = 4294967295;
--echo '#--------------------FN_DYNVARS_088_03-------------------------#'
##############################################################################
# Change the value of max_write_lock_count to a valid value for GLOBAL Scope #
##############################################################################
SET @@global.max_write_lock_count = 1;
SELECT @@global.max_write_lock_count;
SET @@global.max_write_lock_count = 2;
SELECT @@global.max_write_lock_count;
SET @@global.max_write_lock_count = 65536;
SELECT @@global.max_write_lock_count;
SET @@global.max_write_lock_count = 4294967295;
SELECT @@global.max_write_lock_count;
SET @@global.max_write_lock_count = 4294967294;
SELECT @@global.max_write_lock_count;
--echo '#------------------FN_DYNVARS_088_04-----------------------#'
################################################################
# Change the value of max_write_lock_count to an invalid value #
################################################################
SET @@global.max_write_lock_count = -1024;
SELECT @@global.max_write_lock_count;
SET @@global.max_write_lock_count = 4294967296;
SELECT @@global.max_write_lock_count;
SET @@global.max_write_lock_count = -1;
SELECT @@global.max_write_lock_count;
SET @@global.max_write_lock_count = 429496729500;
SELECT @@global.max_write_lock_count;
--Error ER_PARSE_ERROR
SET @@global.max_write_lock_count = 65530.34.;
SELECT @@global.max_write_lock_count;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_write_lock_count = test;
SELECT @@global.max_write_lock_count;
--echo '#------------------FN_DYNVARS_088_05-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SELECT @@global.max_write_lock_count = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='max_write_lock_count';
--echo '#------------------FN_DYNVARS_088_06-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.max_write_lock_count = TRUE;
SELECT @@global.max_write_lock_count;
SET @@global.max_write_lock_count = FALSE;
SELECT @@global.max_write_lock_count;
--echo '#---------------------FN_DYNVARS_088_07----------------------#'
#################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
#################################################################################
SET @@global.max_write_lock_count = 20;
SELECT @@max_write_lock_count = @@global.max_write_lock_count;
--echo '#---------------------FN_DYNVARS_088_08----------------------#'
###############################################################################
# Check if max_write_lock_count can be accessed with and without @@ sign #
###############################################################################
SET @@global.max_write_lock_count = 102;
SELECT @@max_write_lock_count;
--Error ER_UNKNOWN_TABLE
SELECT local.max_write_lock_count;
--Error ER_UNKNOWN_TABLE
SELECT global.max_write_lock_count;
--Error ER_BAD_FIELD_ERROR
SELECT max_write_lock_count = @@global.max_write_lock_count;
####################################
# Restore initial value #
####################################
SET @@global.max_write_lock_count = @start_global_value;
SELECT @@global.max_write_lock_count;
###################################################
# END OF max_write_lock_count TESTS #
###################################################
############## mysql-test\t\min_examined_row_limit_basic.test ###############
# #
# Variable Name: min_examined_row_limit #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 0 #
# Range:0-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable min_examined_row_limit #
# 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 min_examined_row_limit TESTS #
######################################################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.min_examined_row_limit;
SELECT @start_global_value;
SET @start_session_value = @@session.min_examined_row_limit;
SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_089_01-------------------------#'
######################################################################
# Display the DEFAULT value of min_examined_row_limit #
######################################################################
SET @@global.min_examined_row_limit = 100;
SET @@global.min_examined_row_limit = DEFAULT;
SELECT @@global.min_examined_row_limit;
SET @@session.min_examined_row_limit = 200;
SET @@session.min_examined_row_limit = DEFAULT;
SELECT @@session.min_examined_row_limit;
--echo '#--------------------FN_DYNVARS_089_02-------------------------#'
########################################################################
# Check the DEFAULT value of min_examined_row_limit #
########################################################################
SET @@global.min_examined_row_limit = DEFAULT;
SELECT @@global.min_examined_row_limit = 0;
SET @@session.min_examined_row_limit = DEFAULT;
SELECT @@session.min_examined_row_limit = 0;
--echo '#--------------------FN_DYNVARS_089_03-------------------------#'
################################################################################
# Change the value of min_examined_row_limit to a valid value for GLOBAL Scope #
################################################################################
SET @@global.min_examined_row_limit = 0;
SELECT @@global.min_examined_row_limit;
SET @@global.min_examined_row_limit = 1;
SELECT @@global.min_examined_row_limit;
SET @@global.min_examined_row_limit = 60020;
SELECT @@global.min_examined_row_limit;
SET @@global.min_examined_row_limit = 65535;
SELECT @@global.min_examined_row_limit;
SET @@global.min_examined_row_limit = 4294967295;
SELECT @@global.min_examined_row_limit;
SET @@global.min_examined_row_limit = 4294967294;
SELECT @@global.min_examined_row_limit;
--echo '#--------------------FN_DYNVARS_089_04-------------------------#'
###################################################################################
# Change the value of min_examined_row_limit to a valid value for SESSION Scope #
###################################################################################
SET @@session.min_examined_row_limit = 0;
SELECT @@session.min_examined_row_limit;
SET @@session.min_examined_row_limit = 1;
SELECT @@session.min_examined_row_limit;
SET @@session.min_examined_row_limit = 50050;
SELECT @@session.min_examined_row_limit;
SET @@session.min_examined_row_limit = 65535;
SELECT @@session.min_examined_row_limit;
SET @@session.min_examined_row_limit = 4294967295;
SELECT @@session.min_examined_row_limit;
SET @@session.min_examined_row_limit = 4294967294;
SELECT @@session.min_examined_row_limit;
--echo '#------------------FN_DYNVARS_089_05-----------------------#'
####################################################################
# Change the value of min_examined_row_limit to an invalid value #
####################################################################
SET @@global.min_examined_row_limit = 429496726;
SELECT @@global.min_examined_row_limit;
SET @@global.min_examined_row_limit = -1024;
SELECT @@global.min_examined_row_limit;
SET @@global.min_examined_row_limit = 429496729500;
SELECT @@global.min_examined_row_limit;
--Error ER_PARSE_ERROR
SET @@global.min_examined_row_limit = 65530.34.;
SELECT @@global.min_examined_row_limit;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.min_examined_row_limit = test;
SELECT @@global.min_examined_row_limit;
SET @@session.min_examined_row_limit = 4294967296;
SELECT @@session.min_examined_row_limit;
SET @@session.min_examined_row_limit = -1;
SELECT @@session.min_examined_row_limit;
--Error ER_PARSE_ERROR
SET @@session.min_examined_row_limit = 65530.34.;
SET @@session.min_examined_row_limit = 4294967295021;
SELECT @@session.min_examined_row_limit;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.min_examined_row_limit = test;
SELECT @@session.min_examined_row_limit;
--echo '#------------------FN_DYNVARS_089_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SELECT @@global.min_examined_row_limit = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='min_examined_row_limit';
--echo '#------------------FN_DYNVARS_089_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
SELECT @@session.min_examined_row_limit = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='min_examined_row_limit';
--echo '#------------------FN_DYNVARS_089_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.min_examined_row_limit = TRUE;
SELECT @@global.min_examined_row_limit;
SET @@global.min_examined_row_limit = FALSE;
SELECT @@global.min_examined_row_limit;
--echo '#---------------------FN_DYNVARS_089_09----------------------#'
####################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
####################################################################################
SET @@global.min_examined_row_limit = 10;
SELECT @@min_examined_row_limit = @@global.min_examined_row_limit;
--echo '#---------------------FN_DYNVARS_089_10----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@min_examined_row_limit = 100;
SELECT @@min_examined_row_limit = @@local.min_examined_row_limit;
SELECT @@local.min_examined_row_limit = @@session.min_examined_row_limit;
--echo '#---------------------FN_DYNVARS_089_11----------------------#'
###################################################################################
# Check if min_examined_row_limit can be accessed with and without @@ sign #
###################################################################################
SET min_examined_row_limit = 1;
SELECT @@min_examined_row_limit;
--Error ER_UNKNOWN_TABLE
SELECT local.min_examined_row_limit;
--Error ER_UNKNOWN_TABLE
SELECT session.min_examined_row_limit;
--Error ER_BAD_FIELD_ERROR
SELECT min_examined_row_limit = @@session.min_examined_row_limit;
####################################
# Restore initial value #
####################################
SET @@global.min_examined_row_limit = @start_global_value;
SELECT @@global.min_examined_row_limit;
SET @@session.min_examined_row_limit = @start_session_value;
SELECT @@session.min_examined_row_limit;
#############################################################
# END OF min_examined_row_limit TESTS #
#############################################################
############## mysql-test\t\multi_range_count_basic.test ###############
# #
# Variable Name: multi_range_count #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 256 #
# Range:1-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable multi_range_count #
# 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 multi_range_count TESTS #
#################################################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.multi_range_count;
SELECT @start_global_value;
SET @start_session_value = @@session.multi_range_count;
SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_090_01-------------------------#'
#################################################################
# Display the DEFAULT value of multi_range_count #
#################################################################
SET @@global.multi_range_count = 100;
SET @@global.multi_range_count = DEFAULT;
SELECT @@global.multi_range_count;
SET @@session.multi_range_count = 200;
SET @@session.multi_range_count = DEFAULT;
SELECT @@session.multi_range_count;
--echo '#--------------------FN_DYNVARS_090_02-------------------------#'
#################################################################
# Check the DEFAULT value of multi_range_count #
#################################################################
SET @@global.multi_range_count = DEFAULT;
SELECT @@global.multi_range_count = 256;
SET @@session.multi_range_count = DEFAULT;
SELECT @@session.multi_range_count = 256;
--echo '#--------------------FN_DYNVARS_090_03-------------------------#'
###########################################################################
# Change the value of multi_range_count to a valid value for GLOBAL Scope #
###########################################################################
SET @@global.multi_range_count = 1;
SELECT @@global.multi_range_count;
SET @@global.multi_range_count = 60020;
SELECT @@global.multi_range_count;
SET @@global.multi_range_count = 65535;
SELECT @@global.multi_range_count;
SET @@global.multi_range_count = 4294967295;
SELECT @@global.multi_range_count;
SET @@global.multi_range_count = 4294967294;
SELECT @@global.multi_range_count;
--echo '#--------------------FN_DYNVARS_090_04-------------------------#'
############################################################################
# Change the value of multi_range_count to a valid value for SESSION Scope #
############################################################################
SET @@session.multi_range_count = 1;
SELECT @@session.multi_range_count;
SET @@session.multi_range_count = 50050;
SELECT @@session.multi_range_count;
SET @@session.multi_range_count = 65535;
SELECT @@session.multi_range_count;
SET @@session.multi_range_count = 4294967295;
SELECT @@session.multi_range_count;
SET @@session.multi_range_count = 4294967294;
SELECT @@session.multi_range_count;
--echo '#------------------FN_DYNVARS_090_05-----------------------#'
#############################################################
# Change the value of multi_range_count to an invalid value #
#############################################################
SET @@global.multi_range_count = 0;
SELECT @@global.multi_range_count;
SET @@global.multi_range_count = 4294967296;
SELECT @@global.multi_range_count;
SET @@global.multi_range_count = -1024;
SELECT @@global.multi_range_count;
SET @@global.multi_range_count = 429496729500;
SELECT @@global.multi_range_count;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.multi_range_count = 65530.34;
SELECT @@global.multi_range_count;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.multi_range_count = test;
SELECT @@global.multi_range_count;
SET @@session.multi_range_count = 0;
SELECT @@session.multi_range_count;
SET @@session.multi_range_count = 4294967296;
SELECT @@session.multi_range_count;
SET @@session.multi_range_count = -1;
SELECT @@session.multi_range_count;
--Error ER_PARSE_ERROR
SET @@session.multi_range_count = 65530.34.;
SET @@session.multi_range_count = 4294967295021;
SELECT @@session.multi_range_count;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.multi_range_count = test;
SELECT @@session.multi_range_count;
--echo '#------------------FN_DYNVARS_090_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SELECT @@global.multi_range_count = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='multi_range_count';
--echo '#------------------FN_DYNVARS_090_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
SELECT @@session.multi_range_count = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='multi_range_count';
--echo '#------------------FN_DYNVARS_090_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.multi_range_count = TRUE;
SELECT @@global.multi_range_count;
SET @@global.multi_range_count = FALSE;
SELECT @@global.multi_range_count;
--echo '#---------------------FN_DYNVARS_090_09----------------------#'
#################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
#################################################################################
SET @@global.multi_range_count = 10;
SELECT @@multi_range_count = @@global.multi_range_count;
--echo '#---------------------FN_DYNVARS_090_10----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@multi_range_count = 100;
SELECT @@multi_range_count = @@local.multi_range_count;
SELECT @@local.multi_range_count = @@session.multi_range_count;
--echo '#---------------------FN_DYNVARS_090_11----------------------#'
############################################################################
# Check if multi_range_count can be accessed with and without @@ sign #
############################################################################
SET multi_range_count = 1;
SELECT @@multi_range_count;
--Error ER_UNKNOWN_TABLE
SELECT local.multi_range_count;
--Error ER_UNKNOWN_TABLE
SELECT session.multi_range_count;
--Error ER_BAD_FIELD_ERROR
SELECT multi_range_count = @@session.multi_range_count;
####################################
# Restore initial value #
####################################
SET @@global.multi_range_count = @start_global_value;
SELECT @@global.multi_range_count;
SET @@session.multi_range_count = @start_session_value;
SELECT @@session.multi_range_count;
######################################################
# END OF multi_range_count TESTS #
######################################################
############## mysql-test\t\myisam_max_sort_file_size_basic.test ################
# #
# Variable Name: myisam_max_sort_file_size #
# Scope: GLOBAL & SESSION #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 1 #
# Range: 1 - 65536 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Rizwan Maredia #
# #
# Description: Test Cases of Dynamic System Variable myisam_max_sort_file_size #
# 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 myisam_max_sort_file_size TESTS #
###################################################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.myisam_max_sort_file_size;
SELECT @start_global_value;
--echo '#--------------------FN_DYNVARS_094_01-------------------------#'
###################################################################
# Display the DEFAULT value of myisam_max_sort_file_size #
###################################################################
SET @@global.myisam_max_sort_file_size = 500000;
SET @@global.myisam_max_sort_file_size = DEFAULT;
SELECT @@global.myisam_max_sort_file_size;
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
--echo '#--------------------FN_DYNVARS_094_02-------------------------#'
###################################################################
# Check the DEFAULT value of myisam_max_sort_file_size #
###################################################################
SET @@global.myisam_max_sort_file_size = DEFAULT;
SELECT @@global.myisam_max_sort_file_size = 2147483648;
--echo '#--------------------FN_DYNVARS_094_03-------------------------#'
##################################################################################
# Change the value of myisam_max_sort_file_size to a valid value for GLOBAL Scope #
##################################################################################
SET @@global.myisam_max_sort_file_size = 0;
SELECT @@global.myisam_max_sort_file_size;
SET @@global.myisam_max_sort_file_size = 1024;
SELECT @@global.myisam_max_sort_file_size;
SET @@global.myisam_max_sort_file_size = 123456789;
SELECT @@global.myisam_max_sort_file_size;
SET @@global.myisam_max_sort_file_size = 2147483648*2;
SELECT @@global.myisam_max_sort_file_size;
SET @@global.myisam_max_sort_file_size = 2147483648*1024;
SELECT @@global.myisam_max_sort_file_size;
SELECT @@global.myisam_max_sort_file_size;
SET @@global.myisam_max_sort_file_size = 2147483648*2147483648;
--echo '#--------------------FN_DYNVARS_094_04-------------------------#'
#################################################################################
# Check if variable can be access with session scope #
#################################################################################
--Error ER_GLOBAL_VARIABLE
SET @@myisam_max_sort_file_size = 2;
--Error ER_GLOBAL_VARIABLE
SET @@session.myisam_max_sort_file_size = 3;
--Error ER_GLOBAL_VARIABLE
SET @@local.myisam_max_sort_file_size = 4;
--echo '#------------------FN_DYNVARS_094_05-----------------------#'
####################################################################
# Change the value of myisam_max_sort_file_size to an invalid value #
####################################################################
SET @@global.myisam_max_sort_file_size = -1;
SELECT @@global.myisam_max_sort_file_size;
SET @@global.myisam_max_sort_file_size = -2147483648;
SELECT @@global.myisam_max_sort_file_size;
SET @@global.myisam_max_sort_file_size = -2147483649;
SELECT @@global.myisam_max_sort_file_size;
--Error ER_PARSE_ERROR
SET @@global.myisam_max_sort_file_size = 65530.34.;
SELECT @@global.myisam_max_sort_file_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_max_sort_file_size = 2147483649.56;
SELECT @@global.myisam_max_sort_file_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_max_sort_file_size = 1G;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--echo '#------------------FN_DYNVARS_094_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SET @@global.myisam_max_sort_file_size = 3000;
SELECT @@global.myisam_max_sort_file_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='myisam_max_sort_file_size';
--echo '#------------------FN_DYNVARS_094_07-----------------------#'
###########################################################################
# Check if the value is present in INFORMATION_SCHEMA.SESSION_VARIABLES #
###########################################################################
SELECT count(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='myisam_max_sort_file_size';
--echo '#------------------FN_DYNVARS_094_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.myisam_max_sort_file_size = TRUE;
SELECT @@global.myisam_max_sort_file_size;
SET @@global.myisam_max_sort_file_size = FALSE;
SELECT @@global.myisam_max_sort_file_size;
--echo '#---------------------FN_DYNVARS_001_09----------------------#'
#################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
#################################################################################
SET @@global.myisam_max_sort_file_size = 512;
SELECT @@myisam_max_sort_file_size = @@global.myisam_max_sort_file_size;
--echo '#---------------------FN_DYNVARS_001_10----------------------#'
##################################################################################
# Check if myisam_max_sort_file_size can be accessed without @@ sign and scope #
##################################################################################
--Error ER_GLOBAL_VARIABLE
SET myisam_max_sort_file_size = 2048;
--Error ER_BAD_FIELD_ERROR
SELECT myisam_max_sort_file_size;
SELECT @@myisam_max_sort_file_size;
#verifying another syntax for setting value#
SET global myisam_max_sort_file_size = 64;
####################################
# Restore initial value #
####################################
SET @@global.myisam_max_sort_file_size = @start_global_value;
SELECT @@global.myisam_max_sort_file_size;
########################################################
# END OF myisam_max_sort_file_size TESTS #
########################################################
############## mysql-test\t\myisam_repair_threads_basic.test ##################
# #
# Variable Name: myisam_repair_threads #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 1 #
# Range: 1-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Sharique Abdullah #
# #
# Description: Test Cases of Dynamic System Variable myisam_repair_threads #
# 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 myisam_repair_threads TESTS #
######################################################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.myisam_repair_threads;
SELECT @start_global_value;
SET @start_session_value = @@session.myisam_repair_threads;
SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
#################################################################
# Display the DEFAULT value of myisam_block_size #
#################################################################
SET @@global.myisam_repair_threads = 100;
SET @@global.myisam_repair_threads = DEFAULT;
SELECT @@global.myisam_repair_threads ;
SET @@session.myisam_repair_threads = 200;
SET @@session.myisam_repair_threads = DEFAULT;
SELECT @@session.myisam_repair_threads ;
--echo '#--------------------FN_DYNVARS_005_02-------------------------#'
######################################################################
# Check the DEFAULT value of myisam_repair_threads #
######################################################################
SET @@global.myisam_repair_threads = DEFAULT;
SELECT @@global.myisam_repair_threads = 1;
SET @@session.myisam_repair_threads = DEFAULT;
SELECT @@session.myisam_repair_threads = 1;
--echo '#--------------------FN_DYNVARS_005_03-------------------------#'
###############################################################################
# Change the value of myisam_repair_threads to a valid value for GLOBAL Scope#
###############################################################################
SET @@global.myisam_repair_threads = 1;
SELECT @@global.myisam_repair_threads ;
SET @@global.myisam_repair_threads = 4294967295;
SELECT @@global.myisam_repair_threads ;
SET @@global.myisam_repair_threads = 655354;
SELECT @@global.myisam_repair_threads ;
--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
###############################################################################
# Change the value of myisam_repair_threads to a valid value for SESSION
# Scope
###############################################################################
SET @@session.myisam_repair_threads = 1;
SELECT @@session.myisam_repair_threads ;
SET @@session.myisam_repair_threads = 4294967295;
SELECT @@session.myisam_repair_threads ;
SET @@session.myisam_repair_threads = 655345;
SELECT @@session.myisam_repair_threads ;
--echo '#------------------FN_DYNVARS_005_05-----------------------#'
##################################################################
# Change the value of myisam_repair_threads to an invalid value #
##################################################################
SET @@global.myisam_repair_threads = 0;
SELECT @@global.myisam_repair_threads ;
SET @@global.myisam_repair_threads = -1024;
SELECT @@global.myisam_repair_threads ;
SET @@global.myisam_repair_threads = 429496729533;
SELECT @@global.myisam_repair_threads ;
--Error ER_PARSE_ERROR
SET @@global.myisam_repair_threads = 65530.34.;
SELECT @@global.myisam_repair_threads ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_repair_threads = test;
SELECT @@global.myisam_repair_threads ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_repair_threads = "test";
SELECT @@global.myisam_repair_threads ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_repair_threads = 'test';
SELECT @@global.myisam_repair_threads ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.myisam_repair_threads = ON;
SELECT @@global.myisam_repair_threads ;
SET @@session.myisam_repair_threads = 0;
SELECT @@session.myisam_repair_threads ;
SET @@session.myisam_repair_threads = -2;
SELECT @@session.myisam_repair_threads ;
--Error ER_PARSE_ERROR
SET @@session.myisam_repair_threads = 65530.34.;
SELECT @@session.myisam_repair_threads ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.myisam_repair_threads = test;
SELECT @@session.myisam_repair_threads ;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.myisam_repair_threads = "test";
SELECT @@session.myisam_repair_threads ;
--echo '#------------------FN_DYNVARS_005_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SELECT @@global.myisam_repair_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='myisam_repair_threads ';
--echo '#------------------FN_DYNVARS_005_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
SELECT @@session.myisam_repair_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='myisam_repair_threads ';
--echo '#------------------FN_DYNVARS_005_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.myisam_repair_threads = TRUE;
SELECT @@global.myisam_repair_threads ;
SET @@global.myisam_repair_threads = FALSE;
SELECT @@global.myisam_repair_threads ;
--echo '#---------------------FN_DYNVARS_001_09----------------------#'
###############################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
###############################################################################
SET @@global.myisam_repair_threads = 10;
SELECT @@myisam_repair_threads = @@global.myisam_repair_threads ;
--echo '#---------------------FN_DYNVARS_001_10----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to
# same session variable #
########################################################################################################
SET @@myisam_repair_threads = 100;
SELECT @@myisam_repair_threads = @@local.myisam_repair_threads ;
SELECT @@local.myisam_repair_threads = @@session.myisam_repair_threads ;
--echo '#---------------------FN_DYNVARS_001_11----------------------#'
###################################################################################
# Check if myisam_repair_threads can be accessed with and without @@ sign #
###################################################################################
SET myisam_repair_threads = 1;
SELECT @@myisam_repair_threads ;
--Error ER_UNKNOWN_TABLE
SELECT local.myisam_repair_threads ;
--Error ER_UNKNOWN_TABLE
SELECT session.myisam_repair_threads ;
--Error ER_BAD_FIELD_ERROR
SELECT myisam_repair_threads = @@session.myisam_repair_threads ;
####################################
# Restore initial value #
####################################
SET @@global.myisam_repair_threads = @start_global_value;
SELECT @@global.myisam_repair_threads ;
SET @@session.myisam_repair_threads = @start_session_value;
SELECT @@session.myisam_repair_threads ;
#############################################################
# END OF myisam_repair_threads TESTS #
#############################################################
This diff is collapsed.
############## mysql-test\t\net_retry_count_basic.test ###############
# #
# Variable Name: net_retry_count #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value:10 #
# Range: 1-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable net_retry_count #
# 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 net_retry_count TESTS #
###############################################################
#############################################################
# Save initial value #
#############################################################
SET @start_global_value = @@global.net_retry_count;
SELECT @start_global_value;
SET @start_session_value = @@session.net_retry_count;
SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_111_01-------------------------#'
###############################################################
# Display the DEFAULT value of net_retry_count #
###############################################################
SET @@global.net_retry_count = 100;
SET @@global.net_retry_count = DEFAULT;
SELECT @@global.net_retry_count;
SET @@session.net_retry_count = 200;
SET @@session.net_retry_count = DEFAULT;
SELECT @@session.net_retry_count;
--echo '#--------------------FN_DYNVARS_111_02-------------------------#'
###############################################################
# Check the DEFAULT value of net_retry_count #
###############################################################
SET @@global.net_retry_count = DEFAULT;
SELECT @@global.net_retry_count = 10;
SET @@session.net_retry_count = DEFAULT;
SELECT @@session.net_retry_count = 10;
--echo '#--------------------FN_DYNVARS_111_03-------------------------#'
#########################################################################
# Change the value of net_retry_count to a valid value for GLOBAL Scope #
#########################################################################
SET @@global.net_retry_count = 1;
SELECT @@global.net_retry_count;
SET @@global.net_retry_count = 2;
SELECT @@global.net_retry_count;
SET @@global.net_retry_count = 4294967295;
SELECT @@global.net_retry_count;
SET @@global.net_retry_count = 4294967294;
SELECT @@global.net_retry_count;
SET @@global.net_retry_count = 65536;
SELECT @@global.net_retry_count;
--echo '#--------------------FN_DYNVARS_111_04-------------------------#'
##########################################################################
# Change the value of net_retry_count to a valid value for SESSION Scope #
##########################################################################
SET @@session.net_retry_count = 1;
SELECT @@session.net_retry_count;
SET @@session.net_retry_count = 2;
SELECT @@session.net_retry_count;
SET @@session.net_retry_count = 65535;
SELECT @@session.net_retry_count;
SET @@session.net_retry_count = 4294967295;
SELECT @@session.net_retry_count;
SET @@session.net_retry_count = 4294967294;
SELECT @@session.net_retry_count;
--echo '#------------------FN_DYNVARS_111_05-----------------------#'
###########################################################
# Change the value of net_retry_count to an invalid value #
###########################################################
SET @@global.net_retry_count = 0;
SELECT @@global.net_retry_count;
SET @@global.net_retry_count = -1024;
SELECT @@global.net_retry_count;
SET @@global.net_retry_count = 4294967296;
SELECT @@global.net_retry_count;
SET @@global.net_retry_count = 429496729500;
SELECT @@global.net_retry_count;
--Error ER_PARSE_ERROR
SET @@global.net_retry_count = 65530.34.;
SELECT @@global.net_retry_count;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.net_retry_count = test;
SELECT @@global.net_retry_count;
SET @@session.net_retry_count = 0;
SELECT @@session.net_retry_count;
SET @@session.net_retry_count = -2;
SELECT @@session.net_retry_count;
--Error ER_PARSE_ERROR
SET @@session.net_retry_count = 65530.34.;
SET @@session.net_retry_count = 6555015425;
SELECT @@session.net_retry_count;
SET @@session.net_retry_count = 4294967296;
SELECT @@session.net_retry_count;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.net_retry_count = test;
SELECT @@session.net_retry_count;
--echo '#------------------FN_DYNVARS_111_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SELECT @@global.net_retry_count = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='net_retry_count';
--echo '#------------------FN_DYNVARS_111_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
SELECT @@session.net_retry_count = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='net_retry_count';
--echo '#------------------FN_DYNVARS_111_08-----------------------#'
####################################################################
# Check if TRUE and FALSE values can be used on variable #
####################################################################
SET @@global.net_retry_count = TRUE;
SELECT @@global.net_retry_count;
SET @@global.net_retry_count = FALSE;
SELECT @@global.net_retry_count;
--echo '#---------------------FN_DYNVARS_111_09----------------------#'
#################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
#################################################################################
SET @@global.net_retry_count = 10;
SELECT @@net_retry_count = @@global.net_retry_count;
--echo '#---------------------FN_DYNVARS_111_10----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@net_retry_count = 100;
SELECT @@net_retry_count = @@local.net_retry_count;
SELECT @@local.net_retry_count = @@session.net_retry_count;
--echo '#---------------------FN_DYNVARS_111_11----------------------#'
##########################################################################
# Check if net_retry_count can be accessed with and without @@ sign #
##########################################################################
SET net_retry_count = 1;
SELECT @@net_retry_count;
--Error ER_UNKNOWN_TABLE
SELECT local.net_retry_count;
--Error ER_UNKNOWN_TABLE
SELECT session.net_retry_count;
--Error ER_BAD_FIELD_ERROR
SELECT net_retry_count = @@session.net_retry_count;
####################################
# Restore initial value #
####################################
SET @@global.net_retry_count = @start_global_value;
SELECT @@global.net_retry_count;
SET @@session.net_retry_count = @start_session_value;
SELECT @@session.net_retry_count;
####################################################
# END OF net_retry_count TESTS #
####################################################
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
SET @start_value = @@global.binlog_cache_size;
SELECT @start_value;
@start_value
32768
'#--------------------FN_DYNVARS_006_01------------------------#'
SET @@global.binlog_cache_size = 100;
Warnings:
Warning 1292 Truncated incorrect binlog_cache_size value: '100'
SET @@global.binlog_cache_size = DEFAULT;
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
32768
'#---------------------FN_DYNVARS_006_02-------------------------#'
SET @@global.binlog_cache_size = @start_value;
SELECT @@global.binlog_cache_size = 32768;
@@global.binlog_cache_size = 32768
1
'#--------------------FN_DYNVARS_006_03------------------------#'
SET @@global.binlog_cache_size = 4096;
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4096
SET @@global.binlog_cache_size = 4294967295;
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4294963200
SET @@global.binlog_cache_size = 10000;
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
8192
SET @@global.binlog_cache_size = 21221204;
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
21217280
'Bug: Invalid values are coming in variable on assigning valid values'
'#--------------------FN_DYNVARS_006_04-------------------------#'
SET @@global.binlog_cache_size = 1024;
Warnings:
Warning 1292 Truncated incorrect binlog_cache_size value: '1024'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4096
SET @@global.binlog_cache_size = 10000.01;
ERROR 42000: Incorrect argument type to variable 'binlog_cache_size'
SET @@global.binlog_cache_size = -1024;
Warnings:
Warning 1292 Truncated incorrect binlog_cache_size value: '0'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4096
SET @@global.binlog_cache_size = 42949672950;
Warnings:
Warning 1292 Truncated incorrect binlog_cache_size value: '42949672950'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4294963200
'Bug: Errors are not coming on assigning invalid values to variable'
SET @@global.binlog_cache_size = ON;
ERROR 42000: Incorrect argument type to variable 'binlog_cache_size'
SET @@global.binlog_cache_size = 'test';
ERROR 42000: Incorrect argument type to variable 'binlog_cache_size'
'#-------------------FN_DYNVARS_006_05----------------------------#'
SET @@session.binlog_cache_size = 0;
ERROR HY000: Variable 'binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
'#----------------------FN_DYNVARS_006_06------------------------#'
SELECT @@global.binlog_cache_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='binlog_cache_size';
@@global.binlog_cache_size = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_006_07----------------------#'
SET @@global.binlog_cache_size = TRUE;
Warnings:
Warning 1292 Truncated incorrect binlog_cache_size value: '1'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4096
SET @@global.binlog_cache_size = FALSE;
Warnings:
Warning 1292 Truncated incorrect binlog_cache_size value: '0'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4096
'Bug: Errors are not coming on assigning TRUE/FALSE to variable'
'#---------------------FN_DYNVARS_006_08----------------------#'
SET @@global.binlog_cache_size = 1;
Warnings:
Warning 1292 Truncated incorrect binlog_cache_size value: '1'
SELECT @@binlog_cache_size = @@global.binlog_cache_size;
@@binlog_cache_size = @@global.binlog_cache_size
1
'#---------------------FN_DYNVARS_006_09----------------------#'
SET binlog_cache_size = 1;
ERROR HY000: Variable 'binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
SET global.binlog_cache_size = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'binlog_cache_size = 1' at line 1
SELECT global.binlog_cache_size;
ERROR 42S02: Unknown table 'global' in field list
SELECT binlog_cache_size = @@session.binlog_cache_size;
ERROR 42S22: Unknown column 'binlog_cache_size' in 'field list'
SET @@global.binlog_cache_size = @start_value;
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
32768
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment