Commit bf10c4a5 authored by Horst.Hunger's avatar Horst.Hunger

Fix for bug#52501 consisting of changes of some sys_vars tests including review results.

parent cfcc7e26
Some of these tests allocate more than 4GB RAM.
So, assure that the machine on which the suite will be executed has more than 4GB RAM.
......@@ -66,10 +66,6 @@ SET @@timestamp = 0;
--echo 'Setting 0 resets timestamp to session default timestamp'
SET @@timestamp = 123456789123456;
SELECT @@timestamp;
SET @@timestamp = 60*60*60*60*365;
SELECT @@timestamp;
SET @@timestamp = -1000000000;
SELECT @@timestamp;
......
SET @start_value = @@global.general_log_file;
SELECT @start_value;
@start_value
test.log
NULL
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.general_log_file = DEFAULT;
SELECT RIGHT(@@global.general_log_file,10) AS log_file;
......@@ -17,4 +16,4 @@ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='general_log_file';
@@global.general_log_file = VARIABLE_VALUE
1
SET @@global.general_log_file= @start_value;
SET @@global.general_log_file= 'test.log';
......@@ -26,6 +26,7 @@ SELECT @@general_log;
INSERT into t1(name) values('Record_3');
INSERT into t1(name) values('Record_4');
## There should be a difference ##
SET @start_value= @@global.max_allowed_packet;
SET @@global.max_allowed_packet= 1024*1024*1024;
SET @orig_file= load_file('MYSQLD_LOGFILE.orig');
SET @copy_file= load_file('MYSQLD_LOGFILE.copy');
......@@ -34,3 +35,4 @@ STRCMP(@orig_file, @copy_file)
1
## Dropping tables ##
DROP TABLE t1;
SET @@global.max_allowed_packet= @start_value;
SET @global_start_value = @@global.innodb_commit_concurrency;
SELECT @global_start_value;
@global_start_value
0
10
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_commit_concurrency = 0;
SET @@global.innodb_commit_concurrency = DEFAULT;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
10
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_commit_concurrency = 1;
ERROR HY000: Variable 'innodb_commit_concurrency' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
10
SELECT local.innodb_commit_concurrency;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_commit_concurrency = 0;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
ERROR HY000: Incorrect arguments to SET
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_commit_concurrency = 0;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
SET @@global.innodb_commit_concurrency = 1;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
......@@ -35,27 +28,17 @@ SELECT @@global.innodb_commit_concurrency;
1000
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_commit_concurrency = -1;
Warnings:
Warning 1292 Truncated incorrect commit_concurrency value: '18446744073709551615'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
SELECT @@global.innodb_commit_concurrency IN (4294967295,18446744073709551615);
@@global.innodb_commit_concurrency IN (4294967295,18446744073709551615)
1
SET @@global.innodb_commit_concurrency = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
SET @@global.innodb_commit_concurrency = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
SET @@global.innodb_commit_concurrency = 1001;
Warnings:
Warning 1292 Truncated incorrect commit_concurrency value: '1001'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
1001
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_commit_concurrency =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
......@@ -65,32 +48,33 @@ VARIABLE_VALUE
1
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
1001
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_commit_concurrency';
VARIABLE_VALUE
1000
1001
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_commit_concurrency = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
1001
SET @@global.innodb_commit_concurrency = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
1001
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_commit_concurrency = TRUE;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1
SET @@global.innodb_commit_concurrency = FALSE;
ERROR HY000: Incorrect arguments to SET
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
1
SET @@global.innodb_commit_concurrency = @global_start_value;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
10
SET @start_value = @@global.log_output;
SELECT @start_value;
@start_value
FILE,TABLE
FILE
'#--------------------FN_DYNVARS_065_01------------------------#'
SET @@global.log_output = FILE;
SET @@global.log_output = DEFAULT;
......@@ -172,4 +172,4 @@ TABLE
SET @@global.log_output = @start_value;
SELECT @@global.log_output;
@@global.log_output
FILE,TABLE
FILE
SET @start_value= @@global.log_output;
SET @start_general_log= @@global.general_log;
SET @start_general_log_file= @@global.general_log_file;
'#--------------------FN_DYNVARS_065_01-------------------------#'
SET @@global.log_output = 'NONE';
'connect (con1,localhost,root,,,,)'
......@@ -53,7 +52,7 @@ count(*)
DROP TABLE t1;
connection default;
SET @@global.general_log= 'OFF';
SET @@global.general_log_file= @start_general_log_file;
SET @@global.general_log_file= '/home/horst/bzr/5.1-52501/mysql-test/var/mysqld.1/mysqld.log';
SET @@global.log_output= @start_value;
SET @@global.general_log= @start_general_log;
SET @@global.general_log= 'ON';
SET @start_value = @@global.slow_query_log_file;
slowtest.log
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.slow_query_log_file = DEFAULT;
SELECT RIGHT(@@global.slow_query_log_file,15);
......@@ -14,4 +14,4 @@ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='slow_query_log_file';
@@global.slow_query_log_file = VARIABLE_VALUE
1
SET @@global.slow_query_log_file= @start_value;
SET @@global.slow_query_log_file= 'slowtest.log';
......@@ -8,14 +8,6 @@ ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with S
'#--------------------FN_DYNVARS_001_03------------------------#'
SET @@timestamp = 0;
'Setting 0 resets timestamp to session default timestamp'
SET @@timestamp = 123456789123456;
SELECT @@timestamp;
@@timestamp
2249167232
SET @@timestamp = 60*60*60*60*365;
SELECT @@timestamp;
@@timestamp
435432704
SET @@timestamp = -1000000000;
SELECT @@timestamp;
@@timestamp
......@@ -66,3 +58,7 @@ ERROR 42S02: Unknown table 'session' in field list
SELECT timestamp = @@session.timestamp;
ERROR 42S22: Unknown column 'timestamp' in 'field list'
SET @@timestamp = @session_start_value;
SET @@timestamp = 123456789123456;
ERROR HY000: This version of MySQL doesn't support dates later than 2038
SET @@timestamp = 60*60*60*60*365;
ERROR HY000: This version of MySQL doesn't support dates later than 2038
......@@ -8,14 +8,6 @@ ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with S
'#--------------------FN_DYNVARS_001_03------------------------#'
SET @@timestamp = 0;
'Setting 0 resets timestamp to session default timestamp'
SET @@timestamp = 123456789123456;
SELECT @@timestamp;
@@timestamp
123456789123456
SET @@timestamp = 60*60*60*60*365;
SELECT @@timestamp;
@@timestamp
4730400000
SET @@timestamp = -1000000000;
SELECT @@timestamp;
@@timestamp
......@@ -66,3 +58,11 @@ ERROR 42S02: Unknown table 'session' in field list
SELECT timestamp = @@session.timestamp;
ERROR 42S22: Unknown column 'timestamp' in 'field list'
SET @@timestamp = @session_start_value;
SET @@timestamp = 123456789123456;
SELECT @@timestamp;
@@timestamp
123456789123456
SET @@timestamp = 60*60*60*60*365;
SELECT @@timestamp;
@@timestamp
4730400000
......@@ -100,8 +100,6 @@ SELECT @@session.tmp_table_size;
SET @@session.tmp_table_size = "Test";
ERROR 42000: Incorrect argument type to variable 'tmp_table_size'
SET @@session.tmp_table_size = 12345678901;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '12345678901'
SELECT @@session.tmp_table_size IN (12345678901,4294967295);
@@session.tmp_table_size IN (12345678901,4294967295)
1
......
......@@ -18,7 +18,7 @@
# server-system-variables.html#option_mysqld_completion_type #
# #
################################################################################
--source include/not_embedded.inc
--source include/have_innodb.inc
--disable_warnings
......
##############################################################################
#
# List the test cases that are to be disabled temporarily.
#
# Separate the test case name and the comment with ':'.
#
# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
#
# Do not use any TAB characters for whitespace.
#
##############################################################################
sys_vars.max_binlog_cache_size_basic_64 : bug#56408 2010-08-31 Horst
sys_vars.max_binlog_cache_size_basic_32 : bug#56408 2010-08-31 Horst
......@@ -35,7 +35,8 @@
# Saving initial value of general_log_file in a temporary variable #
########################################################################
SET @start_value = @@global.general_log_file;
#SET @start_value = @@global.general_log_file;
LET $start_value = `SELECT @@global.general_log_file`;
SELECT @start_value;
......@@ -68,7 +69,8 @@ SELECT @@global.general_log_file = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='general_log_file';
SET @@global.general_log_file= @start_value;
#SET @@global.general_log_file= @start_value;
eval SET @@global.general_log_file= '$start_value';
#####################################################
# END OF general_log_file TESTS #
......
......@@ -79,6 +79,7 @@ INSERT into t1(name) values('Record_4');
--chmod 0777 $MYSQLD_LOGFILE.orig
--echo ## There should be a difference ##
SET @start_value= @@global.max_allowed_packet;
SET @@global.max_allowed_packet= 1024*1024*1024;
--replace_result $MYSQLD_LOGFILE MYSQLD_LOGFILE
eval SET @orig_file= load_file('$MYSQLD_LOGFILE.orig');
......@@ -91,3 +92,4 @@ eval SELECT STRCMP(@orig_file, @copy_file);
--echo ## Dropping tables ##
DROP TABLE t1;
SET @@global.max_allowed_packet= @start_value;
......@@ -11,6 +11,10 @@
# Creation Date: 2008-02-07 #
# Author: Rizwan #
# #
# Modified 2010-09-01 Horst #
# Added amaster.opt with innodb-commit-concurrency > 0 to be able to assign #
# different values <> 0 #
# #
#Description:Test Cases of Dynamic System Variable innodb_commit_concurrency #
# that checks the behavior of this variable in the following ways #
# * Default Value #
......@@ -43,7 +47,6 @@ SELECT @global_start_value;
# Display the DEFAULT value of innodb_commit_concurrency #
########################################################################
SET @@global.innodb_commit_concurrency = 0;
SET @@global.innodb_commit_concurrency = DEFAULT;
SELECT @@global.innodb_commit_concurrency;
......@@ -60,20 +63,14 @@ SELECT @@innodb_commit_concurrency;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_commit_concurrency;
--error ER_WRONG_ARGUMENTS
SET global innodb_commit_concurrency = 0;
SELECT @@global.innodb_commit_concurrency;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
##########################################################################
# change the value of innodb_commit_concurrency to a valid value #
##########################################################################
SET @@global.innodb_commit_concurrency = 0;
SELECT @@global.innodb_commit_concurrency;
SET @@global.innodb_commit_concurrency = 1;
SELECT @@global.innodb_commit_concurrency;
SET @@global.innodb_commit_concurrency = 1000;
......@@ -85,15 +82,13 @@ SELECT @@global.innodb_commit_concurrency;
###########################################################################
SET @@global.innodb_commit_concurrency = -1;
SELECT @@global.innodb_commit_concurrency;
SELECT @@global.innodb_commit_concurrency IN (4294967295,18446744073709551615);
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_commit_concurrency = "T";
SELECT @@global.innodb_commit_concurrency;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_commit_concurrency = "Y";
SELECT @@global.innodb_commit_concurrency;
SET @@global.innodb_commit_concurrency = 1001;
SELECT @@global.innodb_commit_concurrency;
......@@ -131,6 +126,7 @@ SELECT @@global.innodb_commit_concurrency;
SET @@global.innodb_commit_concurrency = TRUE;
SELECT @@global.innodb_commit_concurrency;
--error ER_WRONG_ARGUMENTS
SET @@global.innodb_commit_concurrency = FALSE;
SELECT @@global.innodb_commit_concurrency;
......
......@@ -26,7 +26,8 @@
SET @start_value= @@global.log_output;
SET @start_general_log= @@global.general_log;
SET @start_general_log_file= @@global.general_log_file;
#SET @start_general_log_file= @@global.general_log_file;
LET $start_general_log_file= `SELECT @@global.general_log_file`;
--echo '#--------------------FN_DYNVARS_065_01-------------------------#'
##################################################################
......@@ -113,7 +114,8 @@ file_exists $MYSQLTEST_VARDIR/run/mytest.log ;
--echo connection default;
connection default;
SET @@global.general_log= 'OFF';
SET @@global.general_log_file= @start_general_log_file;
#SET @@global.general_log_file= @start_general_log_file;
eval SET @@global.general_log_file= '$start_general_log_file';
SET @@global.log_output= @start_value;
SET @@global.general_log= @start_general_log;
SET @@global.general_log= 'ON';
......
......@@ -19,6 +19,9 @@
# #
################################################################################
# due to bug#56486
--source include/not_windows.inc
--echo '#--------------------FN_DYNVARS_093_01-------------------------#'
###############################################################################
# Check if setting myisam_data_pointer_size is changed in every new connection#
......
......@@ -55,7 +55,7 @@ DROP TABLE t1;
eval SELECT @@global.init_slave = $my_init_slave;
--echo Expect 1
# wait for the slave threads have set the global variable.
let $wait_timeout= 90;
let $wait_timeout= 240;
let $wait_condition= SELECT @@global.max_connections = @start_max_connections;
--source include/wait_condition_sp.inc
# check that the action in init_slave does not happen immediately
......
......@@ -35,7 +35,9 @@
# Saving initial value of slow_query_log_file in a temporary variable #
###########################################################################
SET @start_value = @@global.slow_query_log_file;
#SET @start_value = @@global.slow_query_log_file;
LET $start_value = `SELECT @@global.slow_query_log_file`;
--echo $start_value
--echo '#---------------------FN_DYNVARS_004_01-------------------------#'
###############################################
......@@ -65,7 +67,9 @@ SELECT @@global.slow_query_log_file = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='slow_query_log_file';
SET @@global.slow_query_log_file= @start_value;
#SET @@global.slow_query_log_file= @start_value;
eval SET @@global.slow_query_log_file= '$start_value';
#SELECT @start_value;
#####################################################
# END OF slow_query_log_file TESTS #
#####################################################
......
......@@ -7,3 +7,7 @@
--source include/have_32bit.inc
--source suite/sys_vars/inc/timestamp_basic.inc
--error ER_UNKNOWN_ERROR
SET @@timestamp = 123456789123456;
--error ER_UNKNOWN_ERROR
SET @@timestamp = 60*60*60*60*365;
......@@ -7,3 +7,8 @@
--source include/have_64bit.inc
--source suite/sys_vars/inc/timestamp_basic.inc
SET @@timestamp = 123456789123456;
SELECT @@timestamp;
SET @@timestamp = 60*60*60*60*365;
SELECT @@timestamp;
......@@ -133,8 +133,9 @@ SELECT @@session.tmp_table_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.tmp_table_size = "Test";
--disable_warnings
SET @@session.tmp_table_size = 12345678901;
--enable_warnings
# With a 64 bit mysqld:12345678901,with a 32 bit mysqld: 4294967295
SELECT @@session.tmp_table_size IN (12345678901,4294967295);
......
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