1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

(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.

This commit is contained in:
Horst Hunger
2008-12-03 16:43:53 +01:00
parent 4d63306d42
commit 120cfcacb8
3 changed files with 3 additions and 39 deletions

View File

@ -18,8 +18,8 @@
# * Scope & Access method # # * Scope & Access method #
# * Data Integrity # # * Data Integrity #
# # # #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # # Reference: #
# server-system-variables.html#option_mysqld_tmp_table_size # # http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
# # # #
############################################################################### ###############################################################################
@ -29,7 +29,6 @@
# START OF tmp_table_size TESTS # # START OF tmp_table_size TESTS #
############################################################## ##############################################################
############################################################# #############################################################
# Save initial value # # Save initial value #
############################################################# #############################################################
@ -39,8 +38,6 @@ SELECT @start_global_value;
SET @start_session_value = @@session.tmp_table_size; SET @start_session_value = @@session.tmp_table_size;
SELECT @start_session_value; 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-------------------------#'
############################################################## ##############################################################
# Display the DEFAULT value of tmp_table_size # # Display the DEFAULT value of tmp_table_size #
@ -50,12 +47,9 @@ SET @@global.tmp_table_size = 100;
SET @@global.tmp_table_size = DEFAULT; SET @@global.tmp_table_size = DEFAULT;
SELECT @@global.tmp_table_size; 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; 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-------------------------#'
######################################################################## ########################################################################
@ -68,8 +62,6 @@ SELECT @@global.tmp_table_size = 33554432;
SET @@session.tmp_table_size = DEFAULT; SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size = 33554432; 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-------------------------#'
######################################################################## ########################################################################
# Change the value of tmp_table_size to a valid value for GLOBAL Scope # # 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; 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;
@ -136,11 +121,9 @@ 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;
@ -156,13 +139,11 @@ SET @@session.tmp_table_size = "Test";
SET @@session.tmp_table_size = 12345678901; SET @@session.tmp_table_size = 12345678901;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size;
--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';
@ -176,9 +157,6 @@ 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,7 +194,6 @@ 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 #
#################################### ####################################
@ -226,7 +203,6 @@ 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; SELECT @@session.tmp_table_size;
################################################### ###################################################
# END OF tmp_table_size TESTS # # END OF tmp_table_size TESTS #
################################################### ###################################################

View File

@ -6,7 +6,6 @@ SET @start_session_value = @@session.tmp_table_size;
SELECT @start_session_value; SELECT @start_session_value;
@start_session_value @start_session_value
16777216 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:
@ -15,7 +14,6 @@ SET @@global.tmp_table_size = DEFAULT;
SELECT @@global.tmp_table_size; SELECT @@global.tmp_table_size;
@@global.tmp_table_size @@global.tmp_table_size
16777216 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'
@ -23,7 +21,6 @@ SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size;
@@session.tmp_table_size @@session.tmp_table_size
16777216 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; SET @@global.tmp_table_size = DEFAULT;
SELECT @@global.tmp_table_size = 33554432; SELECT @@global.tmp_table_size = 33554432;
@ -33,7 +30,6 @@ SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size = 33554432; SELECT @@session.tmp_table_size = 33554432;
@@session.tmp_table_size = 33554432 @@session.tmp_table_size = 33554432
0 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;
@ -79,7 +75,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 +91,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";

View File

@ -6,7 +6,6 @@ SET @start_session_value = @@session.tmp_table_size;
SELECT @start_session_value; SELECT @start_session_value;
@start_session_value @start_session_value
16777216 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:
@ -15,7 +14,6 @@ SET @@global.tmp_table_size = DEFAULT;
SELECT @@global.tmp_table_size; SELECT @@global.tmp_table_size;
@@global.tmp_table_size @@global.tmp_table_size
16777216 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'
@ -23,7 +21,6 @@ SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size; SELECT @@session.tmp_table_size;
@@session.tmp_table_size @@session.tmp_table_size
16777216 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; SET @@global.tmp_table_size = DEFAULT;
SELECT @@global.tmp_table_size = 33554432; SELECT @@global.tmp_table_size = 33554432;
@ -33,7 +30,6 @@ SET @@session.tmp_table_size = DEFAULT;
SELECT @@session.tmp_table_size = 33554432; SELECT @@session.tmp_table_size = 33554432;
@@session.tmp_table_size = 33554432 @@session.tmp_table_size = 33554432
0 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;
@ -79,7 +75,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 +91,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";