Commit c81b519a authored by Patrick Crews's avatar Patrick Crews

merge

parents c130d8cd 1da82b61
...@@ -9,7 +9,6 @@ SET @min_flush_time = 0; ...@@ -9,7 +9,6 @@ SET @min_flush_time = 0;
#SET @max_flush_time = 0; #SET @max_flush_time = 0;
SET @default_key_buffer_size = 131072; SET @default_key_buffer_size = 131072;
SET @min_key_buffer_size = 36;
#SET @default_join_buffer_size = 131072; #SET @default_join_buffer_size = 131072;
#SET @min_join_buffer_size = 8200; #SET @min_join_buffer_size = 8200;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
let $counter= 500; let $counter= 500;
while ($mysql_errno) while ($mysql_errno)
{ {
--error 0,2002,2006 --error 0,2002,2006,2013
show status; show status;
dec $counter; dec $counter;
......
...@@ -9,7 +9,6 @@ SET @min_flush_time = 0; ...@@ -9,7 +9,6 @@ SET @min_flush_time = 0;
#SET @max_flush_time = 0; #SET @max_flush_time = 0;
SET @default_key_buffer_size= 131072; SET @default_key_buffer_size= 131072;
SET @min_key_buffer_size= 8;
#SET @default_join_buffer_size = 131072; #SET @default_join_buffer_size = 131072;
#SET @min_join_buffer_size = 8200; #SET @min_join_buffer_size = 8200;
......
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
# * Valid & Invalid values # # * Valid & Invalid values #
# * Scope & Access method # # * Scope & Access method #
# * Data Integrity # # * Data Integrity #
# Modified: Horst Hunger 2008-11-27 #
# Due to OS depending values the check has been changed #
# from concrete values to ranges. #
# # # #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # # Reference: #
# server-system-variables.html # # 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 --source include/load_sysvars.inc
...@@ -38,8 +38,6 @@ ...@@ -38,8 +38,6 @@
######################################################################## ########################################################################
SET @start_value = @@global.key_buffer_size; SET @start_value = @@global.key_buffer_size;
SELECT @start_value;
--echo '#--------------------FN_DYNVARS_055_01------------------------#' --echo '#--------------------FN_DYNVARS_055_01------------------------#'
######################################################################## ########################################################################
...@@ -49,9 +47,7 @@ SELECT @start_value; ...@@ -49,9 +47,7 @@ SELECT @start_value;
SET @@global.key_buffer_size = 99; SET @@global.key_buffer_size = 99;
--Error ER_NO_DEFAULT --Error ER_NO_DEFAULT
SET @@global.key_buffer_size = DEFAULT; SET @@global.key_buffer_size = DEFAULT;
--echo 'Bug# 34878: This variable has default value according to documentation'; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
SELECT @@global.key_buffer_size = @min_key_buffer_size;
--echo '#---------------------FN_DYNVARS_055_02-------------------------#' --echo '#---------------------FN_DYNVARS_055_02-------------------------#'
############################################### ###############################################
...@@ -66,26 +62,25 @@ SELECT @@global.key_buffer_size = @start_value; ...@@ -66,26 +62,25 @@ SELECT @@global.key_buffer_size = @start_value;
# Change the value of key_buffer_size to a valid value # # Change the value of key_buffer_size to a valid value #
######################################################################## ########################################################################
SET @@global.key_buffer_size = @min_key_buffer_size; SET @@global.key_buffer_size = 8 ;
SELECT @@global.key_buffer_size= @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--disable_warnings --disable_warnings
#Due to "lost connection" #Due to increasing the runtime significantly and allocating the buffer instantly.
#SET @@global.key_buffer_size = 4294967295; #SET @@global.key_buffer_size = 4294967295;
--enable_warnings --enable_warnings
#SELECT @@global.key_buffer_size; #SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 1800; SET @@global.key_buffer_size = 1800;
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
SET @@global.key_buffer_size = 65535; SET @@global.key_buffer_size = 65535;
SELECT @@global.key_buffer_size; SELECT @@global.key_buffer_size;
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--echo '#--------------------FN_DYNVARS_055_04-------------------------#' --echo '#--------------------FN_DYNVARS_055_04-------------------------#'
########################################################################### ###########################################################################
# Change the value of key_buffer_size to invalid value # # Change the value of key_buffer_size to invalid value #
########################################################################### ###########################################################################
# Due to "lost connection" # Due to increasing the runtime significantly and allocating the buffer instantly
# with a size of 18446744073709551615 bytes with 32bit exec.
#SET @@global.key_buffer_size = -1; #SET @@global.key_buffer_size = -1;
#SELECT @@global.key_buffer_size; #SELECT @@global.key_buffer_size;
#SET @@global.key_buffer_size = 100000000000; #SET @@global.key_buffer_size = 100000000000;
...@@ -96,16 +91,14 @@ SELECT @@global.key_buffer_size; ...@@ -96,16 +91,14 @@ SELECT @@global.key_buffer_size;
#SET @@global.key_buffer_size = -1024; #SET @@global.key_buffer_size = -1024;
#SELECT @@global.key_buffer_size; #SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 4; SET @@global.key_buffer_size = 4;
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
--Error ER_WRONG_TYPE_FOR_VAR --Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_buffer_size = ON; SET @@global.key_buffer_size = ON;
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--Error ER_WRONG_TYPE_FOR_VAR --Error ER_WRONG_TYPE_FOR_VAR
SET @@global.key_buffer_size = 'test'; SET @@global.key_buffer_size = 'test';
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--echo '#-------------------FN_DYNVARS_055_05----------------------------#' --echo '#-------------------FN_DYNVARS_055_05----------------------------#'
########################################################################### ###########################################################################
...@@ -114,8 +107,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size; ...@@ -114,8 +107,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size;
--Error ER_GLOBAL_VARIABLE --Error ER_GLOBAL_VARIABLE
SET @@session.key_buffer_size = 0; SET @@session.key_buffer_size = 0;
SELECT @@key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--echo '#----------------------FN_DYNVARS_055_06------------------------#' --echo '#----------------------FN_DYNVARS_055_06------------------------#'
############################################################################## ##############################################################################
...@@ -130,17 +122,15 @@ SELECT @@key_buffer_size = VARIABLE_VALUE ...@@ -130,17 +122,15 @@ SELECT @@key_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='key_buffer_size'; WHERE VARIABLE_NAME='key_buffer_size';
--echo '#---------------------FN_DYNVARS_055_07----------------------#' --echo '#---------------------FN_DYNVARS_055_07----------------------#'
################################################################### ###################################################################
# Check if TRUE and FALSE values can be used on variable # # Check if TRUE and FALSE values can be used on variable #
################################################################### ###################################################################
SET @@global.key_buffer_size = TRUE; SET @@global.key_buffer_size = TRUE;
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
SET @@global.key_buffer_size = FALSE; SET @@global.key_buffer_size = FALSE;
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--echo '#---------------------FN_DYNVARS_055_08----------------------#' --echo '#---------------------FN_DYNVARS_055_08----------------------#'
##################################################################### #####################################################################
...@@ -150,7 +140,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size; ...@@ -150,7 +140,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size;
# due to differences in contents of the warnings # due to differences in contents of the warnings
--disable_warnings --disable_warnings
SET @@global.key_buffer_size = @min_key_buffer_size; SET @@global.key_buffer_size = 8 ;
SELECT @@key_buffer_size = @@global.key_buffer_size; SELECT @@key_buffer_size = @@global.key_buffer_size;
--enable_warnings --enable_warnings
...@@ -160,8 +150,8 @@ SELECT @@key_buffer_size = @@global.key_buffer_size; ...@@ -160,8 +150,8 @@ SELECT @@key_buffer_size = @@global.key_buffer_size;
########################################################################## ##########################################################################
--Error ER_GLOBAL_VARIABLE --Error ER_GLOBAL_VARIABLE
SET key_buffer_size = @min_key_buffer_size; SET key_buffer_size = 8 ;
SELECT @@key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--Error ER_PARSE_ERROR --Error ER_PARSE_ERROR
SET local.key_buffer_size = 10; SET local.key_buffer_size = 10;
--Error ER_UNKNOWN_TABLE --Error ER_UNKNOWN_TABLE
...@@ -179,9 +169,9 @@ SELECT key_buffer_size = @@session.key_buffer_size; ...@@ -179,9 +169,9 @@ SELECT key_buffer_size = @@session.key_buffer_size;
############################## ##############################
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
SELECT @@global.key_buffer_size;
--enable_warnings --enable_warnings
####################################################################### #######################################################################
# END OF key_buffer_size TESTS # # END OF key_buffer_size TESTS #
####################################################################### #######################################################################
SET @start_value = @@global.key_buffer_size; SET @start_value = @@global.key_buffer_size;
SELECT @start_value;
@start_value
1048576
'#--------------------FN_DYNVARS_055_01------------------------#' '#--------------------FN_DYNVARS_055_01------------------------#'
SET @@global.key_buffer_size = 99; SET @@global.key_buffer_size = 99;
SET @@global.key_buffer_size = DEFAULT; SET @@global.key_buffer_size = DEFAULT;
ERROR 42000: Variable 'key_buffer_size' doesn't have a default value ERROR 42000: Variable 'key_buffer_size' doesn't have a default value
'Bug# 34878: This variable has default value according to documentation'; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
SELECT @@global.key_buffer_size = @min_key_buffer_size; @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
@@global.key_buffer_size = @min_key_buffer_size
1 1
'#---------------------FN_DYNVARS_055_02-------------------------#' '#---------------------FN_DYNVARS_055_02-------------------------#'
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
...@@ -16,21 +12,20 @@ SELECT @@global.key_buffer_size = @start_value; ...@@ -16,21 +12,20 @@ SELECT @@global.key_buffer_size = @start_value;
@@global.key_buffer_size = @start_value @@global.key_buffer_size = @start_value
1 1
'#--------------------FN_DYNVARS_055_03------------------------#' '#--------------------FN_DYNVARS_055_03------------------------#'
SET @@global.key_buffer_size = @min_key_buffer_size; SET @@global.key_buffer_size = 8 ;
SELECT @@global.key_buffer_size= @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size= @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = 1800; SET @@global.key_buffer_size = 1800;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1800' Warning 1292 Truncated incorrect key_buffer_size value: '1800'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = 65535; SET @@global.key_buffer_size = 65535;
SELECT @@global.key_buffer_size; SELECT @@global.key_buffer_size;
@@global.key_buffer_size @@global.key_buffer_size
61440 61440
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
'#--------------------FN_DYNVARS_055_04-------------------------#' '#--------------------FN_DYNVARS_055_04-------------------------#'
SET @@global.key_buffer_size = 10000.01; SET @@global.key_buffer_size = 10000.01;
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
...@@ -40,25 +35,24 @@ SELECT @@global.key_buffer_size; ...@@ -40,25 +35,24 @@ SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 4; SET @@global.key_buffer_size = 4;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '4' Warning 1292 Truncated incorrect key_buffer_size value: '4'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.key_buffer_size = ON; SET @@global.key_buffer_size = ON;
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = 'test'; SET @@global.key_buffer_size = 'test';
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'#-------------------FN_DYNVARS_055_05----------------------------#' '#-------------------FN_DYNVARS_055_05----------------------------#'
SET @@session.key_buffer_size = 0; SET @@session.key_buffer_size = 0;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'#----------------------FN_DYNVARS_055_06------------------------#' '#----------------------FN_DYNVARS_055_06------------------------#'
SELECT @@global.key_buffer_size = VARIABLE_VALUE SELECT @@global.key_buffer_size = VARIABLE_VALUE
...@@ -75,25 +69,25 @@ WHERE VARIABLE_NAME='key_buffer_size'; ...@@ -75,25 +69,25 @@ WHERE VARIABLE_NAME='key_buffer_size';
SET @@global.key_buffer_size = TRUE; SET @@global.key_buffer_size = TRUE;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1' Warning 1292 Truncated incorrect key_buffer_size value: '1'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = FALSE; SET @@global.key_buffer_size = FALSE;
Warnings: Warnings:
Warning 1438 Cannot drop default keycache Warning 1438 Cannot drop default keycache
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'#---------------------FN_DYNVARS_055_08----------------------#' '#---------------------FN_DYNVARS_055_08----------------------#'
SET @@global.key_buffer_size = @min_key_buffer_size; SET @@global.key_buffer_size = 8 ;
SELECT @@key_buffer_size = @@global.key_buffer_size; SELECT @@key_buffer_size = @@global.key_buffer_size;
@@key_buffer_size = @@global.key_buffer_size @@key_buffer_size = @@global.key_buffer_size
1 1
'#---------------------FN_DYNVARS_055_09----------------------#' '#---------------------FN_DYNVARS_055_09----------------------#'
SET key_buffer_size = @min_key_buffer_size; SET key_buffer_size = 8 ;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET local.key_buffer_size = 10; SET local.key_buffer_size = 10;
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 'key_buffer_size = 10' at line 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 'key_buffer_size = 10' at line 1
...@@ -106,6 +100,3 @@ ERROR 42S02: Unknown table 'global' in field list ...@@ -106,6 +100,3 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT key_buffer_size = @@session.key_buffer_size; SELECT key_buffer_size = @@session.key_buffer_size;
ERROR 42S22: Unknown column 'key_buffer_size' in 'field list' ERROR 42S22: Unknown column 'key_buffer_size' in 'field list'
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
SELECT @@global.key_buffer_size;
@@global.key_buffer_size
1048576
SET @start_value = @@global.key_buffer_size; SET @start_value = @@global.key_buffer_size;
SELECT @start_value;
@start_value
1048576
'#--------------------FN_DYNVARS_055_01------------------------#' '#--------------------FN_DYNVARS_055_01------------------------#'
SET @@global.key_buffer_size = 99; SET @@global.key_buffer_size = 99;
SET @@global.key_buffer_size = DEFAULT; SET @@global.key_buffer_size = DEFAULT;
ERROR 42000: Variable 'key_buffer_size' doesn't have a default value ERROR 42000: Variable 'key_buffer_size' doesn't have a default value
'Bug# 34878: This variable has default value according to documentation'; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
SELECT @@global.key_buffer_size = @min_key_buffer_size; @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
@@global.key_buffer_size = @min_key_buffer_size
1 1
'#---------------------FN_DYNVARS_055_02-------------------------#' '#---------------------FN_DYNVARS_055_02-------------------------#'
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
...@@ -16,21 +12,20 @@ SELECT @@global.key_buffer_size = @start_value; ...@@ -16,21 +12,20 @@ SELECT @@global.key_buffer_size = @start_value;
@@global.key_buffer_size = @start_value @@global.key_buffer_size = @start_value
1 1
'#--------------------FN_DYNVARS_055_03------------------------#' '#--------------------FN_DYNVARS_055_03------------------------#'
SET @@global.key_buffer_size = @min_key_buffer_size; SET @@global.key_buffer_size = 8 ;
SELECT @@global.key_buffer_size= @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size= @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = 1800; SET @@global.key_buffer_size = 1800;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1800' Warning 1292 Truncated incorrect key_buffer_size value: '1800'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = 65535; SET @@global.key_buffer_size = 65535;
SELECT @@global.key_buffer_size; SELECT @@global.key_buffer_size;
@@global.key_buffer_size @@global.key_buffer_size
61440 61440
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
'#--------------------FN_DYNVARS_055_04-------------------------#' '#--------------------FN_DYNVARS_055_04-------------------------#'
SET @@global.key_buffer_size = 10000.01; SET @@global.key_buffer_size = 10000.01;
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
...@@ -40,25 +35,24 @@ SELECT @@global.key_buffer_size; ...@@ -40,25 +35,24 @@ SELECT @@global.key_buffer_size;
SET @@global.key_buffer_size = 4; SET @@global.key_buffer_size = 4;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '4' Warning 1292 Truncated incorrect key_buffer_size value: '4'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.key_buffer_size = ON; SET @@global.key_buffer_size = ON;
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = 'test'; SET @@global.key_buffer_size = 'test';
ERROR 42000: Incorrect argument type to variable 'key_buffer_size' ERROR 42000: Incorrect argument type to variable 'key_buffer_size'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'#-------------------FN_DYNVARS_055_05----------------------------#' '#-------------------FN_DYNVARS_055_05----------------------------#'
SET @@session.key_buffer_size = 0; SET @@session.key_buffer_size = 0;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'#----------------------FN_DYNVARS_055_06------------------------#' '#----------------------FN_DYNVARS_055_06------------------------#'
SELECT @@global.key_buffer_size = VARIABLE_VALUE SELECT @@global.key_buffer_size = VARIABLE_VALUE
...@@ -75,25 +69,25 @@ WHERE VARIABLE_NAME='key_buffer_size'; ...@@ -75,25 +69,25 @@ WHERE VARIABLE_NAME='key_buffer_size';
SET @@global.key_buffer_size = TRUE; SET @@global.key_buffer_size = TRUE;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1' Warning 1292 Truncated incorrect key_buffer_size value: '1'
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET @@global.key_buffer_size = FALSE; SET @@global.key_buffer_size = FALSE;
Warnings: Warnings:
Warning 1438 Cannot drop default keycache Warning 1438 Cannot drop default keycache
SELECT @@global.key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@global.key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
'#---------------------FN_DYNVARS_055_08----------------------#' '#---------------------FN_DYNVARS_055_08----------------------#'
SET @@global.key_buffer_size = @min_key_buffer_size; SET @@global.key_buffer_size = 8 ;
SELECT @@key_buffer_size = @@global.key_buffer_size; SELECT @@key_buffer_size = @@global.key_buffer_size;
@@key_buffer_size = @@global.key_buffer_size @@key_buffer_size = @@global.key_buffer_size
1 1
'#---------------------FN_DYNVARS_055_09----------------------#' '#---------------------FN_DYNVARS_055_09----------------------#'
SET key_buffer_size = @min_key_buffer_size; SET key_buffer_size = 8 ;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@key_buffer_size = @min_key_buffer_size; SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
@@key_buffer_size = @min_key_buffer_size @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36
1 1
SET local.key_buffer_size = 10; SET local.key_buffer_size = 10;
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 'key_buffer_size = 10' at line 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 'key_buffer_size = 10' at line 1
...@@ -106,6 +100,3 @@ ERROR 42S02: Unknown table 'global' in field list ...@@ -106,6 +100,3 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT key_buffer_size = @@session.key_buffer_size; SELECT key_buffer_size = @@session.key_buffer_size;
ERROR 42S22: Unknown column 'key_buffer_size' in 'field list' ERROR 42S22: Unknown column 'key_buffer_size' in 'field list'
SET @@global.key_buffer_size = @start_value; SET @@global.key_buffer_size = @start_value;
SELECT @@global.key_buffer_size;
@@global.key_buffer_size
1048576
SET @start_global_value = @@global.tmp_table_size; SET @start_global_value = @@global.tmp_table_size;
SELECT @start_global_value;
@start_global_value
16777216
SET @start_session_value = @@session.tmp_table_size; SET @start_session_value = @@session.tmp_table_size;
SELECT @start_session_value;
@start_session_value
16777216
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_01-------------------------#' '#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.tmp_table_size = 100; SET @@global.tmp_table_size = 100;
Warnings: Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '100' Warning 1292 Truncated incorrect tmp_table_size value: '100'
SET @@global.tmp_table_size = DEFAULT; SET @@global.tmp_table_size = DEFAULT;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
16777216
'Bug# 34876: This variable has invalid default value as compared to documentation';
SET @@session.tmp_table_size = 200; SET @@session.tmp_table_size = 200;
Warnings: Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '200' Warning 1292 Truncated incorrect tmp_table_size value: '200'
SET @@session.tmp_table_size = DEFAULT; SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
16777216
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_02-------------------------#' '#--------------------FN_DYNVARS_005_02-------------------------#'
SET @@global.tmp_table_size = DEFAULT; SELECT @@global.tmp_table_size >= 16777216;
SELECT @@global.tmp_table_size = 33554432; @@global.tmp_table_size >= 16777216
@@global.tmp_table_size = 33554432 1
0 SELECT @@session.tmp_table_size >= 16777216;
SET @@session.tmp_table_size = DEFAULT; @@session.tmp_table_size >= 16777216
SELECT @@session.tmp_table_size = 33554432; 1
@@session.tmp_table_size = 33554432
0
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_03-------------------------#' '#--------------------FN_DYNVARS_005_03-------------------------#'
SET @@global.tmp_table_size = 1024; SET @@global.tmp_table_size = 1024;
SELECT @@global.tmp_table_size; SELECT @@global.tmp_table_size;
...@@ -52,7 +34,7 @@ SET @@session.tmp_table_size = 1024; ...@@ -52,7 +34,7 @@ SET @@session.tmp_table_size = 1024;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size;
@@session.tmp_table_size @@session.tmp_table_size
1024 1024
SET @@session.tmp_table_size =4294967295; SET @@session.tmp_table_size = 4294967295;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size;
@@session.tmp_table_size @@session.tmp_table_size
4294967295 4294967295
...@@ -79,7 +61,6 @@ Warning 1292 Truncated incorrect tmp_table_size value: '1000' ...@@ -79,7 +61,6 @@ Warning 1292 Truncated incorrect tmp_table_size value: '1000'
SELECT @@global.tmp_table_size; SELECT @@global.tmp_table_size;
@@global.tmp_table_size @@global.tmp_table_size
1024 1024
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.tmp_table_size = ON; SET @@global.tmp_table_size = ON;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size' ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@global.tmp_table_size = OFF; SET @@global.tmp_table_size = OFF;
...@@ -96,7 +77,6 @@ Warning 1292 Truncated incorrect tmp_table_size value: '0' ...@@ -96,7 +77,6 @@ Warning 1292 Truncated incorrect tmp_table_size value: '0'
SELECT @@global.tmp_table_size; SELECT @@global.tmp_table_size;
@@global.tmp_table_size @@global.tmp_table_size
1024 1024
'Bug:Error should be shown that variable is numeric and can not assigned boolean value';
SET @@global.tmp_table_size = 65530.34; SET @@global.tmp_table_size = 65530.34;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size' ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@global.tmp_table_size ="Test"; SET @@global.tmp_table_size ="Test";
...@@ -120,18 +100,18 @@ SELECT @@session.tmp_table_size; ...@@ -120,18 +100,18 @@ SELECT @@session.tmp_table_size;
SET @@session.tmp_table_size = "Test"; SET @@session.tmp_table_size = "Test";
ERROR 42000: Incorrect argument type to variable 'tmp_table_size' ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = 12345678901; SET @@session.tmp_table_size = 12345678901;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size IN (12345678901,4294967295);
@@session.tmp_table_size @@session.tmp_table_size IN (12345678901,4294967295)
4294967295 1
'#------------------FN_DYNVARS_005_06-----------------------#' '#------------------FN_DYNVARS_005_06-----------------------#'
SELECT @@global.tmp_table_size = VARIABLE_VALUE SELECT @@global.tmp_table_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='tmp_table_size'; WHERE VARIABLE_NAME='tmp_table_size';
@@global.tmp_table_size = VARIABLE_VALUE @@global.tmp_table_size = VARIABLE_VALUE
1 1
'#------------------FN_DYNVARS_005_07-----------------------#' '#------------------FN_DYNVARS_005_07-----------------------#'
SELECT @@session.tmp_table_size = VARIABLE_VALUE SELECT @@session.tmp_table_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='tmp_table_size'; WHERE VARIABLE_NAME='tmp_table_size';
@@session.tmp_table_size = VARIABLE_VALUE @@session.tmp_table_size = VARIABLE_VALUE
1 1
...@@ -163,10 +143,4 @@ ERROR 42S02: Unknown table 'global' in field list ...@@ -163,10 +143,4 @@ ERROR 42S02: Unknown table 'global' in field list
SELECT tmp_table_size = @@session.tmp_table_size; SELECT tmp_table_size = @@session.tmp_table_size;
ERROR 42S22: Unknown column 'tmp_table_size' in 'field list' ERROR 42S22: Unknown column 'tmp_table_size' in 'field list'
SET @@global.tmp_table_size = @start_global_value; SET @@global.tmp_table_size = @start_global_value;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
16777216
SET @@session.tmp_table_size = @start_session_value; SET @@session.tmp_table_size = @start_session_value;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
16777216
SET @start_global_value = @@global.tmp_table_size;
SELECT @start_global_value;
@start_global_value
16777216
SET @start_session_value = @@session.tmp_table_size;
SELECT @start_session_value;
@start_session_value
16777216
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.tmp_table_size = 100;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '100'
SET @@global.tmp_table_size = DEFAULT;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
16777216
'Bug# 34876: This variable has invalid default value as compared to documentation';
SET @@session.tmp_table_size = 200;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '200'
SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
16777216
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_02-------------------------#'
SET @@global.tmp_table_size = DEFAULT;
SELECT @@global.tmp_table_size = 33554432;
@@global.tmp_table_size = 33554432
0
SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size = 33554432;
@@session.tmp_table_size = 33554432
0
'Bug# 34876: This variable has invalid default value as compared to documentation';
'#--------------------FN_DYNVARS_005_03-------------------------#'
SET @@global.tmp_table_size = 1024;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
SET @@global.tmp_table_size = 60020;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
60020
SET @@global.tmp_table_size = 4294967295;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
4294967295
'#--------------------FN_DYNVARS_005_04-------------------------#'
SET @@session.tmp_table_size = 1024;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
1024
SET @@session.tmp_table_size =4294967295;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
4294967295
SET @@session.tmp_table_size = 65535;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
65535
'#------------------FN_DYNVARS_005_05-----------------------#'
SET @@global.tmp_table_size = 0;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '0'
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
SET @@global.tmp_table_size = -1024;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '0'
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
SET @@global.tmp_table_size = 1000;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '1000'
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@global.tmp_table_size = ON;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@global.tmp_table_size = OFF;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@global.tmp_table_size = True;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '1'
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
SET @@global.tmp_table_size = False;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '0'
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
1024
'Bug:Error should be shown that variable is numeric and can not assigned boolean value';
SET @@global.tmp_table_size = 65530.34;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@global.tmp_table_size ="Test";
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = ON;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = OFF;
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = True;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '1'
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
1024
SET @@session.tmp_table_size = False;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '0'
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
1024
SET @@session.tmp_table_size = "Test";
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = 12345678901;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
12345678901
'#------------------FN_DYNVARS_005_06-----------------------#'
SELECT @@global.tmp_table_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='tmp_table_size';
@@global.tmp_table_size = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_005_07-----------------------#'
SELECT @@session.tmp_table_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='tmp_table_size';
@@session.tmp_table_size = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@global.tmp_table_size = 1024;
SET @@tmp_table_size = 4294967295;
SELECT @@tmp_table_size = @@global.tmp_table_size;
@@tmp_table_size = @@global.tmp_table_size
0
'#---------------------FN_DYNVARS_001_10----------------------#'
SET @@tmp_table_size = 100;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '100'
SELECT @@tmp_table_size = @@local.tmp_table_size;
@@tmp_table_size = @@local.tmp_table_size
1
SELECT @@local.tmp_table_size = @@session.tmp_table_size;
@@local.tmp_table_size = @@session.tmp_table_size
1
'#---------------------FN_DYNVARS_001_11----------------------#'
SET tmp_table_size = 1027;
SELECT @@tmp_table_size;
@@tmp_table_size
1027
SELECT local.tmp_table_size;
ERROR 42S02: Unknown table 'local' in field list
SELECT global.tmp_table_size;
ERROR 42S02: Unknown table 'global' in field list
SELECT tmp_table_size = @@session.tmp_table_size;
ERROR 42S22: Unknown column 'tmp_table_size' in 'field list'
SET @@global.tmp_table_size = @start_global_value;
SELECT @@global.tmp_table_size;
@@global.tmp_table_size
16777216
SET @@session.tmp_table_size = @start_session_value;
SELECT @@session.tmp_table_size;
@@session.tmp_table_size
16777216
############## mysql-test\t\tmp_table_size_basic.test ######################### ########################### tmp_table_size_basic.test ##########################
# # # #
# Variable Name: tmp_table_size # # Variable Name: tmp_table_size #
# Scope: GLOBAL | SESSION # # Scope: GLOBAL | SESSION #
# Access Type: Dynamic # # Access Type: Dynamic #
# Data Type: numeric # # Data Type: numeric #
# Default Value: 33554432 # # Default Value: system dependend #
# Range: 1024-4294967295 # # Range: 1024-system dependend #
# # # #
# # # #
# Creation Date: 2008-02-13 # # Creation Date: 2008-02-13 #
# Author: Salman # # Author: Salman #
# # # #
# Description: Test Cases of Dynamic System Variable tmp_table_size # # Description: Test Cases of Dynamic System Variable tmp_table_size #
# that checks the behavior of this variable in the following ways# # that checks the behavior of this variable in the following ways #
# * Default Value # # * Default Value #
# * Valid & Invalid values # # * Valid & Invalid values #
# * Scope & Access method # # * Scope & Access method #
# * Data Integrity # # * Data Integrity #
# # # Modified: 2008-12-04 HHunger #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # # removed the differences between 64 and 32 bit platforms #
# server-system-variables.html#option_mysqld_tmp_table_size # # #
# # # Reference: #
############################################################################### # http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
# #
################################################################################
--source include/load_sysvars.inc --source include/load_sysvars.inc
...@@ -29,17 +31,12 @@ ...@@ -29,17 +31,12 @@
# START OF tmp_table_size TESTS # # START OF tmp_table_size TESTS #
############################################################## ##############################################################
############################################################# #############################################################
# Save initial value # # Save initial value #
############################################################# #############################################################
SET @start_global_value = @@global.tmp_table_size; SET @start_global_value = @@global.tmp_table_size;
SELECT @start_global_value;
SET @start_session_value = @@session.tmp_table_size; SET @start_session_value = @@session.tmp_table_size;
SELECT @start_session_value;
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
--echo '#--------------------FN_DYNVARS_005_01-------------------------#' --echo '#--------------------FN_DYNVARS_005_01-------------------------#'
############################################################## ##############################################################
...@@ -48,27 +45,19 @@ SELECT @start_session_value; ...@@ -48,27 +45,19 @@ SELECT @start_session_value;
SET @@global.tmp_table_size = 100; SET @@global.tmp_table_size = 100;
SET @@global.tmp_table_size = DEFAULT; SET @@global.tmp_table_size = DEFAULT;
SELECT @@global.tmp_table_size;
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
SET @@session.tmp_table_size = 200; SET @@session.tmp_table_size = 200;
SET @@session.tmp_table_size = DEFAULT; SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size;
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
--echo '#--------------------FN_DYNVARS_005_02-------------------------#' --echo '#--------------------FN_DYNVARS_005_02-------------------------#'
######################################################################## ########################################################################
# Check the DEFAULT value of tmp_table_size # # Check the DEFAULT value of tmp_table_size #
######################################################################## ########################################################################
# The DEFAULT value is system dependend.
# Therefore we have only a plausibility check here
SELECT @@global.tmp_table_size >= 16777216;
SET @@global.tmp_table_size = DEFAULT; SELECT @@session.tmp_table_size >= 16777216;
SELECT @@global.tmp_table_size = 33554432;
SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size = 33554432;
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
--echo '#--------------------FN_DYNVARS_005_03-------------------------#' --echo '#--------------------FN_DYNVARS_005_03-------------------------#'
######################################################################## ########################################################################
...@@ -87,11 +76,11 @@ SELECT @@global.tmp_table_size; ...@@ -87,11 +76,11 @@ SELECT @@global.tmp_table_size;
######################################################################### #########################################################################
# Change the value of tmp_table_size to a valid value for SESSION Scope # # Change the value of tmp_table_size to a valid value for SESSION Scope #
######################################################################### #########################################################################
SET @@session.tmp_table_size = 1024; SET @@session.tmp_table_size = 1024;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size;
SET @@session.tmp_table_size =4294967295; SET @@session.tmp_table_size = 4294967295;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size;
SET @@session.tmp_table_size = 65535; SET @@session.tmp_table_size = 65535;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size;
...@@ -111,37 +100,28 @@ SELECT @@global.tmp_table_size; ...@@ -111,37 +100,28 @@ SELECT @@global.tmp_table_size;
SET @@global.tmp_table_size = 1000; SET @@global.tmp_table_size = 1000;
SELECT @@global.tmp_table_size; SELECT @@global.tmp_table_size;
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; --Error ER_WRONG_TYPE_FOR_VAR
-- Error ER_WRONG_TYPE_FOR_VAR
SET @@global.tmp_table_size = ON; SET @@global.tmp_table_size = ON;
--Error ER_WRONG_TYPE_FOR_VAR
-- Error ER_WRONG_TYPE_FOR_VAR
SET @@global.tmp_table_size = OFF; SET @@global.tmp_table_size = OFF;
SET @@global.tmp_table_size = True; SET @@global.tmp_table_size = True;
SELECT @@global.tmp_table_size; SELECT @@global.tmp_table_size;
SET @@global.tmp_table_size = False; SET @@global.tmp_table_size = False;
SELECT @@global.tmp_table_size; SELECT @@global.tmp_table_size;
--echo 'Bug:Error should be shown that variable is numeric and can not assigned boolean value';
-- Error ER_WRONG_TYPE_FOR_VAR --Error ER_WRONG_TYPE_FOR_VAR
SET @@global.tmp_table_size = 65530.34; SET @@global.tmp_table_size = 65530.34;
-- Error ER_WRONG_TYPE_FOR_VAR --Error ER_WRONG_TYPE_FOR_VAR
SET @@global.tmp_table_size ="Test"; SET @@global.tmp_table_size ="Test";
--Error ER_WRONG_TYPE_FOR_VAR
-- Error ER_WRONG_TYPE_FOR_VAR
SET @@session.tmp_table_size = ON; SET @@session.tmp_table_size = ON;
--Error ER_WRONG_TYPE_FOR_VAR
-- Error ER_WRONG_TYPE_FOR_VAR
SET @@session.tmp_table_size = OFF; SET @@session.tmp_table_size = OFF;
SET @@session.tmp_table_size = True; SET @@session.tmp_table_size = True;
...@@ -150,21 +130,21 @@ SELECT @@session.tmp_table_size; ...@@ -150,21 +130,21 @@ SELECT @@session.tmp_table_size;
SET @@session.tmp_table_size = False; SET @@session.tmp_table_size = False;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size;
-- Error ER_WRONG_TYPE_FOR_VAR --Error ER_WRONG_TYPE_FOR_VAR
SET @@session.tmp_table_size = "Test"; SET @@session.tmp_table_size = "Test";
SET @@session.tmp_table_size = 12345678901; SET @@session.tmp_table_size = 12345678901;
SELECT @@session.tmp_table_size;
# With a 64 bit mysqld:12345678901,with a 32 bit mysqld: 4294967295
SELECT @@session.tmp_table_size IN (12345678901,4294967295);
--echo '#------------------FN_DYNVARS_005_06-----------------------#' --echo '#------------------FN_DYNVARS_005_06-----------------------#'
#################################################################### ####################################################################
# Check if the value in GLOBAL Table matches value in variable # # Check if the value in GLOBAL Table matches value in variable #
#################################################################### ####################################################################
SELECT @@global.tmp_table_size = VARIABLE_VALUE
SELECT @@global.tmp_table_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='tmp_table_size'; WHERE VARIABLE_NAME='tmp_table_size';
--echo '#------------------FN_DYNVARS_005_07-----------------------#' --echo '#------------------FN_DYNVARS_005_07-----------------------#'
...@@ -172,13 +152,10 @@ WHERE VARIABLE_NAME='tmp_table_size'; ...@@ -172,13 +152,10 @@ WHERE VARIABLE_NAME='tmp_table_size';
# Check if the value in SESSION Table matches value in variable # # Check if the value in SESSION Table matches value in variable #
#################################################################### ####################################################################
SELECT @@session.tmp_table_size = VARIABLE_VALUE SELECT @@session.tmp_table_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='tmp_table_size'; WHERE VARIABLE_NAME='tmp_table_size';
--echo '#---------------------FN_DYNVARS_001_09----------------------#' --echo '#---------------------FN_DYNVARS_001_09----------------------#'
######################################################################## ########################################################################
# Check if global and session variables are independent of each other # # Check if global and session variables are independent of each other #
...@@ -216,16 +193,12 @@ SELECT global.tmp_table_size; ...@@ -216,16 +193,12 @@ SELECT global.tmp_table_size;
--Error ER_BAD_FIELD_ERROR --Error ER_BAD_FIELD_ERROR
SELECT tmp_table_size = @@session.tmp_table_size; SELECT tmp_table_size = @@session.tmp_table_size;
#################################### ####################################
# Restore initial value # # Restore initial value #
#################################### ####################################
SET @@global.tmp_table_size = @start_global_value; SET @@global.tmp_table_size = @start_global_value;
SELECT @@global.tmp_table_size;
SET @@session.tmp_table_size = @start_session_value; SET @@session.tmp_table_size = @start_session_value;
SELECT @@session.tmp_table_size;
################################################### ###################################################
# END OF tmp_table_size TESTS # # END OF tmp_table_size TESTS #
......
################################################################################
# Created by Horst Hunger 2008-05-07 #
# #
# Wrapper for 32 bit machines #
################################################################################
--source include/have_32bit.inc
--source suite/sys_vars/inc/tmp_table_size_basic.inc
################################################################################
# Created by Horst Hunger 2008-05-07 #
# #
# Wrapper for 64 bit machines #
################################################################################
--source include/have_64bit.inc
--source suite/sys_vars/inc/tmp_table_size_basic.inc
...@@ -12,3 +12,4 @@ ...@@ -12,3 +12,4 @@
federated_transactions : Bug#29523 Transactions do not work federated_transactions : Bug#29523 Transactions do not work
slow_query_log_func : Bug #37962: *_func tests containing sleeps/race conditions slow_query_log_func : Bug #37962: *_func tests containing sleeps/race conditions
wait_timeout_func : Bug #41225 joro wait_timeout_func fails wait_timeout_func : Bug #41225 joro wait_timeout_func fails
kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enoiugh for pushbuild.
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