Commit 90152c17 authored by Horst Hunger's avatar Horst Hunger

Fix for Bug#36875: Problem was, that there some warnings has been written containing values,

which were determined by the server depending on the os. The solution is to disable warnings in general.
The check of the values only have been done for Linux and Windows. Now, the check has been changed to the check of
ranges (not more concrete values) being near by the expected (set) values.  
parent 5f678447
......@@ -17,9 +17,12 @@
# * Valid & Invalid values #
# * Scope & Access method #
# * Data Integrity #
# Modified: Horst Hunger, 2008-11-28 #
# disabled warnings as they contain the values of this variable, #
# modified the check of the value only checking a range. #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# Reference: #
# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
# #
###############################################################################
......@@ -37,14 +40,13 @@
# Save initial value #
#############################################################
# due to difference when running on Windows (bug filed)
# due to differences when running on Windows (bug filed)
--source include/not_windows.inc
--disable_warnings
SET @start_global_value = @@global.sort_buffer_size;
SELECT @start_global_value;
SET @start_session_value = @@session.sort_buffer_size;
SELECT @start_session_value;
--echo '#--------------------FN_DYNVARS_151_01-------------------------#'
######################################################################
......@@ -53,11 +55,11 @@ SELECT @start_session_value;
SET @@global.sort_buffer_size = 1000;
SET @@global.sort_buffer_size = DEFAULT;
SELECT @@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116;
SELECT @@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000;
SET @@session.sort_buffer_size = 2000;
SET @@session.sort_buffer_size = DEFAULT;
SELECT @@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116;
SELECT @@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000;
--echo '#--------------------FN_DYNVARS_151_02-------------------------#'
......@@ -66,10 +68,10 @@ SELECT @@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 209711
######################################################################
SET @@global.sort_buffer_size = DEFAULT;
SELECT @@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116;
SELECT @@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000;
SET @@session.sort_buffer_size = DEFAULT;
SELECT @@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116;
SELECT @@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000;
--echo '#--------------------FN_DYNVARS_151_03-------------------------#'
......@@ -78,14 +80,13 @@ SELECT @@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 20971
################################################################################
SET @@global.sort_buffer_size = 32776;
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000;
SET @@global.sort_buffer_size = 32777;
SELECT @@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804;
SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000;
SET @@global.sort_buffer_size = 4294967295;
SELECT @@global.sort_buffer_size;
SET @@global.sort_buffer_size = 4294967294;
SELECT @@global.sort_buffer_size;
--echo 'Bug# 34877: Invalid Values are showing in variable on assigning valid values.';
--echo '#--------------------FN_DYNVARS_151_04-------------------------#'
###################################################################################
......@@ -93,9 +94,9 @@ SELECT @@global.sort_buffer_size;
###################################################################################
SET @@session.sort_buffer_size = 32776;
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000;
SET @@session.sort_buffer_size = 32777;
SELECT @@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804;
SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000;
SET @@session.sort_buffer_size = 4294967295;
SELECT @@session.sort_buffer_size;
SET @@session.sort_buffer_size = 4294967294;
......@@ -108,9 +109,9 @@ SELECT @@session.sort_buffer_size;
##################################################################
SET @@global.sort_buffer_size = 32775;
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000;
SET @@global.sort_buffer_size = -1024;
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000;
SET @@global.sort_buffer_size = 4294967296;
SELECT @@global.sort_buffer_size;
--Error ER_PARSE_ERROR
......@@ -121,19 +122,16 @@ SET @@global.sort_buffer_size = test;
SELECT @@global.sort_buffer_size;
SET @@session.sort_buffer_size = 32775;
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000;
SET @@session.sort_buffer_size = -2;
SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000;
--Error ER_PARSE_ERROR
SET @@session.sort_buffer_size = 65530.34.;
SET @@session.sort_buffer_size = 4294967296;
SELECT @@session.sort_buffer_size;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.sort_buffer_size = test;
SELECT @@session.sort_buffer_size;
--echo '#------------------FN_DYNVARS_151_06-----------------------#'
####################################################################
......@@ -141,14 +139,16 @@ SELECT @@session.sort_buffer_size;
####################################################################
SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM
INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
--echo '#------------------FN_DYNVARS_151_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM
INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size';
--echo '#------------------FN_DYNVARS_151_08-----------------------#'
......@@ -157,11 +157,9 @@ SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSI
####################################################################
SET @@global.sort_buffer_size = TRUE;
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000;
SET @@global.sort_buffer_size = FALSE;
SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
echo 'Bug: Errors should be displayed on assigning TRUE/FALSE to variable';
SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000;
--echo '#---------------------FN_DYNVARS_151_09----------------------#'
####################################################################################
......@@ -171,11 +169,10 @@ echo 'Bug: Errors should be displayed on assigning TRUE/FALSE to variable';
SET @@global.sort_buffer_size = 9000;
SELECT @@sort_buffer_size = @@global.sort_buffer_size;
--echo '#---------------------FN_DYNVARS_151_10----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
###################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable#
###################################################################################################
SET @@sort_buffer_size = 9000;
SELECT @@sort_buffer_size = @@local.sort_buffer_size;
......@@ -188,8 +185,7 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size;
###################################################################################
SET sort_buffer_size = 9100;
SELECT @sort_buffer_size= 32776 OR @@sort_buffer_size= 32804;
SELECT @@sort_buffer_size;
SELECT @@sort_buffer_size >= 32776 AND @@sort_buffer_size < 33000;
--Error ER_UNKNOWN_TABLE
SELECT local.sort_buffer_size;
--Error ER_UNKNOWN_TABLE
......@@ -203,11 +199,11 @@ SELECT sort_buffer_size = @@session.sort_buffer_size;
####################################
SET @@global.sort_buffer_size = @start_global_value;
SELECT @@global.sort_buffer_size;
SET @@session.sort_buffer_size = @start_session_value;
SELECT @@session.sort_buffer_size;
--enable_warnings
#############################################################
# END OF sort_buffer_size TESTS #
#############################################################
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