mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Manual merge of WL#4738 from mysql-next-mr:
- backported code that handles %f/%g arguments in my_vsnprintf.c from 6.0 - backported %f/%g tests in unittest/mysys/my_vsnprintf-t.c from 6.0 - replaced snprintf("%g") in sql/set_var.cc with my_gcvt() - removed unnecessary "--replace-result"s for Windows in mysql-test/suite/sys_vars/t/long_query_time_basic.test - some test results adjustments
This commit is contained in:
35
mysql-test/suite/sys_vars/t/all_vars.test
Normal file
35
mysql-test/suite/sys_vars/t/all_vars.test
Normal file
@@ -0,0 +1,35 @@
|
||||
--source include/not_embedded.inc
|
||||
|
||||
#
|
||||
# This test verifies that *all* system variables are tested
|
||||
# by the sys_vars suite. For every system variable
|
||||
# there must be a <variable_name>_basic.test file.
|
||||
#
|
||||
|
||||
#
|
||||
# we can diff in perl or in sql, as it's my_SQL_test suite, do it in sql
|
||||
#
|
||||
|
||||
perl;
|
||||
use File::Basename;
|
||||
my $dirname=dirname($ENV{MYSQLTEST_FILE});
|
||||
my @all_tests=<$dirname/*_basic{,_32,_64}.test>;
|
||||
open(F, '>', "$ENV{MYSQLTEST_VARDIR}/tmp/sys_vars.all_vars.txt") or die;
|
||||
binmode F;
|
||||
print F join "\n", sort map { s/_basic(_32|_64)?\.test$//; basename $_ } @all_tests;
|
||||
EOF
|
||||
|
||||
create table t1 (test_name text);
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval load data infile "$MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t1;
|
||||
|
||||
select variable_name as `There should be *no* variables listed below:`
|
||||
from information_schema.global_variables
|
||||
left join t1 on variable_name=test_name where
|
||||
test_name is null
|
||||
union
|
||||
select variable_name from information_schema.session_variables
|
||||
left join t1 on variable_name=test_name where
|
||||
test_name is null;
|
||||
|
||||
drop table t1;
|
@@ -103,8 +103,8 @@ SET @@global.auto_increment_increment = -1024;
|
||||
SELECT @@global.auto_increment_increment;
|
||||
SET @@global.auto_increment_increment = 65536;
|
||||
SELECT @@global.auto_increment_increment;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET @@global.auto_increment_increment = 65530.34.;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.auto_increment_increment = 65530.34;
|
||||
SELECT @@global.auto_increment_increment;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.auto_increment_increment = test;
|
||||
@@ -114,11 +114,10 @@ SET @@session.auto_increment_increment = 0;
|
||||
SELECT @@session.auto_increment_increment;
|
||||
SET @@session.auto_increment_increment = -2;
|
||||
SELECT @@session.auto_increment_increment;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET @@session.auto_increment_increment = 65530.34.;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.auto_increment_increment = 65530.34;
|
||||
SET @@session.auto_increment_increment = 65550;
|
||||
SELECT @@session.auto_increment_increment;
|
||||
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.auto_increment_increment = test;
|
||||
|
@@ -119,8 +119,6 @@ SELECT @@session.auto_increment_increment = 20;
|
||||
SET @@session.auto_increment_increment = 5;
|
||||
INSERT into t1(name) values('Record_10');
|
||||
SELECT * from t1;
|
||||
--echo 'Bug#35362: Here Record_10 id should be 120 instead of 115 because we'
|
||||
--echo 'have set the value of variable to 5'
|
||||
|
||||
SET @@session.auto_increment_increment = 1;
|
||||
SELECT @@auto_increment_increment;
|
||||
@@ -176,9 +174,6 @@ INSERT into t1(name) values('Record_17');
|
||||
INSERT into t1(name) values('Record_18');
|
||||
SELECT * from t1;
|
||||
|
||||
--echo 'Bug#35364: Variable is incrementing some random values on assigning -ve value'
|
||||
|
||||
|
||||
############################################################
|
||||
# Disconnecting all connection & dropping table #
|
||||
############################################################
|
||||
|
@@ -117,7 +117,6 @@ SET @@session.auto_increment_offset = -2;
|
||||
SELECT @@session.auto_increment_offset;
|
||||
SET @@session.auto_increment_offset = 65550;
|
||||
SELECT @@session.auto_increment_offset;
|
||||
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.auto_increment_offset = ON;
|
||||
|
@@ -111,8 +111,6 @@ SELECT * from t1;
|
||||
--echo ## Setting value of variable less than last insert id ##
|
||||
SET @@session.auto_increment_offset = 5;
|
||||
INSERT into t1(name) values('Record_9');
|
||||
--echo 'Bug#35367: Random value of id is increasing on assigning value to';
|
||||
--echo 'variable that is less than current offset';
|
||||
INSERT into t1(name) values('Record_10');
|
||||
INSERT into t1(name) values('Record_11');
|
||||
INSERT into t1(name) values('Record_12');
|
||||
@@ -133,9 +131,6 @@ SET @@auto_increment_increment = 10;
|
||||
INSERT into t1(name) values('Record_13');
|
||||
INSERT into t1(name) values('Record_14');
|
||||
SELECT * from t1;
|
||||
--echo 'Bug#35369: Some invalid value of id is increasing on assigning value to';
|
||||
--echo 'variable that is greater than auto_increment_increment';
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_002_06-------------------------#'
|
||||
###############################################################################
|
||||
@@ -165,8 +160,6 @@ SELECT @@auto_increment_offset = -10;
|
||||
INSERT into t1(name) values('Record_17');
|
||||
INSERT into t1(name) values('Record_18');
|
||||
SELECT * from t1;
|
||||
--echo 'Bug#35370: Some invalid value of id is increasing on assigning negative';
|
||||
--echo ' value in variable';
|
||||
|
||||
--echo ## Assigning value that is out of range of variable ##
|
||||
SET @@auto_increment_offset = 65536;
|
||||
|
@@ -33,7 +33,7 @@
|
||||
# Saving initial value of autocommit in a temporary variable #
|
||||
########################################################################
|
||||
|
||||
SET @start_value = @@autocommit;
|
||||
SET @start_value = @@global.autocommit;
|
||||
SELECT @start_value;
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ SELECT @start_value;
|
||||
SET @@autocommit = 0;
|
||||
SET @@autocommit = DEFAULT;
|
||||
SELECT @@autocommit;
|
||||
echo 'Bug: variable DEFAULT value not working and is not throwing error';
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_003_02-------------------------#'
|
||||
###############################################
|
||||
@@ -102,10 +101,9 @@ SET @@autocommit = '';
|
||||
# Test if accessing global autocommit gives error #
|
||||
###########################################################################
|
||||
|
||||
--Error ER_LOCAL_VARIABLE
|
||||
SET @@global.autocommit = 0;
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@global.autocommit;
|
||||
SET @@global.autocommit = 1;
|
||||
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_003_06------------------------#'
|
||||
@@ -116,7 +114,6 @@ SELECT @@global.autocommit;
|
||||
SELECT IF(@@session.autocommit, "ON", "OFF") = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='autocommit';
|
||||
--echo Bug # 34839: Values in variable and information_schema do not match for autocommit
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_003_07------------------------#'
|
||||
#########################################################################
|
||||
@@ -182,8 +179,8 @@ SELECT autocommit = @@session.autocommit;
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
SET @@autocommit = @start_value;
|
||||
SELECT @@autocommit;
|
||||
SET @@global.autocommit = @start_value;
|
||||
SELECT @@global.autocommit;
|
||||
|
||||
########################################################################
|
||||
# END OF autocommit TESTS #
|
@@ -1 +0,0 @@
|
||||
--innodb
|
@@ -145,7 +145,6 @@ SELECT * from t1;
|
||||
--echo ## Connecting with connection # 01 and inserting few records ##
|
||||
CONNECTION test_con1;
|
||||
SELECT * from t1;
|
||||
--echo 'Bug#35373: Records donot get committed in transaction on switching connections'
|
||||
INSERT into t1(name) values('Record_6');
|
||||
SELECT * from t1;
|
||||
|
||||
|
@@ -116,7 +116,6 @@ SELECT @@session.automatic_sp_privileges;
|
||||
SELECT IF(@@global.automatic_sp_privileges, "ON", "OFF") = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='automatic_sp_privileges';
|
||||
echo 'Bug# 34839: Values in variable and information_schema donot match';
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_004_07----------------------#'
|
||||
###################################################################
|
||||
|
19
mysql-test/suite/sys_vars/t/back_log_basic.test
Normal file
19
mysql-test/suite/sys_vars/t/back_log_basic.test
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# show the global and session values;
|
||||
#
|
||||
select @@global.back_log;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.back_log;
|
||||
show global variables like 'back_log';
|
||||
show session variables like 'back_log';
|
||||
select * from information_schema.global_variables where variable_name='back_log';
|
||||
select * from information_schema.session_variables where variable_name='back_log';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global back_log=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session back_log=1;
|
||||
|
@@ -45,7 +45,6 @@ SELECT @start_value;
|
||||
SET @@big_tables = 1;
|
||||
SET @@big_tables = DEFAULT;
|
||||
SELECT @@big_tables;
|
||||
--echo 'Bug# 34829: No default value for variable and setting default does not raise error';
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_02------------------------#'
|
||||
@@ -96,11 +95,9 @@ SET @@big_tables = '';
|
||||
# Test if accessing global big_tables gives error #
|
||||
###########################################################################
|
||||
|
||||
--Error ER_LOCAL_VARIABLE
|
||||
SET @@global.big_tables = 0;
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@global.big_tables = 1-@@global.big_tables;
|
||||
SELECT @@global.big_tables;
|
||||
|
||||
SET @@global.big_tables = 1-@@global.big_tables;
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_005_05------------------------#'
|
||||
##############################################################################
|
||||
@@ -110,7 +107,6 @@ SELECT @@global.big_tables;
|
||||
SELECT IF(@@big_tables, "ON", "OFF") = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='big_tables';
|
||||
--echo Bug # 34839: Values in variable and information_schema do not match for autocommit
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_005_06----------------------#'
|
||||
|
@@ -164,14 +164,8 @@ SELECT @@character_set_client;
|
||||
SET @@character_set_client = utf8;
|
||||
SELECT @@character_set_client;
|
||||
|
||||
#SET @@character_set_client = ucs2;
|
||||
#--Error ER_PARSE_ERROR
|
||||
#SELECT @@session.character_set_client;
|
||||
--echo 'Bug: Assignment of ucs2 to session character-set does not raise error';
|
||||
--echo 'but selecting variable after setting it does.';
|
||||
--echo 'Even catching this does not allow any further character-set to be set.';
|
||||
--echo 'Offending querry seems to be:';
|
||||
--echo 'SET @@character_set_client = ucs2;'
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@character_set_client = ucs2;
|
||||
|
||||
SET @@character_set_client = cp866;
|
||||
SELECT @@character_set_client;
|
||||
@@ -256,9 +250,6 @@ SET @@global.character_set_client = 100;
|
||||
|
||||
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
|
||||
SELECT @total_charset;
|
||||
--echo 'Bug # 34843: character sets are mapped in such a way that 100 and following';
|
||||
--echo 'numbers gives error, and before 100 the 36 mapped wraps arround';
|
||||
--echo 'several times.';
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_010_10-------------------------#'
|
||||
###############################################################################
|
||||
|
@@ -38,8 +38,6 @@ SELECT @@global.character_set_client;
|
||||
SELECT @@session.character_set_client;
|
||||
disconnect con1;
|
||||
|
||||
--echo 'Bug# 35372: session character_set_client is not effected by global character_set_client'
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_010_02-------------------------#'
|
||||
#############################################################
|
||||
# Begin the functionality Testing of character_set_client #
|
||||
@@ -62,13 +60,13 @@ CREATE TABLE t1(a CHAR(3) character set utf8);
|
||||
--echo 'For latin1 characterset';
|
||||
SET @@session.character_set_client = latin1;
|
||||
INSERT INTO t1 values('<03>');
|
||||
SELECT a,CHAR_LENGTH(a) FROM t1;
|
||||
SELECT hex(a),CHAR_LENGTH(a) FROM t1;
|
||||
DELETE FROM t1;
|
||||
|
||||
--echo 'For utf8 characterset';
|
||||
SET @@session.character_set_client = utf8;
|
||||
INSERT INTO t1 values('<03>');
|
||||
SELECT a,CHAR_LENGTH(a) FROM t1;
|
||||
SELECT hex(a),CHAR_LENGTH(a) FROM t1;
|
||||
DELETE FROM t1;
|
||||
|
||||
--disable_warnings
|
||||
|
@@ -182,9 +182,6 @@ SET @@global.character_set_connection = 100;
|
||||
|
||||
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
|
||||
SELECT @total_charset;
|
||||
--echo 'Bug # 34843: character sets are mapped in such a way that 100 and following ';
|
||||
--echo 'numbers gives error, and before 100 the 36 mapped wraps arround';
|
||||
--echo 'several times.';
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_011_10-------------------------#'
|
||||
################################################################################
|
||||
|
@@ -182,8 +182,6 @@ SET @@global.character_set_database = 100;
|
||||
|
||||
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
|
||||
SELECT @total_charset;
|
||||
--echo 'Bug # 34843: character sets are mapped in such a way that 100 and following';
|
||||
--echo 'numbers gives error, and before 100 the 36 mapped wraps arround several times.';
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_012_10-------------------------#'
|
||||
##############################################################################
|
||||
|
@@ -38,7 +38,6 @@ connect (con1,localhost,root,,,,);
|
||||
connection con1;
|
||||
SELECT @@global.character_set_database;
|
||||
SELECT @@session.character_set_database;
|
||||
--echo 'Bug#35356: session character_set_database differ from global character_set_database'
|
||||
disconnect con1;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_008_02-------------------------#'
|
||||
@@ -70,8 +69,6 @@ SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
DROP DATABASE db1;
|
||||
|
||||
--echo 'Bug#35357: character_set_database does not effects CREATE DATABASE without characater set'
|
||||
|
||||
#==============================================================================
|
||||
--echo '--ascii character set specified--'
|
||||
#==============================================================================
|
||||
@@ -109,9 +106,6 @@ DROP TABLE IF EXISTS t1;
|
||||
|
||||
|
||||
#==============================================================================
|
||||
--echo 'Bug#27208: If no current database, character_set_database !=character_set_server'
|
||||
#==============================================================================
|
||||
|
||||
SET GLOBAL character_set_server=latin5;
|
||||
|
||||
connect (con2, localhost, root,,);
|
||||
|
@@ -165,8 +165,6 @@ SET @@character_set_filesystem = 100;
|
||||
|
||||
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
|
||||
SELECT @total_charset;
|
||||
echo 'Bug # 34843: character sets are mapped in such a way that 100 and following ';
|
||||
echo 'numbers give error, and before 100 the 36 mapped wraps arround several times.';
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_008_10-------------------------#'
|
||||
################################################################################
|
||||
|
@@ -72,6 +72,9 @@ SET global character_set_server=utf8;
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT global character_set_server;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@character_set_server = null;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_009_02-------------------------#'
|
||||
###############################################################################
|
||||
# Check the DEFAULT value of character_set_server for session and global #
|
||||
@@ -178,12 +181,6 @@ SELECT @@global.character_set_server;
|
||||
--Error ER_UNKNOWN_CHARACTER_SET
|
||||
SET @@global.character_set_server = 100;
|
||||
|
||||
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
|
||||
SELECT @total_charset;
|
||||
--echo 'Bug # 34843: character sets are mapped in such a way that 100 and following ';
|
||||
--echo 'numbers gives error, and before 100 the 36 mapped wraps arround ';
|
||||
--echo 'several times.';
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_009_10-------------------------#'
|
||||
###############################################################################
|
||||
# Change the value of character_set_server to an invalid value for session #
|
||||
|
24
mysql-test/suite/sys_vars/t/character_sets_dir_basic.test
Normal file
24
mysql-test/suite/sys_vars/t/character_sets_dir_basic.test
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# show the global and session values;
|
||||
#
|
||||
--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
|
||||
select @@global.character_sets_dir;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.character_sets_dir;
|
||||
--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
|
||||
show global variables like 'character_sets_dir';
|
||||
--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
|
||||
show session variables like 'character_sets_dir';
|
||||
--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
|
||||
select * from information_schema.global_variables where variable_name='character_sets_dir';
|
||||
--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
|
||||
select * from information_schema.session_variables where variable_name='character_sets_dir';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global character_sets_dir="foo";
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session character_sets_dir="foo";
|
||||
|
@@ -121,7 +121,7 @@ SET @@collation_connection = latin7_general_ci + latin7_general_cs;
|
||||
# Change the value of collation_connection to a valid value for session #
|
||||
###############################################################################
|
||||
|
||||
let collation_variable = @@session.collation_connection;
|
||||
let $collation_variable = @@session.collation_connection;
|
||||
--source suite/sys_vars/inc/collation_basic.inc
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ let collation_variable = @@session.collation_connection;
|
||||
# Change the value of collation_connection to a valid value for global #
|
||||
###############################################################################
|
||||
|
||||
let collation_variable = @@global.collation_connection;
|
||||
let $collation_variable = @@global.collation_connection;
|
||||
--source suite/sys_vars/inc/collation_basic.inc
|
||||
|
||||
|
||||
|
@@ -78,6 +78,7 @@ SELECT global collation_database;
|
||||
##############################################################################
|
||||
SET @@collation_database = latin1_bin;
|
||||
SET @@collation_database = DEFAULT;
|
||||
SELECT DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME=DATABASE();
|
||||
SELECT @@collation_database AS DEFAULT_VALUE;
|
||||
|
||||
SET @@global.collation_database = latin1_bin;
|
||||
@@ -120,7 +121,7 @@ SET @@collation_database = latin7_general_ci + latin7_general_cs;
|
||||
# Change the value of collation_database to a valid value for session #
|
||||
###########################################################################
|
||||
|
||||
let collation_variable = @@session.collation_database;
|
||||
let $collation_variable = @@session.collation_database;
|
||||
--source suite/sys_vars/inc/collation_basic.inc
|
||||
|
||||
|
||||
@@ -129,7 +130,7 @@ let collation_variable = @@session.collation_database;
|
||||
# Change the value of collation_database to a valid value for global #
|
||||
###############################################################################
|
||||
|
||||
let collation_variable = @@global.collation_database;
|
||||
let $collation_variable = @@global.collation_database;
|
||||
--source suite/sys_vars/inc/collation_basic.inc
|
||||
|
||||
|
||||
|
@@ -38,8 +38,6 @@ SELECT @@global.collation_database;
|
||||
SELECT @@session.collation_database;
|
||||
disconnect con1;
|
||||
|
||||
--echo 'Bug#35378: New session collation_database is not change by global collation_database'
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_011_02-------------------------#'
|
||||
#########################################################
|
||||
# Begin the functionality Testing of collation_database #
|
||||
@@ -69,7 +67,6 @@ SET @@session.collation_database = latin2_croatian_ci;
|
||||
CREATE DATABASE db1;
|
||||
USE db1;
|
||||
SHOW CREATE DATABASE db1;
|
||||
--echo 'Bug#35380: collation_database does not effects CREATE DATABASE without characater set'
|
||||
|
||||
CREATE TABLE t1(a CHAR(20));
|
||||
SHOW CREATE TABLE t1;
|
||||
|
@@ -120,7 +120,7 @@ SET @@collation_server = latin7_general_ci + latin7_general_cs;
|
||||
# Change the value of collation_server to a valid value for session #
|
||||
##############################################################################
|
||||
|
||||
let collation_variable = @@session.collation_server;
|
||||
let $collation_variable = @@session.collation_server;
|
||||
--source suite/sys_vars/inc/collation_basic.inc
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ let collation_variable = @@session.collation_server;
|
||||
# Change the value of collation_server to a valid value for global #
|
||||
#############################################################################
|
||||
|
||||
let collation_variable = @@global.collation_server;
|
||||
let $collation_variable = @@global.collation_server;
|
||||
--source suite/sys_vars/inc/collation_basic.inc
|
||||
|
||||
|
||||
|
@@ -53,18 +53,6 @@ SET @@session.completion_type = DEFAULT;
|
||||
SELECT @@session.completion_type;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_017_02-------------------------#'
|
||||
###############################################################
|
||||
# Check the DEFAULT value of completion_type #
|
||||
###############################################################
|
||||
|
||||
SET @@global.completion_type = @start_global_value;
|
||||
SELECT @@global.completion_type = 0;
|
||||
|
||||
SET @@session.completion_type = @start_session_value;
|
||||
SELECT @@session.completion_type = 0;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_017_03-------------------------#'
|
||||
#########################################################################
|
||||
# Change the value of completion_type to a valid value for GLOBAL Scope #
|
||||
@@ -77,6 +65,12 @@ SELECT @@global.completion_type;
|
||||
SET @@global.completion_type = 2;
|
||||
SELECT @@global.completion_type;
|
||||
|
||||
SET @@global.completion_type = NO_CHAIN;
|
||||
SELECT @@global.completion_type;
|
||||
SET @@global.completion_type = CHAIN;
|
||||
SELECT @@global.completion_type;
|
||||
SET @@global.completion_type = 'RELEASE';
|
||||
SELECT @@global.completion_type;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_017_04-------------------------#'
|
||||
##########################################################################
|
||||
@@ -90,19 +84,25 @@ SELECT @@session.completion_type;
|
||||
SET @@session.completion_type = 2;
|
||||
SELECT @@session.completion_type;
|
||||
|
||||
SET @@session.completion_type = 'NO_CHAIN';
|
||||
SELECT @@session.completion_type;
|
||||
SET @@session.completion_type = 'CHAIN';
|
||||
SELECT @@session.completion_type;
|
||||
SET @@session.completion_type = 'RELEASE';
|
||||
SELECT @@session.completion_type;
|
||||
|
||||
--echo '#------------------FN_DYNVARS_017_05-----------------------#'
|
||||
###########################################################
|
||||
# Change the value of completion_type to an invalid value #
|
||||
###########################################################
|
||||
|
||||
set sql_mode=TRADITIONAL;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.completion_type = 10;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.completion_type = -1024;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.completion_type = 2.4;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.completion_type = OFF;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.completion_type = 10;
|
||||
@@ -110,7 +110,7 @@ SET @@session.completion_type = 10;
|
||||
SET @@session.completion_type = -2;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.completion_type = 1.2;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.completion_type = ON;
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ SET @@global.completion_type = @start_global_value;
|
||||
SELECT @@global.completion_type;
|
||||
SET @@session.completion_type = @start_session_value;
|
||||
SELECT @@session.completion_type;
|
||||
set sql_mode='';
|
||||
|
||||
############################################
|
||||
# END OF completion_type TESTS #
|
||||
|
@@ -156,7 +156,7 @@ COMMIT;
|
||||
|
||||
--echo ## Inserting rows should give error here because connection should ##
|
||||
--echo ## disconnect after using COMMIT ##
|
||||
--Error 2006,2013,ER_SERVER_SHUTDOWN
|
||||
--Error 2006,2013,ER_QUERY_INTERRUPTED
|
||||
INSERT INTO t1 VALUES(4,'Record_4');
|
||||
|
||||
--echo switch to connection test_con2
|
||||
@@ -171,7 +171,7 @@ INSERT INTO t1 VALUES(12,'Record_12');
|
||||
ROLLBACK;
|
||||
|
||||
--echo ## Expect a failure due to COMMIT/ROLLBACK AND RELEASE behavior ##
|
||||
--Error 2006,2013,ER_SERVER_SHUTDOWN,
|
||||
--Error 2006,2013,ER_QUERY_INTERRUPTED
|
||||
INSERT INTO t1 VALUES(4,'Record_4');
|
||||
|
||||
connection default;
|
||||
|
@@ -67,35 +67,41 @@ SELECT @@global.concurrent_insert;
|
||||
SET @@global.concurrent_insert = 2;
|
||||
SELECT @@global.concurrent_insert;
|
||||
|
||||
SET @@global.concurrent_insert = NEVER;
|
||||
SELECT @@global.concurrent_insert;
|
||||
SET @@global.concurrent_insert = AUTO;
|
||||
SELECT @@global.concurrent_insert;
|
||||
SET @@global.concurrent_insert = ALWAYS;
|
||||
SELECT @@global.concurrent_insert;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_018_04-------------------------#'
|
||||
###########################################################################
|
||||
# Change the value of concurrent_insert to invalid value #
|
||||
###########################################################################
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = -1;
|
||||
Select @@global.concurrent_insert;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = 100;
|
||||
Select @@global.concurrent_insert;
|
||||
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = TRUEF;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = TRUE_F;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = FALSE0;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = OON;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = ONN;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = OOFF;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = 0FF;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = ' ';
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = " ";
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = '';
|
||||
|
||||
|
||||
@@ -125,9 +131,9 @@ WHERE VARIABLE_NAME='concurrent_insert';
|
||||
# Check if ON and OFF values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = OFF;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.concurrent_insert = ON;
|
||||
|
||||
|
||||
|
@@ -79,7 +79,6 @@ SET @@global.connect_timeout = -1024;
|
||||
SELECT @@global.connect_timeout;
|
||||
SET @@global.connect_timeout = 42949672950;
|
||||
SELECT @@global.connect_timeout;
|
||||
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.connect_timeout = 21221204.10;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
|
18
mysql-test/suite/sys_vars/t/date_format_basic.test
Normal file
18
mysql-test/suite/sys_vars/t/date_format_basic.test
Normal file
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# show the global and session values;
|
||||
#
|
||||
select @@global.date_format;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.date_format;
|
||||
show global variables like 'date_format';
|
||||
show session variables like 'date_format';
|
||||
select * from information_schema.global_variables where variable_name='date_format';
|
||||
select * from information_schema.session_variables where variable_name='date_format';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global date_format="foo";
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session date_format="foo";
|
18
mysql-test/suite/sys_vars/t/datetime_format_basic.test
Normal file
18
mysql-test/suite/sys_vars/t/datetime_format_basic.test
Normal file
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# show the global and session values;
|
||||
#
|
||||
select @@global.datetime_format;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.datetime_format;
|
||||
show global variables like 'datetime_format';
|
||||
show session variables like 'datetime_format';
|
||||
select * from information_schema.global_variables where variable_name='datetime_format';
|
||||
select * from information_schema.session_variables where variable_name='datetime_format';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global datetime_format="foo";
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session datetime_format="foo";
|
22
mysql-test/suite/sys_vars/t/debug_basic.test
Normal file
22
mysql-test/suite/sys_vars/t/debug_basic.test
Normal file
@@ -0,0 +1,22 @@
|
||||
--source include/have_debug.inc
|
||||
#
|
||||
# exists both as global and session
|
||||
#
|
||||
set session debug="L";
|
||||
|
||||
select @@global.debug="1"; # just to show that global.debug exists
|
||||
select @@session.debug; # here we know the value and can display it
|
||||
--replace_column 2 #
|
||||
show global variables like 'debug';
|
||||
show session variables like 'debug';
|
||||
--replace_column 2 #
|
||||
select * from information_schema.global_variables where variable_name="debug";
|
||||
select * from information_schema.session_variables where variable_name="debug";
|
||||
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set @@global.debug=1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set @@global.debug=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set @@global.debug=1e1;
|
||||
|
21
mysql-test/suite/sys_vars/t/debug_sync_basic.test
Normal file
21
mysql-test/suite/sys_vars/t/debug_sync_basic.test
Normal file
@@ -0,0 +1,21 @@
|
||||
--source include/have_debug_sync.inc
|
||||
#
|
||||
# exists as session only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@global.debug_sync;
|
||||
select @@session.debug_sync;
|
||||
|
||||
show global variables like "debug_sync";
|
||||
show session variables like "debug_sync";
|
||||
|
||||
select * from information_schema.global_variables where variable_name="debug_sync";
|
||||
select * from information_schema.session_variables where variable_name="debug_sync";
|
||||
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set @@session.debug_sync=1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set @@session.debug_sync=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set @@session.debug_sync=1e1;
|
||||
|
183
mysql-test/suite/sys_vars/t/default_storage_engine_basic.test
Normal file
183
mysql-test/suite/sys_vars/t/default_storage_engine_basic.test
Normal file
@@ -0,0 +1,183 @@
|
||||
############## mysql-test\t\storage_engine_basic.test ##################
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-14 #
|
||||
# Author: Salman Rawala #
|
||||
# #
|
||||
# Description: Test Cases of Dynamic System Variable #
|
||||
# default_storage_engine that check behavior of this #
|
||||
# variable with valid values, invalid values, accessing #
|
||||
# variable with scope that is allowed and with scope that #
|
||||
# is now allowed. #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html#option_mysqld_storage_engine #
|
||||
# #
|
||||
########################################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
######################################################################
|
||||
# START OF default_storage_engine TESTS #
|
||||
######################################################################
|
||||
|
||||
|
||||
#############################################################
|
||||
# Save initial value #
|
||||
#############################################################
|
||||
|
||||
SET @start_global_value = @@global.default_storage_engine;
|
||||
SELECT @start_global_value;
|
||||
SET @start_session_value = @@session.default_storage_engine;
|
||||
SELECT @start_session_value;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
|
||||
######################################################################
|
||||
# Display the DEFAULT value of default_storage_engine #
|
||||
######################################################################
|
||||
|
||||
SET @@global.default_storage_engine = INNODB;
|
||||
SET @@global.default_storage_engine = DEFAULT;
|
||||
SELECT @@global.default_storage_engine;
|
||||
|
||||
SET @@session.default_storage_engine = INNODB;
|
||||
SET @@session.default_storage_engine = DEFAULT;
|
||||
SELECT @@session.default_storage_engine;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_02-------------------------#'
|
||||
########################################################################
|
||||
# Change the value of default_storage_engine to a valid value for GLOBAL Scope #
|
||||
########################################################################
|
||||
|
||||
SET @@global.default_storage_engine = MYISAM;
|
||||
SELECT @@global.default_storage_engine;
|
||||
SET @@global.default_storage_engine = MERGE;
|
||||
SELECT @@global.default_storage_engine;
|
||||
SET @@global.default_storage_engine = MEMORY;
|
||||
SELECT @@global.default_storage_engine;
|
||||
SET @@global.default_storage_engine = INNODB;
|
||||
SELECT @@global.default_storage_engine;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_005_03-------------------------#'
|
||||
#########################################################################
|
||||
# Change the value of default_storage_engine to a valid value for SESSION Scope #
|
||||
#########################################################################
|
||||
|
||||
SET @@session.default_storage_engine = MYISAM;
|
||||
SELECT @@session.default_storage_engine;
|
||||
SET @@session.default_storage_engine = MERGE;
|
||||
SELECT @@session.default_storage_engine;
|
||||
SET @@session.default_storage_engine = MEMORY;
|
||||
SELECT @@session.default_storage_engine;
|
||||
SET @@session.default_storage_engine = INNODB;
|
||||
SELECT @@session.default_storage_engine;
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_005_04-----------------------#'
|
||||
##################################################################
|
||||
# Change the value of default_storage_engine to an invalid value #
|
||||
##################################################################
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.default_storage_engine = 8199;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.default_storage_engine = NULL;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.default_storage_engine = -1024;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.default_storage_engine = 65530.34;
|
||||
|
||||
--Error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SET @@global.default_storage_engine = FILE;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.default_storage_engine = 8199;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.default_storage_engine = 65530.34;
|
||||
|
||||
--Error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SET @@session.default_storage_engine = RECORD;
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_005_05-----------------------#'
|
||||
####################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
####################################################################
|
||||
|
||||
|
||||
SELECT @@global.default_storage_engine =
|
||||
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='default_storage_engine';
|
||||
|
||||
--echo '#------------------FN_DYNVARS_005_06-----------------------#'
|
||||
####################################################################
|
||||
# Check if the value in SESSION Table matches value in variable #
|
||||
####################################################################
|
||||
|
||||
SELECT @@session.default_storage_engine =
|
||||
VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='default_storage_engine';
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_005_07-----------------------#'
|
||||
####################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
####################################################################
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.default_storage_engine = TRUE;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.default_storage_engine = FALSE;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_001_8----------------------#'
|
||||
###############################################################
|
||||
# Check if accessing variable with SESSION,LOCAL and without #
|
||||
# SCOPE points to same session variable #
|
||||
###############################################################
|
||||
|
||||
SET @@default_storage_engine = MYISAM;
|
||||
SELECT @@default_storage_engine = @@local.default_storage_engine;
|
||||
SELECT @@local.default_storage_engine = @@session.default_storage_engine;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_001_9----------------------#'
|
||||
#########################################################################
|
||||
# Check if default_storage_engine can be accessed with and without @@ sign #
|
||||
#########################################################################
|
||||
|
||||
SET default_storage_engine = MEMORY;
|
||||
SELECT @@default_storage_engine;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.default_storage_engine;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT session.default_storage_engine;
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT default_storage_engine = @@session.default_storage_engine;
|
||||
|
||||
# check the old obsolete name
|
||||
SET @@default_storage_engine = @start_global_value;
|
||||
|
||||
####################################
|
||||
# Restore initial value #
|
||||
####################################
|
||||
|
||||
SET @@global.default_storage_engine = @start_global_value;
|
||||
SELECT @@global.default_storage_engine;
|
||||
SET @@session.default_storage_engine = @start_session_value;
|
||||
SELECT @@session.default_storage_engine;
|
||||
|
||||
|
||||
#############################################################
|
||||
# END OF default_storage_engine TESTS #
|
||||
#############################################################
|
||||
|
@@ -118,7 +118,6 @@ SET @@session.default_week_format = -2;
|
||||
SELECT @@session.default_week_format;
|
||||
SET @@session.default_week_format = 65550;
|
||||
SELECT @@session.default_week_format;
|
||||
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
--echo '#------------------FN_DYNVARS_022_06-----------------------#'
|
||||
###############################################################################
|
||||
|
@@ -44,10 +44,7 @@ SELECT @start_value;
|
||||
########################################################################
|
||||
|
||||
SET @@global.delay_key_write = OFF;
|
||||
--Error ER_NO_DEFAULT
|
||||
SET @@global.delay_key_write = DEFAULT;
|
||||
--echo 'Bug # 34878: Documentation specifies a DEFAULT value of ON for variable but';
|
||||
--echo 'its not supported';
|
||||
SELECT @@global.delay_key_write;
|
||||
|
||||
|
||||
@@ -92,10 +89,8 @@ SET @@global.delay_key_write = ERROR;
|
||||
SET @@global.delay_key_write = FALSE0;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.delay_key_write = ONN;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.delay_key_write = OF;
|
||||
SELECT @@global.delay_key_write;
|
||||
--echo 'Bug# 34828: Variable is incorrectly accepting OF as a value'
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.delay_key_write = ' ';
|
||||
|
@@ -1,11 +1,11 @@
|
||||
################################################################################
|
||||
# #
|
||||
# Variable Name: sql_low_priority_updates #
|
||||
# Variable Name: delayed_insert_limit #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: BOOLEAN #
|
||||
# Default Value: 1 TRUE #
|
||||
# Values: 1 TRUE, 0 FALSE #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 100 #
|
||||
# Range: 1 - 4294967295 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-25 #
|
||||
@@ -13,7 +13,7 @@
|
||||
# Modified: HHunger 2009-02-26 Replaced 2 sleeps by wait conditions #
|
||||
# Modified: mleich 2009-03-18 Partially reimplemented #
|
||||
# #
|
||||
# Description: Test Cases of Dynamic System Variable "sql_low_priority_updates"#
|
||||
# Description: Test Cases of Dynamic System Variable "delayed_insert_limit" #
|
||||
# that checks behavior of this variable in the following ways #
|
||||
# * Functionality based on different values #
|
||||
# #
|
||||
@@ -112,7 +112,6 @@ let $wait_condition=
|
||||
SELECT variable_value > 0 FROM information_schema.global_status
|
||||
WHERE variable_name like 'Not_flushed_delayed_rows';
|
||||
--source include/wait_condition.inc
|
||||
let $my_select= SELECT COUNT(*) BETWEEN 21 AND 43 FROM t1;
|
||||
let $my_select= SELECT COUNT(*) FROM t1;
|
||||
send;
|
||||
eval $my_select;
|
||||
@@ -136,6 +135,13 @@ connection con0;
|
||||
--echo Asynchronous "reap" result
|
||||
--echo The next result suffers from
|
||||
--echo '# Bug#35386 insert delayed inserts 1 + limit rows instead of just limit rows'
|
||||
#
|
||||
# on UNLOCK TABLES both SELECT in the con0 and delayed insert thread in the
|
||||
# con1 were awaken. There's no FIFO for TL_WRITE_DELAYED and TL_READ,
|
||||
# so either the first delayed_insert_limit rows will be inserted
|
||||
# before select (which will see 21 row) or select will go first (and see 6 rows)
|
||||
#
|
||||
--replace_result 6 21
|
||||
reap;
|
||||
|
||||
--echo ** Connection default **
|
||||
|
@@ -79,8 +79,6 @@ SET @@global.delayed_insert_timeout = -1024;
|
||||
SELECT @@global.delayed_insert_timeout;
|
||||
SET @@global.delayed_insert_timeout = 42949672950;
|
||||
SELECT @@global.delayed_insert_timeout;
|
||||
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.delayed_insert_timeout = 429496729.5;
|
||||
|
17
mysql-test/suite/sys_vars/t/disabled.def
Normal file
17
mysql-test/suite/sys_vars/t/disabled.def
Normal file
@@ -0,0 +1,17 @@
|
||||
##############################################################################
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
##############################################################################
|
||||
query_cache_size_basic_32 : Bug#36747: Allocating a large query cache is not deterministic
|
||||
query_cache_size_basic_64 : Bug#36747: Allocating a large query cache is not deterministic
|
||||
transaction_prealloc_size_basic_32 : Bug#36747
|
||||
transaction_prealloc_size_basic_64 : Bug#36747
|
||||
#thread_cache_size_func : Bug#40575: 2008-11-07 joro main.thread_cache_size_func fails in pushbuild when run with pool of threads
|
||||
|
@@ -114,7 +114,6 @@ SET @@session.div_precision_increment = -2;
|
||||
SELECT @@session.div_precision_increment;
|
||||
SET @@session.div_precision_increment = 65550;
|
||||
SELECT @@session.div_precision_increment;
|
||||
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.div_precision_increment = 65530.30;
|
||||
|
@@ -37,7 +37,7 @@ CREATE TABLE t1
|
||||
id INT NOT NULL auto_increment,
|
||||
PRIMARY KEY (id),
|
||||
name VARCHAR(30),
|
||||
salary LONG
|
||||
salary INT
|
||||
);
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_027_01-------------------------#'
|
||||
@@ -55,7 +55,6 @@ INSERT into t1(name, salary) values('Record_2', 501);
|
||||
INSERT into t1(name, salary) values('Record_3', 210);
|
||||
|
||||
SELECT name, salary, ((salary * 2.5)/1000) AS INCOME from t1;
|
||||
--echo 'Bug#35374: div_precision is not working with table column'
|
||||
|
||||
--echo ## Verifying variable's behavior with direct division ##
|
||||
SELECT 1/7;
|
||||
@@ -80,7 +79,7 @@ CREATE TABLE t1
|
||||
id INT NOT NULL auto_increment,
|
||||
PRIMARY KEY (id),
|
||||
name VARCHAR(30),
|
||||
salary LONG,
|
||||
salary INT,
|
||||
income_tax FLOAT
|
||||
);
|
||||
|
||||
|
@@ -101,7 +101,7 @@ SELECT @@global.engine_condition_pushdown;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.engine_condition_pushdown = -1;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.engine_condition_pushdown = 1.6;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.engine_condition_pushdown = "T";
|
||||
@@ -111,16 +111,12 @@ SET @@session.engine_condition_pushdown = "Y";
|
||||
SET @@session.engine_condition_pushdown = TR<54>E;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.engine_condition_pushdown = <20>N;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.engine_condition_pushdown = OF;
|
||||
SELECT @@session.engine_condition_pushdown;
|
||||
--echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.engine_condition_pushdown = <20>FF;
|
||||
|
||||
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.engine_condition_pushdown = -1;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
@@ -133,12 +129,8 @@ SET @@global.engine_condition_pushdown = "Y";
|
||||
SET @@global.engine_condition_pushdown = TR<54>E;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.engine_condition_pushdown = <20>N;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.engine_condition_pushdown = OF;
|
||||
SELECT @@global.engine_condition_pushdown;
|
||||
|
||||
--echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.engine_condition_pushdown = <20>FF;
|
||||
|
||||
|
@@ -43,10 +43,8 @@ SELECT @start_value;
|
||||
# Verify default value of variable #
|
||||
###############################################
|
||||
|
||||
--Error ER_NO_DEFAULT
|
||||
SET @@global.event_scheduler = DEFAULT;
|
||||
#SELECT @@global.event_scheduler = OFF;
|
||||
--echo 'Bug# 34878: According to documentation the default value of variable is OFF';
|
||||
SELECT @@global.event_scheduler;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_004_02------------------------#'
|
||||
#######################################################################
|
||||
|
@@ -91,7 +91,6 @@ SET @@global.expire_logs_days = -1024;
|
||||
SELECT @@global.expire_logs_days;
|
||||
SET @@global.expire_logs_days = 42949672950;
|
||||
SELECT @@global.expire_logs_days;
|
||||
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.expire_logs_days = ON;
|
||||
|
@@ -43,9 +43,7 @@ SELECT @start_value;
|
||||
#############################################################
|
||||
|
||||
SET @@global.flush = ON;
|
||||
--Error ER_NO_DEFAULT
|
||||
SET @@global.flush = DEFAULT;
|
||||
--echo 'Bug# 34878: FN_DYNVARS_002_01 - Default value is off according to Documentation of MySQL';
|
||||
SELECT @@global.flush;
|
||||
|
||||
|
||||
|
50
mysql-test/suite/sys_vars/t/flush_time_basic.test
Normal file
50
mysql-test/suite/sys_vars/t/flush_time_basic.test
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
#
|
||||
# note, the default is 1800 on windows, 0 everywhere else
|
||||
#
|
||||
|
||||
SET @start_global_value = @@global.flush_time;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--replace_result 1800 0
|
||||
select @@global.flush_time;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.flush_time;
|
||||
--replace_result 1800 0
|
||||
show global variables like 'flush_time';
|
||||
--replace_result 1800 0
|
||||
show session variables like 'flush_time';
|
||||
--replace_result 1800 0
|
||||
select * from information_schema.global_variables where variable_name='flush_time';
|
||||
--replace_result 1800 0
|
||||
select * from information_schema.session_variables where variable_name='flush_time';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global flush_time=1;
|
||||
select @@global.flush_time;
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session flush_time=1;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global flush_time=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global flush_time=1e1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global flush_time="foo";
|
||||
|
||||
#
|
||||
# min/max values
|
||||
#
|
||||
set global flush_time=0;
|
||||
select @@global.flush_time;
|
||||
set global flush_time=cast(-1 as unsigned int);
|
||||
select @@global.flush_time;
|
||||
|
||||
SET @@global.flush_time = @start_global_value;
|
@@ -46,7 +46,6 @@ SET @@session.foreign_key_checks = 1;
|
||||
SET @@session.foreign_key_checks = DEFAULT;
|
||||
SELECT @@session.foreign_key_checks;
|
||||
|
||||
--echo 'Bug# 34878: No DEFAULT value for variable. Also setting DEFAULT does not give error'
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_032_02-------------------------#'
|
||||
#############################################################################
|
||||
@@ -94,12 +93,8 @@ SET @@session.foreign_key_checks = "Y";
|
||||
SET @@session.foreign_key_checks = TR<54>E;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.foreign_key_checks = <20>N;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.foreign_key_checks = OF;
|
||||
SELECT @@session.foreign_key_checks;
|
||||
|
||||
--echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.foreign_key_checks = <20>FF;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
@@ -113,11 +108,9 @@ SET @@session.foreign_key_checks = NO;
|
||||
# Test if accessing global foreign_key_checks gives error #
|
||||
###########################################################################
|
||||
|
||||
--Error ER_LOCAL_VARIABLE
|
||||
SET @@global.foreign_key_checks = 0;
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@global.foreign_key_checks;
|
||||
SET @@global.foreign_key_checks = 1;
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_032_06------------------------#'
|
||||
#########################################################################
|
||||
|
@@ -93,9 +93,6 @@ INSERT INTO t2 values (20,4);
|
||||
SET @@session.foreign_key_checks = 1;
|
||||
|
||||
UPDATE t2 SET b=4 where a=20;
|
||||
--echo 'Bug#35358: Updating an incorrect foreign key(inserted by disabling '
|
||||
--echo 'foreign_key_checks)to the same value does not raise error after '
|
||||
--echo 'enabling foreign_key_checks'
|
||||
|
||||
#==============================================================================
|
||||
--echo 'Check when foreign_key_checks is enabled and FK constraint is re-created'
|
||||
|
@@ -145,10 +145,7 @@ WHERE VARIABLE_NAME='ft_boolean_syntax') AS res;
|
||||
#############################################################################
|
||||
# Content of initial variable
|
||||
SELECT @global_start_value;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.ft_boolean_syntax = @global_start_value;
|
||||
--echo 'Bug# 34883: ft_boolean_syntax cant be assigned values from session temporary';
|
||||
--echo 'variables';
|
||||
|
||||
####################################
|
||||
# Restore Default value #
|
||||
|
@@ -92,15 +92,11 @@ SELECT * FROM articles WHERE MATCH (title,body)
|
||||
AGAINST ('"faster than"' IN BOOLEAN MODE);
|
||||
|
||||
SELECT * FROM articles WHERE MATCH (title,body)
|
||||
AGAINST ('+run ~line' IN BOOLEAN MODE);
|
||||
|
||||
--Echo 'Bug#35359: ~ is not working correctly. Its behaving like -'
|
||||
AGAINST ('+tutorial ~line' IN BOOLEAN MODE);
|
||||
|
||||
SELECT * FROM articles WHERE MATCH (title,body)
|
||||
AGAINST ('10*' IN BOOLEAN MODE);
|
||||
|
||||
--Echo 'Bug#35360: * is not working correctly. Not all rows are returned'
|
||||
|
||||
SELECT id,title,body, (MATCH (title,body)
|
||||
AGAINST ('+MySQL +(>show <dbms)' IN BOOLEAN MODE)) AS relevance
|
||||
FROM articles WHERE MATCH (title,body)
|
||||
@@ -114,8 +110,6 @@ SET @@global.ft_boolean_syntax='~ /!@#$%^&*()-';
|
||||
SELECT * FROM articles WHERE MATCH (title,body)
|
||||
AGAINST ('~mySQL /yourSQL' IN BOOLEAN MODE);
|
||||
|
||||
--echo 'Bug#35361: Different syntax does not produce result as default operators'
|
||||
|
||||
#restore default
|
||||
SET @@global.ft_boolean_syntax=DEFAULT;
|
||||
|
||||
|
19
mysql-test/suite/sys_vars/t/ft_max_word_len_basic.test
Normal file
19
mysql-test/suite/sys_vars/t/ft_max_word_len_basic.test
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# only global
|
||||
#
|
||||
select @@global.ft_max_word_len;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.ft_max_word_len;
|
||||
show global variables like 'ft_max_word_len';
|
||||
show session variables like 'ft_max_word_len';
|
||||
select * from information_schema.global_variables where variable_name='ft_max_word_len';
|
||||
select * from information_schema.session_variables where variable_name='ft_max_word_len';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global ft_max_word_len=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session ft_max_word_len=1;
|
||||
|
19
mysql-test/suite/sys_vars/t/ft_min_word_len_basic.test
Normal file
19
mysql-test/suite/sys_vars/t/ft_min_word_len_basic.test
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# only global
|
||||
#
|
||||
select @@global.ft_min_word_len;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.ft_min_word_len;
|
||||
show global variables like 'ft_min_word_len';
|
||||
show session variables like 'ft_min_word_len';
|
||||
select * from information_schema.global_variables where variable_name='ft_min_word_len';
|
||||
select * from information_schema.session_variables where variable_name='ft_min_word_len';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global ft_min_word_len=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session ft_min_word_len=1;
|
||||
|
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# only global
|
||||
#
|
||||
select @@global.ft_query_expansion_limit;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.ft_query_expansion_limit;
|
||||
show global variables like 'ft_query_expansion_limit';
|
||||
show session variables like 'ft_query_expansion_limit';
|
||||
select * from information_schema.global_variables where variable_name='ft_query_expansion_limit';
|
||||
select * from information_schema.session_variables where variable_name='ft_query_expansion_limit';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global ft_query_expansion_limit=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session ft_query_expansion_limit=1;
|
||||
|
19
mysql-test/suite/sys_vars/t/ft_stopword_file_basic.test
Normal file
19
mysql-test/suite/sys_vars/t/ft_stopword_file_basic.test
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# only global
|
||||
#
|
||||
select @@global.ft_stopword_file;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.ft_stopword_file;
|
||||
show global variables like 'ft_stopword_file';
|
||||
show session variables like 'ft_stopword_file';
|
||||
select * from information_schema.global_variables where variable_name='ft_stopword_file';
|
||||
select * from information_schema.session_variables where variable_name='ft_stopword_file';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global ft_stopword_file=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session ft_stopword_file=1;
|
||||
|
@@ -45,7 +45,8 @@ SELECT @start_value;
|
||||
###############################################
|
||||
|
||||
SET @@global.general_log_file = DEFAULT;
|
||||
SELECT RIGHT(@@global.general_log_file,10) AS log_file;
|
||||
SET @a=concat(left(@@hostname, instr(concat(@@hostname, '.'), '.')-1), '.log');
|
||||
SELECT RIGHT(@@global.general_log_file, length(@a)) = @a;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_004_02------------------------#'
|
||||
|
@@ -46,8 +46,18 @@ name VARCHAR(30)
|
||||
SET @@global.general_log = OFF;
|
||||
SELECT @@general_log;
|
||||
|
||||
|
||||
let $MYSQLD_LOGFILE= `select @@global.general_log_file`;
|
||||
|
||||
#
|
||||
# truncate the existing log - it could be larger than max_allowed_packet
|
||||
# and that would cause load_file() below to fail
|
||||
#
|
||||
--remove_file $MYSQLD_LOGFILE
|
||||
flush logs;
|
||||
SET @@global.general_log = ON;
|
||||
flush logs;
|
||||
SET @@global.general_log = OFF;
|
||||
|
||||
--copy_file $MYSQLD_LOGFILE $MYSQLD_LOGFILE.copy
|
||||
|
||||
--echo ## Inserting some Records & Verifying output in log ##
|
||||
@@ -78,13 +88,12 @@ INSERT into t1(name) values('Record_4');
|
||||
--copy_file $MYSQLD_LOGFILE $MYSQLD_LOGFILE.orig
|
||||
--chmod 0777 $MYSQLD_LOGFILE.orig
|
||||
|
||||
--echo ## There should be a difference ##
|
||||
SET @@global.max_allowed_packet= 1024*1024*1024;
|
||||
--echo ## old log is a proper prefix of the new log ##
|
||||
--replace_result $MYSQLD_LOGFILE MYSQLD_LOGFILE
|
||||
eval SET @orig_file= load_file('$MYSQLD_LOGFILE.orig');
|
||||
--replace_result $MYSQLD_LOGFILE MYSQLD_LOGFILE
|
||||
eval SET @copy_file= load_file('$MYSQLD_LOGFILE.copy');
|
||||
eval SELECT STRCMP(@orig_file, @copy_file);
|
||||
SELECT @orig_file > @copy_file, left(@orig_file, length(@copy_file)) = @copy_file;
|
||||
--remove_file $MYSQLD_LOGFILE.copy
|
||||
--remove_file $MYSQLD_LOGFILE.orig
|
||||
|
||||
|
@@ -103,8 +103,8 @@ SET @@global.group_concat_max_len = -1024;
|
||||
SELECT @@global.group_concat_max_len;
|
||||
SET @@global.group_concat_max_len = 65536;
|
||||
SELECT @@global.group_concat_max_len;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET @@global.group_concat_max_len = 65530.34.;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.group_concat_max_len = 65530.34;
|
||||
SELECT @@global.group_concat_max_len;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.group_concat_max_len = test;
|
||||
@@ -114,11 +114,10 @@ SET @@session.group_concat_max_len = 0;
|
||||
SELECT @@session.group_concat_max_len;
|
||||
SET @@session.group_concat_max_len = -2;
|
||||
SELECT @@session.group_concat_max_len;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET @@session.group_concat_max_len = 65530.34.;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.group_concat_max_len = 65530.34;
|
||||
SET @@session.group_concat_max_len = 65550;
|
||||
SELECT @@session.group_concat_max_len;
|
||||
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.group_concat_max_len = test;
|
||||
|
23
mysql-test/suite/sys_vars/t/have_profiling_basic.test
Normal file
23
mysql-test/suite/sys_vars/t/have_profiling_basic.test
Normal file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# only global
|
||||
#
|
||||
select @@global.have_profiling="1";
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.have_profiling;
|
||||
--replace_column 2 #
|
||||
show global variables like 'have_profiling';
|
||||
--replace_column 2 #
|
||||
show session variables like 'have_profiling';
|
||||
--replace_column 2 #
|
||||
select * from information_schema.global_variables where variable_name='have_profiling';
|
||||
--replace_column 2 #
|
||||
select * from information_schema.session_variables where variable_name='have_profiling';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global have_profiling=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session have_profiling=1;
|
||||
|
@@ -89,7 +89,6 @@ SET @@session.identity = -1024;
|
||||
SELECT @@session.identity;
|
||||
SET @@session.identity = 42949672950;
|
||||
SELECT @@session.identity;
|
||||
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.identity = ON;
|
||||
|
19
mysql-test/suite/sys_vars/t/ignore_builtin_innodb_basic.test
Normal file
19
mysql-test/suite/sys_vars/t/ignore_builtin_innodb_basic.test
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# only global
|
||||
#
|
||||
select @@global.ignore_builtin_innodb;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.ignore_builtin_innodb;
|
||||
show global variables like 'ignore_builtin_innodb';
|
||||
show session variables like 'ignore_builtin_innodb';
|
||||
select * from information_schema.global_variables where variable_name='ignore_builtin_innodb';
|
||||
select * from information_schema.session_variables where variable_name='ignore_builtin_innodb';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global ignore_builtin_innodb=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session ignore_builtin_innodb=1;
|
||||
|
@@ -94,6 +94,11 @@ SELECT @@global.init_connect;
|
||||
SET @@global.init_connect="SET autocomit=0;REVOKE ALL ON INFORMATION_SCHEMA.*";
|
||||
SELECT @@global.init_connect;
|
||||
|
||||
SET @@global.init_connect='set @a="12\034"';
|
||||
SELECT @@global.init_connect;
|
||||
SELECT hex(@@global.init_connect);
|
||||
SHOW VARIABLES LIKE 'init_connect';
|
||||
|
||||
SET @@global.init_connect='SHOW VARIABLES';
|
||||
SELECT @@global.init_connect;
|
||||
|
||||
|
19
mysql-test/suite/sys_vars/t/init_file_basic.test
Normal file
19
mysql-test/suite/sys_vars/t/init_file_basic.test
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# only global
|
||||
#
|
||||
select @@global.init_file;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.init_file;
|
||||
show global variables like 'init_file';
|
||||
show session variables like 'init_file';
|
||||
select * from information_schema.global_variables where variable_name='init_file';
|
||||
select * from information_schema.session_variables where variable_name='init_file';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global init_file=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session init_file=1;
|
||||
|
@@ -74,29 +74,25 @@ SELECT @@global.innodb_commit_concurrency;
|
||||
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;
|
||||
SELECT @@global.innodb_commit_concurrency;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
|
||||
###########################################################################
|
||||
# Change the value of innodb_commit_concurrency to invalid value #
|
||||
###########################################################################
|
||||
|
||||
#
|
||||
# InnoDB doesn't allow innodb_commit_concurrency to change from
|
||||
# zero to non-zero or vice versa
|
||||
#
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.innodb_commit_concurrency = 1;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.innodb_commit_concurrency = -1;
|
||||
SELECT @@global.innodb_commit_concurrency;
|
||||
|
||||
--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;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.innodb_commit_concurrency = 1001;
|
||||
SELECT @@global.innodb_commit_concurrency;
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
|
||||
#########################################################################
|
||||
@@ -123,17 +119,6 @@ SELECT @@global.innodb_commit_concurrency;
|
||||
SET @@global.innodb_commit_concurrency = ON;
|
||||
SELECT @@global.innodb_commit_concurrency;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
|
||||
SET @@global.innodb_commit_concurrency = TRUE;
|
||||
SELECT @@global.innodb_commit_concurrency;
|
||||
SET @@global.innodb_commit_concurrency = FALSE;
|
||||
SELECT @@global.innodb_commit_concurrency;
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
@@ -0,0 +1,147 @@
|
||||
################# mysql-test\t\innodb_concurrency_tickets_basic.test ##########
|
||||
# #
|
||||
# Variable Name: innodb_concurrency_tickets #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 500 #
|
||||
# Range: 1-4294967295 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author: Rizwan #
|
||||
# #
|
||||
#Description:Test Cases of Dynamic System Variable innodb_concurrency_tickets #
|
||||
# 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 #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
########################################################################
|
||||
# START OF innodb_concurrency_tickets TESTS #
|
||||
########################################################################
|
||||
|
||||
|
||||
################################################################################
|
||||
# Saving initial value of innodb_concurrency_tickets in a temporary variable #
|
||||
################################################################################
|
||||
|
||||
SET @global_start_value = @@global.innodb_concurrency_tickets;
|
||||
SELECT @global_start_value;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
|
||||
########################################################################
|
||||
# Display the DEFAULT value of innodb_concurrency_tickets #
|
||||
########################################################################
|
||||
|
||||
SET @@global.innodb_concurrency_tickets = 0;
|
||||
SET @@global.innodb_concurrency_tickets = DEFAULT;
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
|
||||
################################################################################
|
||||
# Check if innodb_concurrency_tickets can be accessed with and without @@ sign #
|
||||
################################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET innodb_concurrency_tickets = 1;
|
||||
SELECT @@innodb_concurrency_tickets;
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.innodb_concurrency_tickets;
|
||||
|
||||
|
||||
SET global innodb_concurrency_tickets = 0;
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
|
||||
##########################################################################
|
||||
# change the value of innodb_concurrency_tickets to a valid value #
|
||||
##########################################################################
|
||||
|
||||
|
||||
SET @@global.innodb_concurrency_tickets = 1;
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
SET @@global.innodb_concurrency_tickets = 1000;
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
SET @@global.innodb_concurrency_tickets = 4294967295;
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
|
||||
###########################################################################
|
||||
# Change the value of innodb_concurrency_tickets to invalid value #
|
||||
###########################################################################
|
||||
|
||||
SET @@global.innodb_concurrency_tickets = -1;
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_concurrency_tickets = "T";
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_concurrency_tickets = "Y";
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
SET @@global.innodb_concurrency_tickets = 1001;
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
|
||||
#########################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#########################################################################
|
||||
|
||||
SELECT @@global.innodb_concurrency_tickets =
|
||||
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_concurrency_tickets';
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_concurrency_tickets';
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
|
||||
###################################################################
|
||||
# Check if ON and OFF values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_concurrency_tickets = OFF;
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_concurrency_tickets = ON;
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
SET @@global.innodb_concurrency_tickets = TRUE;
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
SET @@global.innodb_concurrency_tickets = FALSE;
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
SET @@global.innodb_concurrency_tickets = @global_start_value;
|
||||
SELECT @@global.innodb_concurrency_tickets;
|
||||
|
||||
###############################################################
|
||||
# END OF innodb_concurrency_tickets TESTS #
|
||||
###############################################################
|
||||
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 32 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_32bit.inc
|
||||
--source suite/sys_vars/inc/innodb_concurrency_tickets_basic.inc
|
||||
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 64 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_64bit.inc
|
||||
--source suite/sys_vars/inc/innodb_concurrency_tickets_basic.inc
|
||||
|
147
mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic.test
Normal file
147
mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic.test
Normal file
@@ -0,0 +1,147 @@
|
||||
################# mysql-test\t\innodb_max_purge_lag_basic.test ################
|
||||
# #
|
||||
# Variable Name: innodb_max_purge_lag #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 0 #
|
||||
# Range: 0-4294967295 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author: Rizwan #
|
||||
# #
|
||||
#Description:Test Cases of Dynamic System Variable innodb_max_purge_lag #
|
||||
# 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 #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
########################################################################
|
||||
# START OF innodb_max_purge_lag TESTS #
|
||||
########################################################################
|
||||
|
||||
################################################################################
|
||||
# Saving initial value of innodb_max_purge_lag in a temporary variable #
|
||||
################################################################################
|
||||
|
||||
SET @global_start_value = @@global.innodb_max_purge_lag;
|
||||
SELECT @global_start_value;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
|
||||
########################################################################
|
||||
# Display the DEFAULT value of innodb_max_purge_lag #
|
||||
########################################################################
|
||||
|
||||
SET @@global.innodb_max_purge_lag = 0;
|
||||
SET @@global.innodb_max_purge_lag = DEFAULT;
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
|
||||
############################################################################
|
||||
# Check if innodb_max_purge_lag can be accessed with and without @@ sign #
|
||||
############################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET innodb_max_purge_lag = 1;
|
||||
SELECT @@innodb_max_purge_lag;
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.innodb_max_purge_lag;
|
||||
|
||||
SET global innodb_max_purge_lag = 0;
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
|
||||
##########################################################################
|
||||
# change the value of innodb_max_purge_lag to a valid value #
|
||||
##########################################################################
|
||||
|
||||
|
||||
SET @@global.innodb_max_purge_lag = 0;
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
|
||||
SET @@global.innodb_max_purge_lag = 1;
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
SET @@global.innodb_max_purge_lag = 4294967295;
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
|
||||
###########################################################################
|
||||
# Change the value of innodb_max_purge_lag to invalid value #
|
||||
###########################################################################
|
||||
|
||||
SET @@global.innodb_max_purge_lag = -1;
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_max_purge_lag = "T";
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_max_purge_lag = "Y";
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
|
||||
|
||||
SET @@global.innodb_max_purge_lag = 1001;
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
|
||||
#########################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#########################################################################
|
||||
|
||||
SELECT @@global.innodb_max_purge_lag =
|
||||
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_max_purge_lag';
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_max_purge_lag';
|
||||
|
||||
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
|
||||
###################################################################
|
||||
# Check if ON and OFF values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_max_purge_lag = OFF;
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_max_purge_lag = ON;
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
|
||||
SET @@global.innodb_max_purge_lag = TRUE;
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
SET @@global.innodb_max_purge_lag = FALSE;
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
|
||||
SET @@global.innodb_max_purge_lag = @global_start_value;
|
||||
SELECT @@global.innodb_max_purge_lag;
|
||||
|
||||
###############################################################
|
||||
# END OF innodb_max_purge_lag TESTS #
|
||||
###############################################################
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 32 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_32bit.inc
|
||||
--source suite/sys_vars/inc/innodb_max_purge_lag_basic.inc
|
||||
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 64 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_64bit.inc
|
||||
--source suite/sys_vars/inc/innodb_max_purge_lag_basic.inc
|
||||
|
@@ -105,9 +105,9 @@ SELECT @@global.innodb_support_xa;
|
||||
###########################################################################
|
||||
|
||||
# for session
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.innodb_support_xa = -0.6;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.innodb_support_xa = 1.6;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.innodb_support_xa = "T";
|
||||
@@ -121,8 +121,6 @@ SET @@session.innodb_support_xa =
|
||||
SET @@session.innodb_support_xa = OF;
|
||||
SELECT @@session.innodb_support_xa;
|
||||
|
||||
--echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.innodb_support_xa = <20>FF;
|
||||
|
||||
@@ -146,8 +144,6 @@ SET @@global.innodb_support_xa =
|
||||
SET @@global.innodb_support_xa = OF;
|
||||
SELECT @@global.innodb_support_xa;
|
||||
|
||||
--echo 'Bug# 34828 : OF is taken as OFF and a value of 0 is set.'
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.innodb_support_xa = <20>FF;
|
||||
|
||||
|
142
mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test
Normal file
142
mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test
Normal file
@@ -0,0 +1,142 @@
|
||||
################# mysql-test\t\innodb_sync_spin_loops_basic.test ##############
|
||||
# #
|
||||
# Variable Name: innodb_sync_spin_loops #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 20 #
|
||||
# Range: 0-4294967295 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author: Rizwan #
|
||||
# #
|
||||
#Description:Test Cases of Dynamic System Variable innodb_sync_spin_loops #
|
||||
# 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 #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
########################################################################
|
||||
# START OF innodb_sync_spin_loops TESTS #
|
||||
########################################################################
|
||||
|
||||
|
||||
############################################################################
|
||||
# Saving initial value of innodb_sync_spin_loops in a temporary variable #
|
||||
############################################################################
|
||||
|
||||
SET @global_start_value = @@global.innodb_sync_spin_loops;
|
||||
SELECT @global_start_value;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
|
||||
########################################################################
|
||||
# Display the DEFAULT value of innodb_sync_spin_loops #
|
||||
########################################################################
|
||||
|
||||
SET @@global.innodb_sync_spin_loops = 0;
|
||||
SET @@global.innodb_sync_spin_loops = DEFAULT;
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
|
||||
##############################################################################
|
||||
# Check if innodb_sync_spin_loops can be accessed with and without @@ sign #
|
||||
##############################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET innodb_sync_spin_loops = 1;
|
||||
SELECT @@innodb_sync_spin_loops;
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.innodb_sync_spin_loops;
|
||||
|
||||
SET global innodb_sync_spin_loops = 0;
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
|
||||
##########################################################################
|
||||
# change the value of innodb_sync_spin_loops to a valid value #
|
||||
##########################################################################
|
||||
|
||||
SET @@global.innodb_sync_spin_loops = 0;
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
|
||||
SET @@global.innodb_sync_spin_loops = 1;
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
SET @@global.innodb_sync_spin_loops = 1000;
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
|
||||
###########################################################################
|
||||
# Change the value of innodb_sync_spin_loops to invalid value #
|
||||
###########################################################################
|
||||
|
||||
SET @@global.innodb_sync_spin_loops = -1;
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_sync_spin_loops = "T";
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_sync_spin_loops = "Y";
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
|
||||
SET @@global.innodb_sync_spin_loops = 1001;
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
|
||||
#########################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#########################################################################
|
||||
|
||||
SELECT @@global.innodb_sync_spin_loops =
|
||||
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_sync_spin_loops';
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_sync_spin_loops';
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
|
||||
###################################################################
|
||||
# Check if ON and OFF values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_sync_spin_loops = OFF;
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_sync_spin_loops = ON;
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
|
||||
SET @@global.innodb_sync_spin_loops = TRUE;
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
SET @@global.innodb_sync_spin_loops = FALSE;
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
SET @@global.innodb_sync_spin_loops = @global_start_value;
|
||||
SELECT @@global.innodb_sync_spin_loops;
|
||||
|
||||
###############################################################
|
||||
# END OF innodb_sync_spin_loops TESTS #
|
||||
###############################################################
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 32 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_32bit.inc
|
||||
--source suite/sys_vars/inc/innodb_sync_spin_loops_basic.inc
|
||||
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 64 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_64bit.inc
|
||||
--source suite/sys_vars/inc/innodb_sync_spin_loops_basic.inc
|
||||
|
@@ -107,7 +107,7 @@ SELECT @@global.innodb_table_locks;
|
||||
# for session
|
||||
|
||||
SET @@session.innodb_table_locks = -6;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.innodb_table_locks = 1.6;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.innodb_table_locks = "T";
|
||||
@@ -121,8 +121,6 @@ SET @@session.innodb_table_locks =
|
||||
SET @@session.innodb_table_locks = OF;
|
||||
SELECT @@session.innodb_table_locks;
|
||||
|
||||
--echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.innodb_table_locks = <20>FF;
|
||||
|
||||
@@ -144,8 +142,6 @@ SET @@global.innodb_table_locks = QN;
|
||||
SET @@global.innodb_table_locks = OF;
|
||||
SELECT @@global.innodb_table_locks;
|
||||
|
||||
--echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
#SET @@global.innodb_table_locks = <20>FF;
|
||||
|
||||
|
@@ -90,8 +90,6 @@ SET @@session.insert_id = -1024;
|
||||
SELECT @@session.insert_id;
|
||||
SET @@session.insert_id = 42949672950;
|
||||
SELECT @@session.insert_id;
|
||||
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.insert_id = ON;
|
||||
SELECT @@session.insert_id;
|
||||
|
@@ -104,8 +104,8 @@ SET @@global.interactive_timeout = -1024;
|
||||
SELECT @@global.interactive_timeout;
|
||||
SET @@global.interactive_timeout = 1000000000;
|
||||
SELECT @@global.interactive_timeout;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET @@global.interactive_timeout = 65530.34.;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.interactive_timeout = 65530.34;
|
||||
SELECT @@global.interactive_timeout;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.interactive_timeout = test;
|
||||
@@ -115,11 +115,10 @@ SET @@session.interactive_timeout = 0;
|
||||
SELECT @@session.interactive_timeout;
|
||||
SET @@session.interactive_timeout = -2;
|
||||
SELECT @@session.interactive_timeout;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET @@session.interactive_timeout = 65530.34.;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.interactive_timeout = 65530.34;
|
||||
SET @@session.interactive_timeout = 100000000;
|
||||
SELECT @@session.interactive_timeout;
|
||||
echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.interactive_timeout = test;
|
||||
|
@@ -122,7 +122,7 @@ SET @@global.keep_files_on_create = FELSE;
|
||||
SET @@global.keep_files_on_create = -1024;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.keep_files_on_create = 65536;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.keep_files_on_create = 65530.34;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.keep_files_on_create = test;
|
||||
@@ -131,17 +131,14 @@ SET @@global.keep_files_on_create = test;
|
||||
SET @@session.keep_files_on_create = ONN;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.keep_files_on_create = ONF;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.keep_files_on_create = OF;
|
||||
SELECT @@session.keep_files_on_create;
|
||||
--echo 'Bug# 34828: FN_DYNVARS_054_05 - OF is also working as OFF and no error is coming';
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.keep_files_on_create = 'OFN';
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.keep_files_on_create = -2;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET @@session.keep_files_on_create = 65530.34.;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@session.keep_files_on_create = 65530.34;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@session.keep_files_on_create = 65550;
|
||||
|
||||
|
151
mysql-test/suite/sys_vars/t/key_buffer_size_basic.test
Normal file
151
mysql-test/suite/sys_vars/t/key_buffer_size_basic.test
Normal file
@@ -0,0 +1,151 @@
|
||||
############## mysql-test\t\key_buffer_size_basic.test ########################
|
||||
# #
|
||||
# Variable Name: key_buffer_size #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: numeric #
|
||||
# Default Value: 131072 #
|
||||
# Range:8-4294967295 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author: Salman #
|
||||
# #
|
||||
# Description: Test Cases of Dynamic System Variable key_buffer_size #
|
||||
# that checks the behavior of this variable in the following ways#
|
||||
# * Default Value #
|
||||
# * 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 #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
########################################################################
|
||||
# START OF key_buffer_size TESTS #
|
||||
########################################################################
|
||||
|
||||
########################################################################
|
||||
# Saving initial value of key_buffer_size in a temporary variable #
|
||||
########################################################################
|
||||
|
||||
SET @start_value = @@global.key_buffer_size;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_055_01------------------------#'
|
||||
########################################################################
|
||||
# Display the DEFAULT value of key_buffer_size #
|
||||
########################################################################
|
||||
|
||||
SET @@global.key_buffer_size = DEFAULT;
|
||||
SELECT @@global.key_buffer_size;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_055_02-------------------------#'
|
||||
###############################################
|
||||
# Verify default value of variable #
|
||||
###############################################
|
||||
|
||||
SET @@global.key_buffer_size = @start_value;
|
||||
SELECT @@global.key_buffer_size = @start_value;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_055_03------------------------#'
|
||||
########################################################################
|
||||
# Change the value of key_buffer_size to a valid value #
|
||||
########################################################################
|
||||
|
||||
SET @@global.key_buffer_size = 65535;
|
||||
SELECT @@global.key_buffer_size;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_055_04-------------------------#'
|
||||
###########################################################################
|
||||
# Change the value of key_buffer_size to invalid value #
|
||||
###########################################################################
|
||||
|
||||
--Error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
|
||||
SET @@global.key_buffer_size = -1;
|
||||
--Error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
|
||||
SET @@global.key_buffer_size = 4;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.key_buffer_size = 10000.01;
|
||||
SELECT @@global.key_buffer_size;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.key_buffer_size = ON;
|
||||
SELECT @@global.key_buffer_size;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.key_buffer_size = 'test';
|
||||
SELECT @@global.key_buffer_size;
|
||||
|
||||
--echo '#-------------------FN_DYNVARS_055_05----------------------------#'
|
||||
###########################################################################
|
||||
# Test if accessing session key_buffer_size gives error #
|
||||
###########################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET @@session.key_buffer_size = 0;
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_055_06------------------------#'
|
||||
##############################################################################
|
||||
# Check if the value in GLOBAL & SESSION Tables matches values in variable #
|
||||
##############################################################################
|
||||
|
||||
SELECT @@global.key_buffer_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='key_buffer_size';
|
||||
|
||||
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 #
|
||||
###################################################################
|
||||
|
||||
--Error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
|
||||
SET @@global.key_buffer_size = TRUE;
|
||||
--Error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
|
||||
SET @@global.key_buffer_size = FALSE;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_055_08----------------------#'
|
||||
#####################################################################
|
||||
# Check if accessing variable with SESSION,LOCAL and without SCOPE #
|
||||
# points to same session variable #
|
||||
#####################################################################
|
||||
|
||||
SELECT @@key_buffer_size = @@global.key_buffer_size;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_055_09----------------------#'
|
||||
##########################################################################
|
||||
# Check if key_buffer_size can be accessed with and without @@ sign #
|
||||
##########################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET key_buffer_size = 8 ;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET local.key_buffer_size = 10;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.key_buffer_size;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET global.key_buffer_size = 10;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT global.key_buffer_size;
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT key_buffer_size = @@session.key_buffer_size;
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
SET @@global.key_buffer_size = @start_value;
|
||||
|
||||
#######################################################################
|
||||
# END OF key_buffer_size TESTS #
|
||||
#######################################################################
|
||||
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 32 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_32bit.inc
|
||||
--source suite/sys_vars/inc/key_buffer_size_basic.inc
|
||||
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 64 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_64bit.inc
|
||||
--source suite/sys_vars/inc/key_buffer_size_basic.inc
|
||||
|
@@ -86,11 +86,6 @@ connection test_con2;
|
||||
--echo ## Key_reads must be zero (no disk access) ##
|
||||
show status like 'Key_reads';
|
||||
|
||||
CONNECTION default;
|
||||
--disable_warnings
|
||||
SET @@global.key_buffer_size = 36;
|
||||
--enable_warnings
|
||||
|
||||
--echo ## Connecting with connection test_con1 ##
|
||||
CONNECTION test_con1;
|
||||
|
||||
|
178
mysql-test/suite/sys_vars/t/key_cache_block_size_basic.test
Normal file
178
mysql-test/suite/sys_vars/t/key_cache_block_size_basic.test
Normal file
@@ -0,0 +1,178 @@
|
||||
############## mysql-test\t\key_cache_block_size_basic.test ###############
|
||||
# #
|
||||
# Variable Name: key_cache_block_size #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: numeric 1024 #
|
||||
# Default Value: #
|
||||
# Range: 512-16384 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author: Salman #
|
||||
# #
|
||||
# Description: Test Cases of Dynamic System Variable key_cache_block_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 #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
#####################################################################
|
||||
# START OF key_cache_block_size TESTS #
|
||||
#####################################################################
|
||||
|
||||
|
||||
##########################################################################
|
||||
# Saving initial value of key_cache_block_size in a temporary variable #
|
||||
##########################################################################
|
||||
|
||||
SET @start_value = @@global.key_cache_block_size;
|
||||
SELECT @start_value;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_057_01------------------------#'
|
||||
################################################################################
|
||||
# Display the DEFAULT value of key_cache_block_size #
|
||||
################################################################################
|
||||
|
||||
SET @@global.key_cache_block_size = DEFAULT;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_057_02-------------------------#'
|
||||
###############################################
|
||||
# Verify default value of variable #
|
||||
###############################################
|
||||
|
||||
SET @@global.key_cache_block_size = @start_value;
|
||||
SELECT @@global.key_cache_block_size = 1024;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_057_03------------------------#'
|
||||
###############################################################################
|
||||
# Change the value of key_cache_block_size to a valid value #
|
||||
###############################################################################
|
||||
|
||||
SET @@global.key_cache_block_size = 1024;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
SET @@global.key_cache_block_size = 16384;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
SET @@global.key_cache_block_size = 1800;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
SET @@global.key_cache_block_size = 16383;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_057_04-------------------------#'
|
||||
###########################################################################
|
||||
# Change the value of key_cache_block_size to invalid value #
|
||||
###########################################################################
|
||||
|
||||
SET @@global.key_cache_block_size = -1;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
SET @@global.key_cache_block_size = 42949672951;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.key_cache_block_size = 10000.01;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
SET @@global.key_cache_block_size = -1024;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
SET @@global.key_cache_block_size = 256;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
SET @@global.key_cache_block_size = 511;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
SET @@global.key_cache_block_size = 16385;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.key_cache_block_size = ON;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.key_cache_block_size = 'test';
|
||||
SELECT @@global.key_cache_block_size;
|
||||
|
||||
|
||||
--echo '#-------------------FN_DYNVARS_057_05----------------------------#'
|
||||
###########################################################################
|
||||
# Test if accessing session key_cache_block_size gives error #
|
||||
###########################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET @@session.key_cache_block_size = 0;
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@session.key_cache_block_size;
|
||||
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_057_06------------------------#'
|
||||
##############################################################################
|
||||
# Check if the value in GLOBAL & SESSION Tables matches values in variable #
|
||||
##############################################################################
|
||||
|
||||
SELECT @@global.key_cache_block_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='key_cache_block_size';
|
||||
|
||||
SELECT @@key_cache_block_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='key_cache_block_size';
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_057_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
SET @@global.key_cache_block_size = TRUE;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
SET @@global.key_cache_block_size = FALSE;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_057_08----------------------#'
|
||||
########################################################################################################
|
||||
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
|
||||
########################################################################################################
|
||||
|
||||
SET @@global.key_cache_block_size = 1024;
|
||||
SELECT @@key_cache_block_size = @@global.key_cache_block_size;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_057_09----------------------#'
|
||||
###############################################################################
|
||||
# Check if key_cache_block_size can be accessed with and without @@ sign #
|
||||
###############################################################################;
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET key_cache_block_size = 8000;
|
||||
SELECT @@key_cache_block_size;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET local.key_cache_block_size = 10;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.key_cache_block_size;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET global.key_cache_block_size = 10;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT global.key_cache_block_size;
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT key_cache_block_size = @@session.key_cache_block_size;
|
||||
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
SET @@global.key_cache_block_size = @start_value;
|
||||
SELECT @@global.key_cache_block_size;
|
||||
|
||||
|
||||
#####################################################################
|
||||
# END OF key_cache_block_size TESTS #
|
||||
#####################################################################
|
||||
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 32 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_32bit.inc
|
||||
--source suite/sys_vars/inc/key_cache_block_size_basic.inc
|
||||
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 64 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_64bit.inc
|
||||
--source suite/sys_vars/inc/key_cache_block_size_basic.inc
|
||||
|
179
mysql-test/suite/sys_vars/t/key_cache_division_limit_basic.test
Normal file
179
mysql-test/suite/sys_vars/t/key_cache_division_limit_basic.test
Normal file
@@ -0,0 +1,179 @@
|
||||
############## mysql-test\t\key_cache_division_limit_basic.test ###############
|
||||
# #
|
||||
# Variable Name: key_cache_division_limit #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: numeric #
|
||||
# Default Value: 100 #
|
||||
# Range: 1-100 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author: Salman #
|
||||
# #
|
||||
# Description: Test Cases of Dynamic System Variable key_cache_division_limit #
|
||||
# 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 #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
#####################################################################
|
||||
# START OF key_cache_division_limit TESTS #
|
||||
#####################################################################
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Saving initial value of key_cache_division_limit in a temporary variable #
|
||||
##############################################################################
|
||||
|
||||
SET @start_value = @@global.key_cache_division_limit;
|
||||
SELECT @start_value;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_058_01------------------------#'
|
||||
################################################################################
|
||||
# Display the DEFAULT value of key_cache_division_limit #
|
||||
################################################################################
|
||||
|
||||
SET @@global.key_cache_division_limit = DEFAULT;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_058_02-------------------------#'
|
||||
###############################################
|
||||
# Verify default value of variable #
|
||||
###############################################
|
||||
|
||||
SET @@global.key_cache_division_limit = @start_value;
|
||||
SELECT @@global.key_cache_division_limit = 100;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_058_03------------------------#'
|
||||
###############################################################################
|
||||
# Change the value of key_cache_division_limit to a valid value #
|
||||
###############################################################################
|
||||
|
||||
SET @@global.key_cache_division_limit = 1;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
SET @@global.key_cache_division_limit = 50;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
SET @@global.key_cache_division_limit = 99;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
SET @@global.key_cache_division_limit = 2;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_058_04-------------------------#'
|
||||
###########################################################################
|
||||
# Change the value of key_cache_division_limit to invalid value #
|
||||
###########################################################################
|
||||
|
||||
SET @@global.key_cache_division_limit = -1;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
SET @@global.key_cache_division_limit = 101;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.key_cache_division_limit = 10000.01;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
SET @@global.key_cache_division_limit = -1024;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
SET @@global.key_cache_division_limit = 0;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
SET @@global.key_cache_division_limit = 200;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
SET @@global.key_cache_division_limit = 65535;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.key_cache_division_limit = ON;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.key_cache_division_limit = 'test';
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
|
||||
|
||||
--echo '#-------------------FN_DYNVARS_058_05----------------------------#'
|
||||
###########################################################################
|
||||
# Test if accessing session key_cache_division_limit gives error #
|
||||
###########################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET @@session.key_cache_division_limit = 0;
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@session.key_cache_division_limit;
|
||||
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_058_06------------------------#'
|
||||
##############################################################################
|
||||
# Check if the value in GLOBAL & SESSION Tables matches values in variable #
|
||||
##############################################################################
|
||||
|
||||
SELECT @@global.key_cache_division_limit = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='key_cache_division_limit';
|
||||
|
||||
SELECT @@key_cache_division_limit = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='key_cache_division_limit';
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_058_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
SET @@global.key_cache_division_limit = TRUE;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
SET @@global.key_cache_division_limit = FALSE;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_058_08----------------------#'
|
||||
########################################################################################################
|
||||
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
|
||||
########################################################################################################
|
||||
|
||||
SET @@global.key_cache_division_limit = 90;
|
||||
SELECT @@key_cache_division_limit = @@global.key_cache_division_limit;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_058_09----------------------#'
|
||||
###############################################################################
|
||||
# Check if key_cache_division_limit can be accessed with and without @@ sign #
|
||||
###############################################################################;
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET key_cache_division_limit = 80;
|
||||
SELECT @@key_cache_division_limit;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET local.key_cache_division_limit = 10;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.key_cache_division_limit;
|
||||
--Error ER_PARSE_ERROR
|
||||
SET global.key_cache_division_limit = 10;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT global.key_cache_division_limit;
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT key_cache_division_limit = @@session.key_cache_division_limit;
|
||||
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
SET @@global.key_cache_division_limit = @start_value;
|
||||
SELECT @@global.key_cache_division_limit;
|
||||
|
||||
|
||||
#####################################################################
|
||||
# END OF key_cache_division_limit TESTS #
|
||||
#####################################################################
|
||||
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 32 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_32bit.inc
|
||||
--source suite/sys_vars/inc/key_cache_division_limit_basic.inc
|
||||
|
@@ -1,9 +0,0 @@
|
||||
################################################################################
|
||||
# Created by Horst Hunger 2008-05-07 #
|
||||
# #
|
||||
# Wrapper for 64 bit machines #
|
||||
################################################################################
|
||||
|
||||
--source include/have_64bit.inc
|
||||
--source suite/sys_vars/inc/key_cache_division_limit_basic.inc
|
||||
|
19
mysql-test/suite/sys_vars/t/large_files_support_basic.test
Normal file
19
mysql-test/suite/sys_vars/t/large_files_support_basic.test
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# only global
|
||||
#
|
||||
select @@global.large_files_support;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.large_files_support;
|
||||
show global variables like 'large_files_support';
|
||||
show session variables like 'large_files_support';
|
||||
select * from information_schema.global_variables where variable_name='large_files_support';
|
||||
select * from information_schema.session_variables where variable_name='large_files_support';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global large_files_support=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session large_files_support=1;
|
||||
|
23
mysql-test/suite/sys_vars/t/large_page_size_basic.test
Normal file
23
mysql-test/suite/sys_vars/t/large_page_size_basic.test
Normal file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# only global
|
||||
#
|
||||
select @@global.large_page_size = 1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.large_page_size;
|
||||
--replace_column 2 #
|
||||
show global variables like 'large_page_size';
|
||||
--replace_column 2 #
|
||||
show session variables like 'large_page_size';
|
||||
--replace_column 2 #
|
||||
select * from information_schema.global_variables where variable_name='large_page_size';
|
||||
--replace_column 2 #
|
||||
select * from information_schema.session_variables where variable_name='large_page_size';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global large_page_size=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session large_page_size=1;
|
||||
|
19
mysql-test/suite/sys_vars/t/large_pages_basic.test
Normal file
19
mysql-test/suite/sys_vars/t/large_pages_basic.test
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# show the global and session values;
|
||||
#
|
||||
select @@global.large_pages;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.large_pages;
|
||||
show global variables like 'large_pages';
|
||||
show session variables like 'large_pages';
|
||||
select * from information_schema.global_variables where variable_name='large_pages';
|
||||
select * from information_schema.session_variables where variable_name='large_pages';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global large_pages=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session large_pages=1;
|
||||
|
30
mysql-test/suite/sys_vars/t/last_insert_id_basic.test
Normal file
30
mysql-test/suite/sys_vars/t/last_insert_id_basic.test
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
#
|
||||
# exists as a session only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@global.last_insert_id;
|
||||
select @@session.last_insert_id;
|
||||
show global variables like 'last_insert_id';
|
||||
show session variables like 'last_insert_id';
|
||||
select * from information_schema.global_variables where variable_name='last_insert_id';
|
||||
select * from information_schema.session_variables where variable_name='last_insert_id';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set session last_insert_id=1;
|
||||
select @@session.last_insert_id;
|
||||
--error ER_LOCAL_VARIABLE
|
||||
set global last_insert_id=1;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set session last_insert_id=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set session last_insert_id=1e1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set session last_insert_id="foo";
|
||||
|
35
mysql-test/suite/sys_vars/t/lc_messages_basic.test
Normal file
35
mysql-test/suite/sys_vars/t/lc_messages_basic.test
Normal file
@@ -0,0 +1,35 @@
|
||||
SET @start_global_value = @@global.lc_messages;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global and session
|
||||
#
|
||||
select @@global.lc_messages;
|
||||
select @@session.lc_messages;
|
||||
show global variables like 'lc_messages';
|
||||
show session variables like 'lc_messages';
|
||||
select * from information_schema.global_variables where variable_name='lc_messages';
|
||||
select * from information_schema.session_variables where variable_name='lc_messages';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global lc_messages=1;
|
||||
select @@global.lc_messages;
|
||||
set session lc_messages=2;
|
||||
select @@session.lc_messages;
|
||||
set global lc_messages="en_US";
|
||||
select @@global.lc_messages;
|
||||
set session lc_messages="en_GB";
|
||||
select @@session.lc_messages;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global lc_messages=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global lc_messages=1e1;
|
||||
|
||||
SET @@global.lc_messages = @start_global_value;
|
||||
SELECT @@global.lc_messages;
|
23
mysql-test/suite/sys_vars/t/lc_messages_dir_basic.test
Normal file
23
mysql-test/suite/sys_vars/t/lc_messages_dir_basic.test
Normal file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# only global
|
||||
#
|
||||
--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
|
||||
select @@global.lc_messages_dir;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.lc_messages_dir;
|
||||
--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
|
||||
show global variables like 'lc_messages_dir';
|
||||
--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
|
||||
show session variables like 'lc_messages_dir';
|
||||
--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
|
||||
select * from information_schema.global_variables where variable_name='lc_messages_dir';
|
||||
--replace_result $MYSQL_SHAREDIR MYSQL_SHAREDIR
|
||||
select * from information_schema.session_variables where variable_name='lc_messages_dir';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global lc_messages_dir=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session lc_messages_dir=1;
|
@@ -178,7 +178,7 @@ SELECT @@session.lc_time_names;
|
||||
SET @@session.lc_time_names=de_LU;
|
||||
SELECT @@session.lc_time_names;
|
||||
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--error ER_UNKNOWN_LOCALE
|
||||
SET @@session.lc_time_names=EE;
|
||||
--echo 'Bug: The locale for Estonian - Estonia is not supported. It is present';
|
||||
--echo 'in manual';
|
||||
@@ -322,6 +322,8 @@ SET @@session.lc_time_names=sr_YU;
|
||||
SELECT @@session.lc_time_names;
|
||||
SET @@session.lc_time_names=sv_FI;
|
||||
SELECT @@session.lc_time_names;
|
||||
SET @@session.lc_time_names=sr_RS;
|
||||
SELECT @@session.lc_time_names;
|
||||
SET @@session.lc_time_names=sv_SE;
|
||||
SELECT @@session.lc_time_names;
|
||||
SET @@session.lc_time_names=ta_IN;
|
||||
@@ -407,7 +409,7 @@ SELECT @@global.lc_time_names;
|
||||
SET @@global.lc_time_names=de_LU;
|
||||
SELECT @@global.lc_time_names;
|
||||
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--error ER_UNKNOWN_LOCALE
|
||||
SET @@global.lc_time_names=EE;
|
||||
--echo 'Bug: The locale for Estonian - Estonia is not supported. It is';
|
||||
--echo 'present in manual';
|
||||
@@ -553,6 +555,8 @@ SET @@global.lc_time_names=sr_YU;
|
||||
SELECT @@global.lc_time_names;
|
||||
SET @@global.lc_time_names=sv_FI;
|
||||
SELECT @@global.lc_time_names;
|
||||
SET @@global.lc_time_names=sr_RS;
|
||||
SELECT @@global.lc_time_names;
|
||||
SET @@global.lc_time_names=sv_SE;
|
||||
SELECT @@global.lc_time_names;
|
||||
SET @@global.lc_time_names=ta_IN;
|
||||
@@ -616,27 +620,27 @@ SET @@lc_time_names = 107;
|
||||
SELECT @@lc_time_names;
|
||||
SET @@lc_time_names = 108;
|
||||
SELECT @@lc_time_names;
|
||||
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
SET @@lc_time_names = 109;
|
||||
|
||||
SELECT @@lc_time_names;
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@lc_time_names = 110;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_060_10-------------------------#'
|
||||
#############################################################################
|
||||
# Change the value of lc_time_names to an invalid value for session #
|
||||
#############################################################################
|
||||
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@lc_time_names = en_EN;
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@lc_time_names = US_en;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@lc_time_names = 1.1;
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@lc_time_names = -1;
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@lc_time_names = 'en US';
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@lc_time_names = 'enUS';
|
||||
|
||||
SET @@lc_time_names = true;
|
||||
@@ -644,7 +648,7 @@ SELECT @@lc_time_names AS res_with_true;
|
||||
SET @@lc_time_names = false;
|
||||
SELECT @@lc_time_names AS res_with_false;
|
||||
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@lc_time_names = ON;
|
||||
|
||||
|
||||
@@ -653,17 +657,17 @@ SET @@lc_time_names = ON;
|
||||
# Change the value of lc_time_names to an invalid value for global #
|
||||
############################################################################
|
||||
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@global.lc_time_names = en_EN;
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@global.lc_time_names = US_en;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.lc_time_names = 1.1;
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@global.lc_time_names = -1;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.lc_time_names = NULL;
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@global.lc_time_names = 'enUS';
|
||||
|
||||
SET @@global.lc_time_names = true;
|
||||
@@ -671,7 +675,7 @@ SELECT @@global.lc_time_names;
|
||||
SET @@global.lc_time_names = false;
|
||||
SELECT @@global.lc_time_names;
|
||||
|
||||
--Error ER_UNKNOWN_ERROR
|
||||
--Error ER_UNKNOWN_LOCALE
|
||||
SET @@global.lc_time_names = ON;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_060_12-------------------------#'
|
||||
|
20
mysql-test/suite/sys_vars/t/locked_in_memory_basic.test
Normal file
20
mysql-test/suite/sys_vars/t/locked_in_memory_basic.test
Normal file
@@ -0,0 +1,20 @@
|
||||
--source include/not_windows.inc
|
||||
#
|
||||
# only global
|
||||
#
|
||||
select @@global.locked_in_memory;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.locked_in_memory;
|
||||
show global variables like 'locked_in_memory';
|
||||
show session variables like 'locked_in_memory';
|
||||
select * from information_schema.global_variables where variable_name='locked_in_memory';
|
||||
select * from information_schema.session_variables where variable_name='locked_in_memory';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global locked_in_memory=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session locked_in_memory=1;
|
||||
|
@@ -41,13 +41,9 @@ SELECT @@global.log AS INIT_VALUE;
|
||||
|
||||
SELECT @@log AS INIT_VALUE;
|
||||
|
||||
SET @@global.general_log = ON;
|
||||
|
||||
SET global general_log = 0;
|
||||
|
||||
--echo 'Bug# 34832: log is a system but it is not accessible using SET @@global.log;'
|
||||
--echo 'SET GLOBAL log; and SELECT @@global.log. SHOW VARIABLES shows the value of log.'
|
||||
SET @@global.log = ON;
|
||||
|
||||
SET global log = 0;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_062_02-------------------------#'
|
||||
################################################################################
|
||||
|
19
mysql-test/suite/sys_vars/t/log_bin_basic.test
Normal file
19
mysql-test/suite/sys_vars/t/log_bin_basic.test
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# only global
|
||||
#
|
||||
select @@global.log_bin;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.log_bin;
|
||||
show global variables like 'log_bin';
|
||||
show session variables like 'log_bin';
|
||||
select * from information_schema.global_variables where variable_name='log_bin';
|
||||
select * from information_schema.session_variables where variable_name='log_bin';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global log_bin=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session log_bin=1;
|
||||
|
@@ -37,10 +37,6 @@
|
||||
|
||||
SET @start_global_value = @@global.log_bin_trust_function_creators;
|
||||
SELECT @start_global_value;
|
||||
--echo 'Bug# 34876: TRUE value is coming as Default'
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @start_session_value = @@session.log_bin_trust_function_creators;
|
||||
--echo 'Bug# 34881: According to documentation the scope of this variable is GLOBAL as well as SESSION too';
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_063_01-------------------------#'
|
||||
########################################################################
|
||||
@@ -99,10 +95,8 @@ SELECT @@session.log_bin_trust_function_creators;
|
||||
SET @@global.log_bin_trust_function_creators = 'ONN';
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_function_creators = "OFFF";
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_function_creators = OF;
|
||||
|
||||
--echo 'Bug# 34828: OF is also working as OFF and no error is coming';
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_function_creators = TTRUE;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
@@ -111,7 +105,7 @@ SET @@global.log_bin_trust_function_creators = FELSE;
|
||||
SET @@global.log_bin_trust_function_creators = -1024;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_function_creators = 65536;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.log_bin_trust_function_creators = 65530.34;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_function_creators = test;
|
||||
|
@@ -1,164 +0,0 @@
|
||||
############## mysql-test\t\log_bin_trust_routine_creators_basic.test #########
|
||||
# #
|
||||
# Variable Name: log_bin_trust_routine_creators #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: boolean #
|
||||
# Default Value: False #
|
||||
# Range: #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-12 #
|
||||
# Author: Salman #
|
||||
# #
|
||||
# Description: Test Cases of Dynamic System Variable #
|
||||
# log_bin_trust_routine_creators that checks the #
|
||||
# behavior of this variable in the following ways #
|
||||
# * Default Value #
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# #
|
||||
# Reference: (Not given on website) #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/load_sysvars.inc
|
||||
####################################################################
|
||||
# START OF log_bin_trust_routine_creators TESTS #
|
||||
####################################################################
|
||||
|
||||
|
||||
#############################################################
|
||||
# Save initial value #
|
||||
#############################################################
|
||||
|
||||
SET @start_global_value = @@global.log_bin_trust_routine_creators;
|
||||
SELECT @start_global_value;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_064_01-------------------------#'
|
||||
########################################################################
|
||||
# Display the DEFAULT value of log_bin_trust_routine_creators #
|
||||
########################################################################
|
||||
|
||||
SET @@global.log_bin_trust_routine_creators = TRUE;
|
||||
SET @@global.log_bin_trust_routine_creators = DEFAULT;
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_064_02-------------------------#'
|
||||
##############################################################################
|
||||
# Check the DEFAULT value of log_bin_trust_routine_creators #
|
||||
##############################################################################
|
||||
|
||||
SET @@global.log_bin_trust_routine_creators = DEFAULT;
|
||||
SELECT @@global.log_bin_trust_routine_creators = 'FALSE';
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_064_03-------------------------#'
|
||||
##################################################################
|
||||
# Change the value of variable to a valid value for GLOBAL Scope #
|
||||
##################################################################
|
||||
|
||||
SET @@global.log_bin_trust_routine_creators = ON;
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
SET @@global.log_bin_trust_routine_creators = OFF;
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
SET @@global.log_bin_trust_routine_creators = 0;
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
SET @@global.log_bin_trust_routine_creators = 1;
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
SET @@global.log_bin_trust_routine_creators = TRUE;
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
SET @@global.log_bin_trust_routine_creators = FALSE;
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
|
||||
|
||||
--echo '#-------------------FN_DYNVARS_064_04----------------------------#'
|
||||
###########################################################################
|
||||
# Test if accessing session log_bin_trust_routine_creators gives error #
|
||||
###########################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET @@session.log_bin_trust_routine_creators = 0;
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@session.log_bin_trust_routine_creators;
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_064_05-----------------------#'
|
||||
##########################################################################
|
||||
# Change the value of log_bin_trust_routine_creators to an invalid value #
|
||||
##########################################################################
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_routine_creators = 'ONN';
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_routine_creators = "OFFF";
|
||||
SET @@global.log_bin_trust_routine_creators = OF;
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
--echo 'Bug# 34828: OF is also working as OFF and no error is coming';
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_routine_creators = TTRUE;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_routine_creators = FELSE;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_routine_creators = -1024;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_routine_creators = 65536;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_routine_creators = 65530.34;
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_bin_trust_routine_creators = test;
|
||||
|
||||
|
||||
--echo '#------------------FN_DYNVARS_064_06-----------------------#'
|
||||
###############################################################################
|
||||
# Check if the value in GLOBAL & SESSION Tables matches value in variable #
|
||||
###############################################################################
|
||||
|
||||
|
||||
SELECT @@global.log_bin_trust_routine_creators = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='log_bin_trust_routine_creators';
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@session.log_bin_trust_routine_creators = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='log_bin_trust_routine_creators';
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_064_07----------------------#'
|
||||
#################################################################################
|
||||
# Check if accessing variable with and without GLOBAL point to same variable #
|
||||
#################################################################################
|
||||
|
||||
|
||||
SET @@global.log_bin_trust_routine_creators = TRUE;
|
||||
SELECT @@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators;
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_064_08----------------------#'
|
||||
###################################################################
|
||||
# Check if variable can be accessed with and without @@ sign #
|
||||
###################################################################
|
||||
|
||||
SET @@global.log_bin_trust_routine_creators = TRUE;
|
||||
SELECT @@log_bin_trust_routine_creators;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.log_bin_trust_routine_creators;
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT session.log_bin_trust_routine_creators;
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT log_bin_trust_routine_creators = @@session.log_bin_trust_routine_creators;
|
||||
|
||||
|
||||
####################################
|
||||
# Restore initial value #
|
||||
####################################
|
||||
|
||||
SET @@global.log_bin_trust_routine_creators = @start_global_value;
|
||||
SELECT @@global.log_bin_trust_routine_creators;
|
||||
|
||||
|
||||
###################################################################
|
||||
# END OF log_bin_trust_routine_creators TESTS #
|
||||
###################################################################
|
||||
|
18
mysql-test/suite/sys_vars/t/log_error_basic.test
Normal file
18
mysql-test/suite/sys_vars/t/log_error_basic.test
Normal file
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# only global
|
||||
#
|
||||
select @@global.log_error;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.log_error;
|
||||
show global variables like 'log_error';
|
||||
show session variables like 'log_error';
|
||||
select * from information_schema.global_variables where variable_name='log_error';
|
||||
select * from information_schema.session_variables where variable_name='log_error';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global log_error=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session log_error=1;
|
@@ -46,10 +46,6 @@ SELECT @start_value;
|
||||
SET @@global.log_output = FILE;
|
||||
SET @@global.log_output = DEFAULT;
|
||||
SELECT @@global.log_output;
|
||||
--echo 'Bug# 34876: Documentation specifies a DEFAULT value of TABLE whereas';
|
||||
--echo 'DEFAULT value is FILE. Also note that initial value is different';
|
||||
--echo 'from DEFAULT';
|
||||
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_065_02-------------------------#'
|
||||
##################################################
|
||||
@@ -61,9 +57,6 @@ SET @@global.log_output = NULL;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_output = "";
|
||||
SELECT @@global.log_output;
|
||||
--echo 'Bug# 34838: Empty value is allowed where as it is not specified in';
|
||||
--echo 'documentation';
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_065_03------------------------#'
|
||||
########################################################################
|
||||
@@ -103,9 +96,6 @@ SELECT @@global.log_output;
|
||||
SET @@global.log_output = ',TABLE';
|
||||
SELECT @@global.log_output;
|
||||
|
||||
SET @@global.log_output = ',';
|
||||
SELECT @@global.log_output;
|
||||
|
||||
SET @@global.log_output = 'TABLE,,FILE,,,';
|
||||
SELECT @@global.log_output;
|
||||
|
||||
@@ -117,34 +107,26 @@ SELECT @@global.log_output;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_output = -1;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_output = TAB;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_output = NIL;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_output = 'FIL';
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_output = 'T';
|
||||
|
||||
# use of space in value
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_output = 'TABLE, FILE';
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_output = ' TABLE,FILE';
|
||||
|
||||
SET @@global.log_output = ', ';
|
||||
SELECT @@global.log_output;
|
||||
SET @@global.log_output = ' ';
|
||||
SELECT @@global.log_output;
|
||||
SET @@global.log_output = ' ';
|
||||
SELECT @@global.log_output;
|
||||
|
||||
--echo 'Bug: The behavior of space in value is not consistent.';
|
||||
--echo 'Some times it is trimmed and some times not.';
|
||||
--echo 'The space before and after value is not accepted where as space';
|
||||
--echo 'between comma is accepted.';
|
||||
|
||||
|
||||
--echo '#-------------------FN_DYNVARS_065_05----------------------------#'
|
||||
######################################################################
|
||||
# Test if accessing session log_output gives error #
|
||||
@@ -208,6 +190,7 @@ SET @@global.log_output = 8;
|
||||
|
||||
SET @@global.log_output = TRUE;
|
||||
SELECT @@global.log_output;
|
||||
|
||||
--Error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_output = FALSE;
|
||||
SELECT @@global.log_output;
|
||||
|
@@ -56,30 +56,12 @@ SELECT @@global.log_queries_not_using_indexes;
|
||||
SET GLOBAL log_queries_not_using_indexes= -0;
|
||||
SELECT @@global.log_queries_not_using_indexes;
|
||||
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET GLOBAL log_queries_not_using_indexes= 0.00;
|
||||
SELECT @@global.log_queries_not_using_indexes;
|
||||
|
||||
SET GLOBAL log_queries_not_using_indexes= -0.0;
|
||||
SELECT @@global.log_queries_not_using_indexes;
|
||||
|
||||
SET GLOBAL log_queries_not_using_indexes= 001.00;
|
||||
SELECT @@global.log_queries_not_using_indexes;
|
||||
|
||||
SET GLOBAL log_queries_not_using_indexes= +1.0;
|
||||
SELECT @@global.log_queries_not_using_indexes;
|
||||
|
||||
SET GLOBAL log_queries_not_using_indexes= +0;
|
||||
SELECT @@global.log_queries_not_using_indexes;
|
||||
|
||||
SET GLOBAL log_queries_not_using_indexes= +0.000000;
|
||||
SELECT @@global.log_queries_not_using_indexes;
|
||||
|
||||
SET GLOBAL log_queries_not_using_indexes= 0000.00000;
|
||||
SELECT @@global.log_queries_not_using_indexes;
|
||||
|
||||
SET GLOBAL log_queries_not_using_indexes= .0;
|
||||
SELECT @@global.log_queries_not_using_indexes;
|
||||
|
||||
#################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#################################################################
|
||||
@@ -96,9 +78,6 @@ SET @@global.log_queries_not_using_indexes= BLABLA;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_queries_not_using_indexes= 25;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@global.log_queries_not_using_indexes= 12.34;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET GLOBAL log_queries_not_using_indexes= -1;
|
||||
|
||||
@@ -127,7 +106,5 @@ SET @@global log_queries_not_using_indexes= TRUE;
|
||||
--error ER_PARSE_ERROR
|
||||
SET @@SESSION log_queries_not_using_indexes= TRUE;
|
||||
|
||||
|
||||
SET @@global.log_queries_not_using_indexes= @start_value;
|
||||
SELECT IF(@@GLOBAL.log_queries_not_using_indexes, "ON", "OFF") = VARIABLE_VALUE
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user