summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/inc
diff options
context:
space:
mode:
authorHorst Hunger <horst@mysql.com>2009-01-22 11:14:16 +0100
committerHorst Hunger <horst@mysql.com>2009-01-22 11:14:16 +0100
commit88a36a21574a5fd5d4a13f0fb2bfb1fd10abebb5 (patch)
treed75aceb623403e55a66e359313eda2eb4ee52c49 /mysql-test/suite/sys_vars/inc
parent028b0a52c3c5cae6d5024e5a45b13be856f2047c (diff)
parentaec81abb3b127e9a6c68bfe9562fd3d7cd385e0b (diff)
downloadmariadb-git-88a36a21574a5fd5d4a13f0fb2bfb1fd10abebb5.tar.gz
Changes to WL#4681 to merge to 5.1-main tree.
Diffstat (limited to 'mysql-test/suite/sys_vars/inc')
-rw-r--r--mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc54
-rw-r--r--mysql-test/suite/sys_vars/inc/query_prealloc_size_basic.inc20
-rw-r--r--mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc104
-rw-r--r--mysql-test/suite/sys_vars/inc/tmp_table_size_basic.inc233
4 files changed, 91 insertions, 320 deletions
diff --git a/mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc b/mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc
index 996a9e712f9..a8fa50a6a23 100644
--- a/mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc
@@ -17,14 +17,14 @@
# * Valid & Invalid values #
# * Scope & Access method #
# * 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/ #
-# server-system-variables.html #
+# 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
@@ -38,8 +38,6 @@
########################################################################
SET @start_value = @@global.key_buffer_size;
-SELECT @start_value;
-
--echo '#--------------------FN_DYNVARS_055_01------------------------#'
########################################################################
@@ -49,9 +47,7 @@ SELECT @start_value;
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;
-
+SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--echo '#---------------------FN_DYNVARS_055_02-------------------------#'
###############################################
@@ -66,26 +62,25 @@ SELECT @@global.key_buffer_size = @start_value;
# 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;
+SET @@global.key_buffer_size = 8 ;
+SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--disable_warnings
-#Due to "lost connection"
+#Due to increasing the runtime significantly and allocating the buffer instantly.
#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;
+SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
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"
+# 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;
#SELECT @@global.key_buffer_size;
#SET @@global.key_buffer_size = 100000000000;
@@ -96,16 +91,14 @@ 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';
+SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--Error ER_WRONG_TYPE_FOR_VAR
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
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----------------------------#'
###########################################################################
@@ -114,8 +107,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size;
--Error ER_GLOBAL_VARIABLE
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------------------------#'
##############################################################################
@@ -130,17 +122,15 @@ 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;
+SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
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----------------------#'
#####################################################################
@@ -150,7 +140,7 @@ SELECT @@global.key_buffer_size = @min_key_buffer_size;
# due to differences in contents of the 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;
--enable_warnings
@@ -160,8 +150,8 @@ SELECT @@key_buffer_size = @@global.key_buffer_size;
##########################################################################
--Error ER_GLOBAL_VARIABLE
-SET key_buffer_size = @min_key_buffer_size;
-SELECT @@key_buffer_size = @min_key_buffer_size;
+SET key_buffer_size = 8 ;
+SELECT @@global.key_buffer_size >= 8 AND @@global.key_buffer_size <= 36;
--Error ER_PARSE_ERROR
SET local.key_buffer_size = 10;
--Error ER_UNKNOWN_TABLE
@@ -179,9 +169,9 @@ SELECT key_buffer_size = @@session.key_buffer_size;
##############################
SET @@global.key_buffer_size = @start_value;
-SELECT @@global.key_buffer_size;
--enable_warnings
#######################################################################
# END OF key_buffer_size TESTS #
#######################################################################
+
diff --git a/mysql-test/suite/sys_vars/inc/query_prealloc_size_basic.inc b/mysql-test/suite/sys_vars/inc/query_prealloc_size_basic.inc
index 3a8608736c5..64eb3c4b329 100644
--- a/mysql-test/suite/sys_vars/inc/query_prealloc_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/query_prealloc_size_basic.inc
@@ -74,8 +74,8 @@ SELECT @@session.query_prealloc_size = 8192;
SET @@global.query_prealloc_size = 8192;
SELECT @@global.query_prealloc_size ;
-SET @@global.query_prealloc_size = 4294967295;
-SELECT @@global.query_prealloc_size ;
+#SET @@global.query_prealloc_size = 4294967295;
+#SELECT @@global.query_prealloc_size ;
SET @@global.query_prealloc_size = 655354;
SELECT @@global.query_prealloc_size ;
@@ -89,8 +89,8 @@ SELECT @@global.query_prealloc_size ;
SET @@session.query_prealloc_size = 8192;
SELECT @@session.query_prealloc_size ;
-SET @@session.query_prealloc_size = 4294967295;
-SELECT @@session.query_prealloc_size ;
+#SET @@session.query_prealloc_size = 4294967295;
+#SELECT @@session.query_prealloc_size ;
SET @@session.query_prealloc_size = 655345;
SELECT @@session.query_prealloc_size ;
@@ -106,11 +106,11 @@ SELECT @@session.query_prealloc_size ;
SET @@global.query_prealloc_size = 0;
SELECT @@global.query_prealloc_size ;
-SET @@global.query_prealloc_size = -1024;
-SELECT @@global.query_prealloc_size ;
+#SET @@global.query_prealloc_size = -1024;
+#SELECT @@global.query_prealloc_size ;
-SET @@global.query_prealloc_size = 429496729533;
-SELECT @@global.query_prealloc_size ;
+#SET @@global.query_prealloc_size = 429496729533;
+#SELECT @@global.query_prealloc_size ;
--Error ER_PARSE_ERROR
@@ -137,8 +137,8 @@ SELECT @@global.query_prealloc_size ;
SET @@session.query_prealloc_size = 0;
SELECT @@session.query_prealloc_size ;
-SET @@session.query_prealloc_size = -2;
-SELECT @@session.query_prealloc_size ;
+#SET @@session.query_prealloc_size = -2;
+#SELECT @@session.query_prealloc_size ;
--Error ER_PARSE_ERROR
diff --git a/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc b/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc
index 4dbae7c8847..19d8b442c2c 100644
--- a/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc
+++ b/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc
@@ -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 #
# #
###############################################################################
@@ -29,7 +32,7 @@
######################################################################
-# START OF sort_buffer_size TESTS #
+# START OF sort_buffer_size TESTS #
######################################################################
@@ -37,65 +40,74 @@
# Save initial value #
#############################################################
-# due to difference when running on Windows (bug filed)
+# due to differences when running on Windows (Bug#36695)
--source include/not_windows.inc
+let $kbrange32 = BETWEEN 32776 AND 32999;
+let $mbrange2 = BETWEEN 2097116 AND 2100000;
+
+--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-------------------------#'
######################################################################
-# Display the DEFAULT value of sort_buffer_size #
+# Display the DEFAULT value of sort_buffer_size #
######################################################################
SET @@global.sort_buffer_size = 1000;
SET @@global.sort_buffer_size = DEFAULT;
-SELECT @@global.sort_buffer_size= 2097144 OR @@global.sort_buffer_size= 2097116;
+eval
+SELECT @@global.sort_buffer_size $mbrange2;
SET @@session.sort_buffer_size = 2000;
SET @@session.sort_buffer_size = DEFAULT;
-SELECT @@session.sort_buffer_size= 2097144 OR @@session.sort_buffer_size= 2097116;
+eval
+SELECT @@session.sort_buffer_size $mbrange2;
--echo '#--------------------FN_DYNVARS_151_02-------------------------#'
######################################################################
-# Check the DEFAULT value of sort_buffer_size #
+# Check the DEFAULT value of sort_buffer_size #
######################################################################
SET @@global.sort_buffer_size = DEFAULT;
-SELECT @@global.sort_buffer_size = 2097144 OR @@global.sort_buffer_size= 2097116;
+eval
+SELECT @@global.sort_buffer_size $mbrange2;
SET @@session.sort_buffer_size = DEFAULT;
-SELECT @@session.sort_buffer_size = 2097144 OR @@session.sort_buffer_size= 2097116;
+eval
+SELECT @@session.sort_buffer_size $mbrange2;
--echo '#--------------------FN_DYNVARS_151_03-------------------------#'
################################################################################
-# Change the value of sort_buffer_size to a valid value for GLOBAL Scope #
+# Change the value of sort_buffer_size to a valid value for GLOBAL Scope #
################################################################################
SET @@global.sort_buffer_size = 32776;
-SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
+eval
+SELECT @@global.sort_buffer_size $kbrange32;
SET @@global.sort_buffer_size = 32777;
-SELECT @@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804;
+eval
+SELECT @@global.sort_buffer_size $kbrange32;
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-------------------------#'
###################################################################################
-# Change the value of sort_buffer_size to a valid value for SESSION Scope #
+# Change the value of sort_buffer_size to a valid value for SESSION Scope #
###################################################################################
SET @@session.sort_buffer_size = 32776;
-SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
+eval
+SELECT @@session.sort_buffer_size $kbrange32;
SET @@session.sort_buffer_size = 32777;
-SELECT @@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804;
+eval
+SELECT @@session.sort_buffer_size $kbrange32;
SET @@session.sort_buffer_size = 4294967295;
SELECT @@session.sort_buffer_size;
SET @@session.sort_buffer_size = 4294967294;
@@ -104,13 +116,15 @@ SELECT @@session.sort_buffer_size;
--echo '#------------------FN_DYNVARS_151_05-----------------------#'
##################################################################
-# Change the value of sort_buffer_size to an invalid value #
+# Change the value of sort_buffer_size to an invalid value #
##################################################################
SET @@global.sort_buffer_size = 32775;
-SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
+eval
+SELECT @@global.sort_buffer_size $kbrange32;
SET @@global.sort_buffer_size = -1024;
-SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
+eval
+SELECT @@global.sort_buffer_size $kbrange32;
SET @@global.sort_buffer_size = 4294967296;
SELECT @@global.sort_buffer_size;
--Error ER_PARSE_ERROR
@@ -121,19 +135,18 @@ 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;
+eval
+SELECT @@session.sort_buffer_size $kbrange32;
SET @@session.sort_buffer_size = -2;
-SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
+eval
+SELECT @@session.sort_buffer_size $kbrange32;
--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 +154,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,25 +172,24 @@ 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;
+eval
+SELECT @@global.sort_buffer_size $kbrange32;
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';
-
+eval
+SELECT @@global.sort_buffer_size $kbrange32;
--echo '#---------------------FN_DYNVARS_151_09----------------------#'
####################################################################################
-# Check if accessing variable with and without GLOBAL point to same variable #
+# Check if accessing variable with and without GLOBAL point to same 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;
@@ -184,12 +198,12 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size;
--echo '#---------------------FN_DYNVARS_151_11----------------------#'
###################################################################################
-# Check if sort_buffer_size can be accessed with and without @@ sign #
+# Check if sort_buffer_size can be accessed with and without @@ sign #
###################################################################################
SET sort_buffer_size = 9100;
-SELECT @sort_buffer_size= 32776 OR @@sort_buffer_size= 32804;
-SELECT @@sort_buffer_size;
+eval
+SELECT @@sort_buffer_size $kbrange32;
--Error ER_UNKNOWN_TABLE
SELECT local.sort_buffer_size;
--Error ER_UNKNOWN_TABLE
@@ -203,11 +217,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 #
+# END OF sort_buffer_size TESTS #
#############################################################
+
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
deleted file mode 100644
index 7f69bcd1f8c..00000000000
--- a/mysql-test/suite/sys_vars/inc/tmp_table_size_basic.inc
+++ /dev/null
@@ -1,233 +0,0 @@
-############## mysql-test\t\tmp_table_size_basic.test #########################
-# #
-# Variable Name: tmp_table_size #
-# Scope: GLOBAL | SESSION #
-# Access Type: Dynamic #
-# Data Type: numeric #
-# Default Value: 33554432 #
-# Range: 1024-4294967295 #
-# #
-# #
-# Creation Date: 2008-02-13 #
-# Author: Salman #
-# #
-# Description: Test Cases of Dynamic System Variable tmp_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#option_mysqld_tmp_table_size #
-# #
-###############################################################################
-
---source include/load_sysvars.inc
-
-##############################################################
-# START OF tmp_table_size TESTS #
-##############################################################
-
-
-#############################################################
-# Save initial value #
-#############################################################
-
-SET @start_global_value = @@global.tmp_table_size;
-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 #
-##############################################################
-
-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 #
-########################################################################
-
-SET @@global.tmp_table_size = DEFAULT;
-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 #
-########################################################################
-
-SET @@global.tmp_table_size = 1024;
-SELECT @@global.tmp_table_size;
-SET @@global.tmp_table_size = 60020;
-SELECT @@global.tmp_table_size;
-SET @@global.tmp_table_size = 4294967295;
-SELECT @@global.tmp_table_size;
-
-
---echo '#--------------------FN_DYNVARS_005_04-------------------------#'
-#########################################################################
-# Change the value of tmp_table_size to a valid value for SESSION Scope #
-#########################################################################
-
-SET @@session.tmp_table_size = 1024;
-SELECT @@session.tmp_table_size;
-
-SET @@session.tmp_table_size =4294967295;
-SELECT @@session.tmp_table_size;
-SET @@session.tmp_table_size = 65535;
-SELECT @@session.tmp_table_size;
-
-
---echo '#------------------FN_DYNVARS_005_05-----------------------#'
-##########################################################
-# Change the value of tmp_table_size to an invalid value #
-##########################################################
-
-SET @@global.tmp_table_size = 0;
-SELECT @@global.tmp_table_size;
-
-SET @@global.tmp_table_size = -1024;
-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;
-
--- 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;
-
-SET @@session.tmp_table_size = True;
-SELECT @@session.tmp_table_size;
-
-SET @@session.tmp_table_size = False;
-SELECT @@session.tmp_table_size;
-
--- Error ER_WRONG_TYPE_FOR_VAR
-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';
-
---echo '#------------------FN_DYNVARS_005_07-----------------------#'
-####################################################################
-# Check if the value in SESSION Table matches value in variable #
-####################################################################
-
-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 #
-########################################################################
-
-SET @@global.tmp_table_size = 1024;
-SET @@tmp_table_size = 4294967295;
-SELECT @@tmp_table_size = @@global.tmp_table_size;
-
---echo '#---------------------FN_DYNVARS_001_10----------------------#'
-##################################################################
-# Check if accessing variable with SESSION,LOCAL and without #
-# SCOPE points to same session variable #
-##################################################################
-
-SET @@tmp_table_size = 100;
-SELECT @@tmp_table_size = @@local.tmp_table_size;
-SELECT @@local.tmp_table_size = @@session.tmp_table_size;
-
-
---echo '#---------------------FN_DYNVARS_001_11----------------------#'
-#########################################################################
-# Check if tmp_table_size can be accessed with and without @@ sign #
-#########################################################################
-
-SET tmp_table_size = 1027;
-SELECT @@tmp_table_size;
-
---Error ER_UNKNOWN_TABLE
-SELECT local.tmp_table_size;
-
---Error ER_UNKNOWN_TABLE
-SELECT global.tmp_table_size;
-
---Error ER_BAD_FIELD_ERROR
-SELECT tmp_table_size = @@session.tmp_table_size;
-
-
-####################################
-# Restore initial value #
-####################################
-
-SET @@global.tmp_table_size = @start_global_value;
-SELECT @@global.tmp_table_size;
-SET @@session.tmp_table_size = @start_session_value;
-SELECT @@session.tmp_table_size;
-
-
-###################################################
-# END OF tmp_table_size TESTS #
-###################################################
-