From 120cfcacb865e3127f0d0a01d64d5e756774e35c Mon Sep 17 00:00:00 2001 From: Horst Hunger Date: Wed, 3 Dec 2008 16:43:53 +0100 Subject: [PATCH] (No) fix for Bug#36878: The test has been taken out fo main and put into "sys_vars", but the opportunity to check the test has been take to improve it. --- .../sys_vars/inc/tmp_table_size_basic.inc | 30 ++----------------- .../sys_vars/r/tmp_table_size_basic_32.result | 6 ---- .../sys_vars/r/tmp_table_size_basic_64.result | 6 ---- 3 files changed, 3 insertions(+), 39 deletions(-) diff --git a/mysql-test/suite/sys_vars/inc/tmp_table_size_basic.inc b/mysql-test/suite/sys_vars/inc/tmp_table_size_basic.inc index 7f69bcd1f8c..d29ef6da094 100644 --- a/mysql-test/suite/sys_vars/inc/tmp_table_size_basic.inc +++ b/mysql-test/suite/sys_vars/inc/tmp_table_size_basic.inc @@ -18,8 +18,8 @@ # * Scope & Access method # # * Data Integrity # # # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-system-variables.html#option_mysqld_tmp_table_size # +# Reference: # +# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html # # # ############################################################################### @@ -29,7 +29,6 @@ # START OF tmp_table_size TESTS # ############################################################## - ############################################################# # Save initial value # ############################################################# @@ -39,8 +38,6 @@ SELECT @start_global_value; 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-------------------------#' ############################################################## # Display the DEFAULT value of tmp_table_size # @@ -50,16 +47,13 @@ SET @@global.tmp_table_size = 100; 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 = DEFAULT; SELECT @@session.tmp_table_size; ---echo 'Bug# 34876: This variable has invalid default value as compared to documentation'; - --echo '#--------------------FN_DYNVARS_005_02-------------------------#' ######################################################################## -# Check the DEFAULT value of tmp_table_size # +# Check the DEFAULT value of tmp_table_size # ######################################################################## SET @@global.tmp_table_size = DEFAULT; @@ -68,8 +62,6 @@ 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-------------------------#' ######################################################################## # Change the value of tmp_table_size to a valid value for GLOBAL Scope # @@ -111,24 +103,17 @@ SELECT @@global.tmp_table_size; SET @@global.tmp_table_size = 1000; SELECT @@global.tmp_table_size; ---echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; - - -- Error ER_WRONG_TYPE_FOR_VAR SET @@global.tmp_table_size = ON; - -- Error ER_WRONG_TYPE_FOR_VAR SET @@global.tmp_table_size = OFF; - SET @@global.tmp_table_size = True; SELECT @@global.tmp_table_size; SET @@global.tmp_table_size = False; 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 SET @@global.tmp_table_size = 65530.34; @@ -136,11 +121,9 @@ SET @@global.tmp_table_size = 65530.34; -- Error ER_WRONG_TYPE_FOR_VAR SET @@global.tmp_table_size ="Test"; - -- Error ER_WRONG_TYPE_FOR_VAR SET @@session.tmp_table_size = ON; - -- Error ER_WRONG_TYPE_FOR_VAR SET @@session.tmp_table_size = OFF; @@ -156,13 +139,11 @@ SET @@session.tmp_table_size = "Test"; SET @@session.tmp_table_size = 12345678901; SELECT @@session.tmp_table_size; - --echo '#------------------FN_DYNVARS_005_06-----------------------#' #################################################################### # Check if the value in GLOBAL Table matches value in variable # #################################################################### - SELECT @@global.tmp_table_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='tmp_table_size'; @@ -176,9 +157,6 @@ SELECT @@session.tmp_table_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='tmp_table_size'; - - - --echo '#---------------------FN_DYNVARS_001_09----------------------#' ######################################################################## # Check if global and session variables are independent of each other # @@ -216,7 +194,6 @@ SELECT global.tmp_table_size; --Error ER_BAD_FIELD_ERROR SELECT tmp_table_size = @@session.tmp_table_size; - #################################### # Restore initial value # #################################### @@ -226,7 +203,6 @@ SELECT @@global.tmp_table_size; SET @@session.tmp_table_size = @start_session_value; SELECT @@session.tmp_table_size; - ################################################### # END OF tmp_table_size TESTS # ################################################### diff --git a/mysql-test/suite/sys_vars/r/tmp_table_size_basic_32.result b/mysql-test/suite/sys_vars/r/tmp_table_size_basic_32.result index aeafd95ed55..ba3fd5420c6 100644 --- a/mysql-test/suite/sys_vars/r/tmp_table_size_basic_32.result +++ b/mysql-test/suite/sys_vars/r/tmp_table_size_basic_32.result @@ -6,7 +6,6 @@ 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: @@ -15,7 +14,6 @@ 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' @@ -23,7 +21,6 @@ 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; @@ -33,7 +30,6 @@ 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; @@ -79,7 +75,6 @@ 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; @@ -96,7 +91,6 @@ 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"; diff --git a/mysql-test/suite/sys_vars/r/tmp_table_size_basic_64.result b/mysql-test/suite/sys_vars/r/tmp_table_size_basic_64.result index 837b90fc143..73ebaecf5f0 100644 --- a/mysql-test/suite/sys_vars/r/tmp_table_size_basic_64.result +++ b/mysql-test/suite/sys_vars/r/tmp_table_size_basic_64.result @@ -6,7 +6,6 @@ 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: @@ -15,7 +14,6 @@ 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' @@ -23,7 +21,6 @@ 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; @@ -33,7 +30,6 @@ 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; @@ -79,7 +75,6 @@ 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; @@ -96,7 +91,6 @@ 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";