System variable tests delivered by Folio3 (see WL4288).

This commit is contained in:
hhunger@hh-nb.hungers 2008-04-10 15:14:28 +02:00
parent 59fc28cfc4
commit afd90d6166
517 changed files with 71653 additions and 0 deletions

View file

@ -3020,3 +3020,6 @@ mysql-test/.DS_Store
libmysqld/sql_profile.cc
mysql-test/suite/funcs_1.tar.zip
mysql-test/reg.log
mysql-test/linux_sys_vars.inc
mysql-test/load_sysvars.inc
mysql-test/windows_sys_vars.inc

View file

@ -0,0 +1,80 @@
#
# This auxiliary script is used by character set test cases.
#
eval SET $charset_variable = big5;
eval SELECT $charset_variable;
eval SET $charset_variable = dec8;
eval SELECT $charset_variable;
eval SET $charset_variable = cp850;
eval SELECT $charset_variable;
eval SET $charset_variable = hp8;
eval SELECT $charset_variable;
eval SET $charset_variable = koi8r;
eval SELECT $charset_variable;
eval SET $charset_variable = latin1;
eval SELECT $charset_variable;
eval SET $charset_variable = latin2;
eval SELECT $charset_variable;
eval SET $charset_variable = swe7;
eval SELECT $charset_variable;
eval SET $charset_variable = ascii;
eval SELECT $charset_variable;
eval SET $charset_variable = ujis;
eval SELECT $charset_variable;
eval SET $charset_variable = sjis;
eval SELECT $charset_variable;
eval SET $charset_variable = hebrew;
eval SELECT $charset_variable;
eval SET $charset_variable = tis620;
eval SELECT $charset_variable;
eval SET $charset_variable = euckr;
eval SELECT $charset_variable;
eval SET $charset_variable = koi8u;
eval SELECT $charset_variable;
eval SET $charset_variable = gb2312;
eval SELECT $charset_variable;
eval SET $charset_variable = greek;
eval SELECT $charset_variable;
eval SET $charset_variable = cp1250;
eval SELECT $charset_variable;
eval SET $charset_variable = gbk;
eval SELECT $charset_variable;
eval SET $charset_variable = latin5;
eval SELECT $charset_variable;
eval SET $charset_variable = armscii8;
eval SELECT $charset_variable;
eval SET $charset_variable = utf8;
eval SELECT $charset_variable;
# Error with Linux
--error 0,ER_WRONG_VALUE_FOR_VAR
eval SET $charset_variable = ucs2;
eval SELECT $charset_variable;
eval SET $charset_variable = cp866;
eval SELECT $charset_variable;
eval SET $charset_variable = keybcs2;
eval SELECT $charset_variable;
eval SET $charset_variable = macce;
eval SELECT $charset_variable;
eval SET $charset_variable = macroman;
eval SELECT $charset_variable;
eval SET $charset_variable = cp852;
eval SELECT $charset_variable;
eval SET $charset_variable = latin7;
eval SELECT $charset_variable;
eval SET $charset_variable = cp1251;
eval SELECT $charset_variable;
eval SET $charset_variable = cp1256;
eval SELECT $charset_variable;
eval SET $charset_variable = cp1257;
eval SELECT $charset_variable;
eval SET $charset_variable = binary;
eval SELECT $charset_variable;
eval SET $charset_variable = geostd8;
eval SELECT $charset_variable;
eval SET $charset_variable = cp932;
eval SELECT $charset_variable;
eval SET $charset_variable = eucjpms;
eval SELECT $charset_variable;

View file

@ -0,0 +1,258 @@
#
# This auxiliary file is used by collation variables
#
eval SET $collation_variable = big5_chinese_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = big5_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = dec8_swedish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = dec8_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = cp850_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = cp850_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = hp8_english_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = hp8_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = koi8r_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = koi8r_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = latin1_german1_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = latin1_swedish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = latin1_danish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = latin1_german2_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = latin1_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = latin1_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = latin1_general_cs;
eval SELECT $collation_variable;
eval SET $collation_variable = latin1_spanish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = latin2_czech_cs;
eval SELECT $collation_variable;
eval SET $collation_variable = latin2_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = latin2_hungarian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = latin2_croatian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = latin2_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = swe7_swedish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = swe7_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = ascii_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ascii_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = ujis_japanese_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ujis_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = sjis_japanese_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = sjis_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = hebrew_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = hebrew_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = tis620_thai_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = tis620_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = euckr_korean_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = euckr_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = koi8u_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = koi8u_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = gb2312_chinese_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = gb2312_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = greek_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = greek_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1250_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1250_czech_cs;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1250_croatian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1250_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1250_polish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = gbk_chinese_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = gbk_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = latin5_turkish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = latin5_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = armscii8_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = armscii8_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_unicode_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_icelandic_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_latvian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_romanian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_slovenian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_polish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_estonian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_spanish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_swedish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_turkish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_czech_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_danish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_lithuanian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_slovak_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_spanish2_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_roman_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_persian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_esperanto_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = utf8_hungarian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_unicode_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_icelandic_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_latvian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_romanian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_slovenian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_polish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_estonian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_spanish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_swedish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_turkish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_czech_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_danish_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_lithuanian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_slovak_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_spanish2_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_roman_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_persian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_esperanto_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = ucs2_hungarian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = cp866_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = cp866_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = keybcs2_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = keybcs2_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = macce_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = macce_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = macroman_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = macroman_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = cp852_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = cp852_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = latin7_estonian_cs;
eval SELECT $collation_variable;
eval SET $collation_variable = latin7_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = latin7_general_cs;
eval SELECT $collation_variable;
eval SET $collation_variable = latin7_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1251_bulgarian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1251_ukrainian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1251_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1251_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1251_general_cs;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1256_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1256_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1257_lithuanian_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1257_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = cp1257_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = binary;
eval SELECT $collation_variable;
eval SET $collation_variable = geostd8_general_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = geostd8_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = cp932_japanese_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = cp932_bin;
eval SELECT $collation_variable;
eval SET $collation_variable = eucjpms_japanese_ci;
eval SELECT $collation_variable;
eval SET $collation_variable = eucjpms_bin;
eval SELECT $collation_variable;

View file

@ -0,0 +1,34 @@
#
# This file contains default,min and max values for sys variables for redhat linux
#
--disable_query_log
SET @default_flush_time = 0;
SET @min_flush_time = 0;
#SET @max_flush_time = 0;
SET @default_key_buffer_size = 131072;
SET @min_key_buffer_size = 36;
#SET @default_join_buffer_size = 131072;
#SET @min_join_buffer_size = 8200;
#SET @max_join_buffer_size = 4294967295;
SET @default_max_join_size = 4294967295;
SET @min_max_join_size = 1;
SET @max_max_join_size = 4294967295;
SET @default_sql_max_join_size = 4294967295;
SET @min_sql_max_join_size = 1;
SET @max_sql_max_join_size = 4294967295;
SET @default_sql_select_limit = 4294967295;
SET @min_sql_select_limit = 0;
SET @max_sql_select_limit = 4294967295;
SET @default_wait_timeout= 28800;
SET @min_wait_timeout= 1;
SET @max_wait_timeout= 31536000;
--enable_query_log

View file

@ -0,0 +1,14 @@
#
# This script is included by every test to include system dependant variables'
# default, minimum and maximum values
#
if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows")`)
{
--source include/windows_sys_vars.inc
}
if (`select convert(@@version_compile_os using latin1) IN ("suse-linux-gnu","redhat-linux-gnu","pc-solaris2.10")`)
{
--source include/linux_sys_vars.inc
}

View file

@ -0,0 +1,34 @@
#
# This file contains default,min and max values for sys variables for windows
#
--disable_query_log
SET @default_flush_time = 1800;
SET @min_flush_time = 0;
#SET @max_flush_time = 0;
SET @default_key_buffer_size= 131072;
SET @min_key_buffer_size= 8;
#SET @default_join_buffer_size = 131072;
#SET @min_join_buffer_size = 8200;
#SET @max_join_buffer_size = 4294967295;
SET @default_max_join_size = 4294967295;
SET @min_max_join_size = 1;
SET @max_max_join_size = 4294967295;
SET @default_sql_max_join_size = 4294967295;
SET @min_sql_max_join_size = 1;
SET @max_sql_max_join_size = 4294967295;
SET @default_sql_select_limit = 4294967295;
SET @min_sql_select_limit = 0;
SET @max_sql_select_limit = 4294967295;
let $default_wait_timeout = 28800;
let $min_wait_timeout = 1;
let $max_wait_timeout = 2147483;
--enable_query_log

View file

@ -0,0 +1,117 @@
SET @start_value = @@autocommit;
SELECT @start_value;
@start_value
1
'#--------------------FN_DYNVARS_003_01------------------------#'
SET @@autocommit = 0;
SET @@autocommit = DEFAULT;
SELECT @@autocommit;
@@autocommit
0
'Bug: variable DEFAULT value not working and is not throwing error'
'#---------------------FN_DYNVARS_003_02-------------------------#'
SET @@autocommit = @start_value;
SELECT @@autocommit = 1;
@@autocommit = 1
1
'#--------------------FN_DYNVARS_003_03------------------------#'
SET @@autocommit = 0;
SELECT @@autocommit;
@@autocommit
0
SET @@autocommit = 1;
SELECT @@autocommit;
@@autocommit
1
'#--------------------FN_DYNVARS_003_04-------------------------#'
SET @@autocommit = 2;
ERROR 42000: Variable 'autocommit' can't be set to the value of '2'
SET @@autocommit = -1;
ERROR 42000: Variable 'autocommit' can't be set to the value of '-1'
SET @@autocommit = TRUEF;
ERROR 42000: Variable 'autocommit' can't be set to the value of 'TRUEF'
SET @@autocommit = TRUE_F;
ERROR 42000: Variable 'autocommit' can't be set to the value of 'TRUE_F'
SET @@autocommit = FALSE0;
ERROR 42000: Variable 'autocommit' can't be set to the value of 'FALSE0'
SET @@autocommit = OON;
ERROR 42000: Variable 'autocommit' can't be set to the value of 'OON'
SET @@autocommit = ONN;
ERROR 42000: Variable 'autocommit' can't be set to the value of 'ONN'
SET @@autocommit = OOFF;
ERROR 42000: Variable 'autocommit' can't be set to the value of 'OOFF'
SET @@autocommit = 0FF;
ERROR 42000: Variable 'autocommit' can't be set to the value of '0FF'
SET @@autocommit = ' ';
ERROR 42000: Variable 'autocommit' can't be set to the value of ' '
SET @@autocommit = " ";
ERROR 42000: Variable 'autocommit' can't be set to the value of ' '
SET @@autocommit = '';
ERROR 42000: Variable 'autocommit' can't be set to the value of ''
'#-------------------FN_DYNVARS_003_05----------------------------#'
SET @@global.autocommit = 0;
ERROR HY000: Variable 'autocommit' is a SESSION variable and can't be used with SET GLOBAL
SELECT @@global.autocommit;
ERROR HY000: Variable 'autocommit' is a SESSION variable
'#----------------------FN_DYNVARS_003_06------------------------#'
SELECT @@session.autocommit = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='autocommit';
@@session.autocommit = VARIABLE_VALUE
0
Bug # 34839: Values in variable and information_schema do not match for autocommit
'#----------------------FN_DYNVARS_003_07------------------------#'
SET @@autocommit = 1;
SELECT @@autocommit = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='autocommit';
@@autocommit = VARIABLE_VALUE
0
'#---------------------FN_DYNVARS_003_08-------------------------#'
SET @@autocommit = OFF;
SELECT @@autocommit;
@@autocommit
0
SET @@autocommit = ON;
SELECT @@autocommit;
@@autocommit
1
'#---------------------FN_DYNVARS_003_09----------------------#'
SET @@autocommit = TRUE;
SELECT @@autocommit;
@@autocommit
1
SET @@autocommit = FALSE;
SELECT @@autocommit;
@@autocommit
0
'#---------------------FN_DYNVARS_003_10----------------------#'
SET @@autocommit = 0;
SELECT @@autocommit = @@local.autocommit;
@@autocommit = @@local.autocommit
1
SELECT @@local.autocommit = @@session.autocommit;
@@local.autocommit = @@session.autocommit
1
SET @@autocommit = 1;
SELECT @@autocommit = @@local.autocommit;
@@autocommit = @@local.autocommit
1
SELECT @@session.autocommit = @@autocommit;
@@session.autocommit = @@autocommit
1
'#---------------------FN_DYNVARS_003_11----------------------#'
SET autocommit = 1;
SELECT @@autocommit;
@@autocommit
1
SELECT local.autocommit;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.autocommit;
ERROR 42S02: Unknown table 'session' in field list
SELECT autocommit = @@session.autocommit;
ERROR 42S22: Unknown column 'autocommit' in 'field list'
SET @@autocommit = @start_value;
SELECT @@autocommit;
@@autocommit
1

View file

@ -0,0 +1,165 @@
SET @start_global_value = @@global.auto_increment_increment;
SELECT @start_global_value;
@start_global_value
1
SET @start_session_value = @@session.auto_increment_increment;
SELECT @start_session_value;
@start_session_value
1
'#--------------------FN_DYNVARS_001_01-------------------------#'
SET @@global.auto_increment_increment = 100;
SET @@global.auto_increment_increment = DEFAULT;
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
1
SET @@session.auto_increment_increment = 200;
SET @@session.auto_increment_increment = DEFAULT;
SELECT @@session.auto_increment_increment;
@@session.auto_increment_increment
1
'#--------------------FN_DYNVARS_001_02-------------------------#'
SET @@global.auto_increment_increment = DEFAULT;
SELECT @@global.auto_increment_increment = 1;
@@global.auto_increment_increment = 1
1
SET @@session.auto_increment_increment = DEFAULT;
SELECT @@session.auto_increment_increment = 1;
@@session.auto_increment_increment = 1
1
'#--------------------FN_DYNVARS_001_03-------------------------#'
SET @@global.auto_increment_increment = 1;
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
1
SET @@global.auto_increment_increment = 60020;
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
60020
SET @@global.auto_increment_increment = 65535;
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
65535
'#--------------------FN_DYNVARS_001_04-------------------------#'
SET @@session.auto_increment_increment = 1;
SELECT @@session.auto_increment_increment;
@@session.auto_increment_increment
1
SET @@session.auto_increment_increment = 50050;
SELECT @@session.auto_increment_increment;
@@session.auto_increment_increment
50050
SET @@session.auto_increment_increment = 65535;
SELECT @@session.auto_increment_increment;
@@session.auto_increment_increment
65535
'#------------------FN_DYNVARS_001_05-----------------------#'
SET @@global.auto_increment_increment = 0;
Warnings:
Warning 1292 Truncated incorrect auto-increment-increment value: '0'
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
1
SET @@global.auto_increment_increment = -1024;
Warnings:
Warning 1292 Truncated incorrect auto-increment-increment value: '0'
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
1
SET @@global.auto_increment_increment = 65536;
Warnings:
Warning 1292 Truncated incorrect auto_increment_increment value: '65536'
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
65535
SET @@global.auto_increment_increment = 65530.34.;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
65535
SET @@global.auto_increment_increment = test;
ERROR 42000: Incorrect argument type to variable 'auto_increment_increment'
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
65535
SET @@session.auto_increment_increment = 0;
Warnings:
Warning 1292 Truncated incorrect auto-increment-increment value: '0'
SELECT @@session.auto_increment_increment;
@@session.auto_increment_increment
1
SET @@session.auto_increment_increment = -2;
Warnings:
Warning 1292 Truncated incorrect auto-increment-increment value: '0'
SELECT @@session.auto_increment_increment;
@@session.auto_increment_increment
1
SET @@session.auto_increment_increment = 65530.34.;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
SET @@session.auto_increment_increment = 65550;
Warnings:
Warning 1292 Truncated incorrect auto_increment_increment value: '65550'
SELECT @@session.auto_increment_increment;
@@session.auto_increment_increment
65535
'Bug # 34837: Errors are not coming on assigning invalid values to variable';
SET @@session.auto_increment_increment = test;
ERROR 42000: Incorrect argument type to variable 'auto_increment_increment'
SELECT @@session.auto_increment_increment;
@@session.auto_increment_increment
65535
'#------------------FN_DYNVARS_001_06-----------------------#'
SELECT @@global.auto_increment_increment = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='auto_increment_increment';
@@global.auto_increment_increment = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_001_07-----------------------#'
SELECT @@session.auto_increment_increment = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='auto_increment_increment';
@@session.auto_increment_increment = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_001_08-----------------------#'
SET @@global.auto_increment_increment = TRUE;
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
1
SET @@global.auto_increment_increment = FALSE;
Warnings:
Warning 1292 Truncated incorrect auto-increment-increment value: '0'
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
1
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@global.auto_increment_increment = 10;
SET @@session.auto_increment_increment = 11;
SELECT @@auto_increment_increment = @@global.auto_increment_increment;
@@auto_increment_increment = @@global.auto_increment_increment
0
'#---------------------FN_DYNVARS_001_10----------------------#'
SET @@auto_increment_increment = 100;
SELECT @@auto_increment_increment = @@local.auto_increment_increment;
@@auto_increment_increment = @@local.auto_increment_increment
1
SELECT @@local.auto_increment_increment = @@session.auto_increment_increment;
@@local.auto_increment_increment = @@session.auto_increment_increment
1
'#---------------------FN_DYNVARS_001_11----------------------#'
SET auto_increment_increment = 1;
SELECT @@auto_increment_increment;
@@auto_increment_increment
1
SELECT local.auto_increment_increment;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.auto_increment_increment;
ERROR 42S02: Unknown table 'session' in field list
SELECT auto_increment_increment = @@session.auto_increment_increment;
ERROR 42S22: Unknown column 'auto_increment_increment' in 'field list'
SET @@global.auto_increment_increment = @start_global_value;
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
1
SET @@session.auto_increment_increment = @start_session_value;
SELECT @@session.auto_increment_increment;
@@session.auto_increment_increment
1

View file

@ -0,0 +1,201 @@
SET @global_auto_increment_increment = @@global.auto_increment_increment;
SET @session_auto_increment_increment = @@session.auto_increment_increment;
SET @global_auto_increment_offset = @@global.auto_increment_offset;
SET @session_auto_increment_offset = @@session.auto_increment_offset;
drop table if exists t1;
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30)
);
'#--------------------FN_DYNVARS_001_01-------------------------#'
## Setting initial value of auto_increment_increment to 5 ##
SET @@auto_increment_increment = 5;
'#--------------------FN_DYNVARS_001_02-------------------------#'
## Inserting first record in table to check behavior of the variable ##
INSERT into t1(name) values('Record_1');
SELECT * from t1;
id name
1 Record_1
## Changing value of variable to 10 ##
SET @@global.auto_increment_increment = 10;
## Inserting record and verifying value of column id ##
INSERT into t1(name) values('Record_2');
SELECT * from t1;
id name
1 Record_1
6 Record_2
## Test behavior of variable after assigning some larger value to it ##
SELECT @@auto_increment_increment;
@@auto_increment_increment
5
SET @@auto_increment_increment = 100;
INSERT into t1(name) values('Record_5');
SELECT * from t1;
id name
1 Record_1
6 Record_2
101 Record_5
'#--------------------FN_DYNVARS_001_03-------------------------#'
## Creating new connection test_con1 ##
## Value of session & global vairable here should be 10 ##
SELECT @@global.auto_increment_increment = 10;
@@global.auto_increment_increment = 10
1
SELECT @@session.auto_increment_increment = 10;
@@session.auto_increment_increment = 10
1
## Setting global value of variable and inserting data in table ##
SET @@global.auto_increment_increment = 20;
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
20
INSERT into t1(name) values('Record_6');
SELECT * from t1;
id name
1 Record_1
6 Record_2
101 Record_5
111 Record_6
## Setting session value of variable and inserting data in table ##
SET @@session.auto_increment_increment = 2;
SELECT @@session.auto_increment_increment;
@@session.auto_increment_increment
2
INSERT into t1(name) values('Record_8');
INSERT into t1(name) values('Record_9');
SELECT * from t1;
id name
1 Record_1
6 Record_2
101 Record_5
111 Record_6
113 Record_8
115 Record_9
'#--------------------FN_DYNVARS_001_04-------------------------#'
## Creating another new connection test_con2 ##
## Verifying initial values of variable in global & session scope ##
## global & session initial value should be 20 ##
SELECT @@global.auto_increment_increment = 20;
@@global.auto_increment_increment = 20
1
SELECT @@session.auto_increment_increment = 20;
@@session.auto_increment_increment = 20
1
## Setting value of session variable to 5 and verifying its behavior ##
SET @@session.auto_increment_increment = 5;
INSERT into t1(name) values('Record_10');
SELECT * from t1;
id name
1 Record_1
6 Record_2
101 Record_5
111 Record_6
113 Record_8
115 Record_9
116 Record_10
'Bug#35362: Here Record_10 id should be 120 instead of 115 because we'
'have set the value of variable to 5'
SET @@session.auto_increment_increment = 1;
SELECT @@auto_increment_increment;
@@auto_increment_increment
1
SELECT @@global.auto_increment_increment;
@@global.auto_increment_increment
20
'#--------------------FN_DYNVARS_001_05-------------------------#'
## Switching to test_con1 ##
## Verifying values of global & session value of variable ##
## global value should be 20 ##
SELECT @@global.auto_increment_increment = 20;
@@global.auto_increment_increment = 20
1
## session value should be 2 ##
SELECT @@session.auto_increment_increment = 2;
@@session.auto_increment_increment = 2
1
INSERT into t1(name) values('Record_11');
INSERT into t1(name) values('Record_12');
SELECT * from t1;
id name
1 Record_1
6 Record_2
101 Record_5
111 Record_6
113 Record_8
115 Record_9
116 Record_10
117 Record_11
119 Record_12
'#--------------------FN_DYNVARS_001_06-------------------------#'
## Changing column's datatype to SmallInt and verifying variable's behavior ##
ALTER table t1 MODIFY id SMALLINT NOT NULL auto_increment;
INSERT into t1(name) values('Record_13');
INSERT into t1(name) values('Record_14');
SELECT * from t1;
id name
1 Record_1
6 Record_2
101 Record_5
111 Record_6
113 Record_8
115 Record_9
116 Record_10
117 Record_11
119 Record_12
121 Record_13
123 Record_14
## Changing column's datatype to BigInt and verifying variable's behavior ##
ALTER table t1 MODIFY id BIGINT NOT NULL auto_increment;
INSERT into t1(name) values('Record_15');
INSERT into t1(name) values('Record_16');
SELECT * from t1;
id name
1 Record_1
6 Record_2
101 Record_5
111 Record_6
113 Record_8
115 Record_9
116 Record_10
117 Record_11
119 Record_12
121 Record_13
123 Record_14
125 Record_15
127 Record_16
'#--------------------FN_DYNVARS_001_07-------------------------#'
## Verifying behavior of variable with negative value ##
SET @@auto_increment_increment = -10;
Warnings:
Warning 1292 Truncated incorrect auto-increment-increment value: '0'
INSERT into t1(name) values('Record_17');
INSERT into t1(name) values('Record_18');
SELECT * from t1;
id name
1 Record_1
6 Record_2
101 Record_5
111 Record_6
113 Record_8
115 Record_9
116 Record_10
117 Record_11
119 Record_12
121 Record_13
123 Record_14
125 Record_15
127 Record_16
128 Record_17
129 Record_18
'Bug#35364: Variable is incrementing some random values on assigning -ve value'
## Disconnecting test_con2 ##
## Dropping table t1 ##
DROP table if exists t1;
## Disconnecting test_con1 ##
## switching to default connection ##
SET @@global.auto_increment_increment = @global_auto_increment_increment;
SET @@session.auto_increment_increment = @session_auto_increment_increment;
SET @@global.auto_increment_offset = @global_auto_increment_offset;
SET @@session.auto_increment_offset = @session_auto_increment_offset;

View file

@ -0,0 +1,178 @@
SET @start_global_value = @@global.auto_increment_offset;
SELECT @start_global_value;
@start_global_value
1
SET @start_session_value = @@session.auto_increment_offset;
SELECT @start_session_value;
@start_session_value
1
'#--------------------FN_DYNVARS_002_01-------------------------#'
SET @@global.auto_increment_offset = 100;
SET @@global.auto_increment_offset = DEFAULT;
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
1
SET @@session.auto_increment_offset = 200;
SET @@session.auto_increment_offset = DEFAULT;
SELECT @@session.auto_increment_offset;
@@session.auto_increment_offset
1
'#--------------------FN_DYNVARS_002_02-------------------------#'
SET @@global.auto_increment_offset = @start_global_value;
SELECT @@global.auto_increment_offset = 1;
@@global.auto_increment_offset = 1
1
SET @@session.auto_increment_offset = @start_session_value;
SELECT @@session.auto_increment_offset = 1;
@@session.auto_increment_offset = 1
1
'#--------------------FN_DYNVARS_002_03-------------------------#'
SET @@global.auto_increment_offset = 1;
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
1
SET @@global.auto_increment_offset = 60020;
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
60020
SET @@global.auto_increment_offset = 65535;
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
65535
'#--------------------FN_DYNVARS_002_04-------------------------#'
SET @@session.auto_increment_offset = 1;
SELECT @@session.auto_increment_offset;
@@session.auto_increment_offset
1
SET @@session.auto_increment_offset = 50050;
SELECT @@session.auto_increment_offset;
@@session.auto_increment_offset
50050
SET @@session.auto_increment_offset = 65535;
SELECT @@session.auto_increment_offset;
@@session.auto_increment_offset
65535
'#------------------FN_DYNVARS_002_05-----------------------#'
SET @@global.auto_increment_offset = 0;
Warnings:
Warning 1292 Truncated incorrect auto-increment-offset value: '0'
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
1
SET @@global.auto_increment_offset = -1024;
Warnings:
Warning 1292 Truncated incorrect auto-increment-offset value: '0'
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
1
SET @@global.auto_increment_offset = 65536;
Warnings:
Warning 1292 Truncated incorrect auto_increment_offset value: '65536'
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
65535
SET @@global.auto_increment_offset = ON;
ERROR 42000: Incorrect argument type to variable 'auto_increment_offset'
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
65535
SET @@global.auto_increment_offset = OFF;
ERROR 42000: Incorrect argument type to variable 'auto_increment_offset'
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
65535
SET @@global.auto_increment_offset = test;
ERROR 42000: Incorrect argument type to variable 'auto_increment_offset'
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
65535
SET @@session.auto_increment_offset = 0;
Warnings:
Warning 1292 Truncated incorrect auto-increment-offset value: '0'
SELECT @@session.auto_increment_offset;
@@session.auto_increment_offset
1
SET @@session.auto_increment_offset = -2;
Warnings:
Warning 1292 Truncated incorrect auto-increment-offset value: '0'
SELECT @@session.auto_increment_offset;
@@session.auto_increment_offset
1
SET @@session.auto_increment_offset = 65550;
Warnings:
Warning 1292 Truncated incorrect auto_increment_offset value: '65550'
SELECT @@session.auto_increment_offset;
@@session.auto_increment_offset
65535
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@session.auto_increment_offset = ON;
ERROR 42000: Incorrect argument type to variable 'auto_increment_offset'
SELECT @@session.auto_increment_offset;
@@session.auto_increment_offset
65535
SET @@session.auto_increment_offset = OFF;
ERROR 42000: Incorrect argument type to variable 'auto_increment_offset'
SELECT @@session.auto_increment_offset;
@@session.auto_increment_offset
65535
SET @@session.auto_increment_offset = test;
ERROR 42000: Incorrect argument type to variable 'auto_increment_offset'
SELECT @@session.auto_increment_offset;
@@session.auto_increment_offset
65535
'#------------------FN_DYNVARS_002_06-----------------------#'
SELECT @@global.auto_increment_offset = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='auto_increment_offset';
@@global.auto_increment_offset = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_002_07-----------------------#'
SELECT @@session.auto_increment_offset = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='auto_increment_offset';
@@session.auto_increment_offset = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_002_08-----------------------#'
SET @@global.auto_increment_offset = TRUE;
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
1
SET @@global.auto_increment_offset = FALSE;
Warnings:
Warning 1292 Truncated incorrect auto-increment-offset value: '0'
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
1
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@global.auto_increment_offset = 10;
SET @@session.auto_increment_offset = 11;
SELECT @@auto_increment_offset = @@global.auto_increment_offset;
@@auto_increment_offset = @@global.auto_increment_offset
0
'#---------------------FN_DYNVARS_001_10----------------------#'
SET @@auto_increment_offset = 100;
SELECT @@auto_increment_offset = @@local.auto_increment_offset;
@@auto_increment_offset = @@local.auto_increment_offset
1
SELECT @@local.auto_increment_offset = @@session.auto_increment_offset;
@@local.auto_increment_offset = @@session.auto_increment_offset
1
'#---------------------FN_DYNVARS_001_11----------------------#'
SET auto_increment_offset = 1;
SELECT @@auto_increment_offset;
@@auto_increment_offset
1
SELECT local.auto_increment_offset;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.auto_increment_offset;
ERROR 42S02: Unknown table 'session' in field list
SELECT auto_increment_offset = @@session.auto_increment_offset;
ERROR 42S22: Unknown column 'auto_increment_offset' in 'field list'
SET @@global.auto_increment_offset = @start_global_value;
SELECT @@global.auto_increment_offset;
@@global.auto_increment_offset
1
SET @@session.auto_increment_offset = @start_session_value;
SELECT @@session.auto_increment_offset;
@@session.auto_increment_offset
1

View file

@ -0,0 +1,257 @@
SET @global_auto_increment_increment = @@global.auto_increment_increment;
SET @session_auto_increment_increment = @@session.auto_increment_increment;
SET @global_auto_increment_offset = @@global.auto_increment_offset;
SET @session_auto_increment_offset = @@session.auto_increment_offset;
drop table if exists t1;
## Creating New Table ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30)
);
'#--------------------FN_DYNVARS_002_01-------------------------#'
## Setting initial value of variable to 5 ##
SET @@auto_increment_increment = 10;
SET @@auto_increment_offset = 5;
'#--------------------FN_DYNVARS_002_02-------------------------#'
## Inserting records in table and verifying variable's behavior ##
INSERT into t1(name) values('Record_1');
SELECT * from t1;
id name
5 Record_1
INSERT into t1(name) values('Record_2');
SELECT * from t1;
id name
5 Record_1
15 Record_2
## Test behavior of variable after updating value of variable ##
SET @@auto_increment_offset = 24;
SELECT @@auto_increment_offset;
@@auto_increment_offset
24
INSERT into t1(name) values('Record_3');
SELECT * from t1;
id name
5 Record_1
15 Record_2
24 Record_3
INSERT into t1(name) values('Record_4');
SELECT * from t1;
id name
5 Record_1
15 Record_2
24 Record_3
34 Record_4
'#--------------------FN_DYNVARS_002_03-------------------------#'
## Changing value of global scope before opening new connection ##
SET @@global.auto_increment_increment = 15;
SET @@global.auto_increment_offset = 36;
## New connection test_con1 ##
## Value of session & global vairable here should be 10 ##
SELECT @@global.auto_increment_offset = 36;
@@global.auto_increment_offset = 36
1
SELECT @@session.auto_increment_offset = 36;
@@session.auto_increment_offset = 36
1
## Verify global value effect of variable by inserting new rows in table ##
INSERT into t1(name) values('Record_5');
INSERT into t1(name) values('Record_6');
SELECT * from t1;
id name
5 Record_1
15 Record_2
24 Record_3
34 Record_4
36 Record_5
51 Record_6
## Setting session value of variable and inserting data in table ##
SET @@session.auto_increment_offset = 54;
INSERT into t1(name) values('Record_7');
INSERT into t1(name) values('Record_8');
SELECT * from t1;
id name
5 Record_1
15 Record_2
24 Record_3
34 Record_4
36 Record_5
51 Record_6
54 Record_7
69 Record_8
'#--------------------FN_DYNVARS_002_04-------------------------#'
## Setting value of variable less than last insert id ##
SET @@session.auto_increment_offset = 5;
INSERT into t1(name) values('Record_9');
'Bug#35367: Random value of id is increasing on assigning value to';
'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');
SELECT * from t1;
id name
5 Record_1
15 Record_2
24 Record_3
34 Record_4
36 Record_5
51 Record_6
54 Record_7
69 Record_8
80 Record_9
95 Record_10
110 Record_11
125 Record_12
'#--------------------FN_DYNVARS_002_05-------------------------#'
## Assigning value to variable greater than auto_increment_incrent value ##
SET @@auto_increment_offset = 140;
SET @@auto_increment_increment = 10;
INSERT into t1(name) values('Record_13');
INSERT into t1(name) values('Record_14');
SELECT * from t1;
id name
5 Record_1
15 Record_2
24 Record_3
34 Record_4
36 Record_5
51 Record_6
54 Record_7
69 Record_8
80 Record_9
95 Record_10
110 Record_11
125 Record_12
134 Record_13
140 Record_14
'Bug#35369: Some invalid value of id is increasing on assigning value to';
'variable that is greater than auto_increment_increment';
'#--------------------FN_DYNVARS_002_06-------------------------#'
## Changing datatype of column id with primary key to SmallInt ##
ALTER table t1 modify id SMALLINT NOT NULL auto_increment;
INSERT into t1(name) values('Record_15');
INSERT into t1(name) values('Record_16');
SELECT * from t1;
id name
5 Record_1
15 Record_2
24 Record_3
34 Record_4
36 Record_5
51 Record_6
54 Record_7
69 Record_8
80 Record_9
95 Record_10
110 Record_11
125 Record_12
134 Record_13
140 Record_14
150 Record_15
160 Record_16
## Changing datatype of column id with primary key to BigInt ##
ALTER table t1 modify id BIGINT NOT NULL auto_increment;
INSERT into t1(name) values('Record_17');
INSERT into t1(name) values('Record_18');
SELECT * from t1;
id name
5 Record_1
15 Record_2
24 Record_3
34 Record_4
36 Record_5
51 Record_6
54 Record_7
69 Record_8
80 Record_9
95 Record_10
110 Record_11
125 Record_12
134 Record_13
140 Record_14
150 Record_15
160 Record_16
170 Record_17
180 Record_18
'#--------------------FN_DYNVARS_002_07-------------------------#'
## Assigning -ve value to variable ##
SET @@auto_increment_offset = -10;
Warnings:
Warning 1292 Truncated incorrect auto-increment-offset value: '0'
SELECT @@auto_increment_offset = -10;
@@auto_increment_offset = -10
0
INSERT into t1(name) values('Record_17');
INSERT into t1(name) values('Record_18');
SELECT * from t1;
id name
5 Record_1
15 Record_2
24 Record_3
34 Record_4
36 Record_5
51 Record_6
54 Record_7
69 Record_8
80 Record_9
95 Record_10
110 Record_11
125 Record_12
134 Record_13
140 Record_14
150 Record_15
160 Record_16
170 Record_17
180 Record_18
181 Record_17
191 Record_18
'Bug#35370: Some invalid value of id is increasing on assigning negative';
' value in variable';
## Assigning value that is out of range of variable ##
SET @@auto_increment_offset = 65536;
Warnings:
Warning 1292 Truncated incorrect auto_increment_offset value: '65536'
SELECT @@auto_increment_offset;
@@auto_increment_offset
65535
INSERT into t1(name) values('Record_17');
INSERT into t1(name) values('Record_18');
INSERT into t1(name) values('Record_19');
INSERT into t1(name) values('Record_20');
SELECT * from t1;
id name
5 Record_1
15 Record_2
24 Record_3
34 Record_4
36 Record_5
51 Record_6
54 Record_7
69 Record_8
80 Record_9
95 Record_10
110 Record_11
125 Record_12
134 Record_13
140 Record_14
150 Record_15
160 Record_16
170 Record_17
180 Record_18
181 Record_17
191 Record_18
199 Record_17
209 Record_18
219 Record_19
229 Record_20
## No effect of auto_increment_offset since value of this variable is greater ##
## than auto_increment_increment ##
## Dropping table ##
DROP table if exists t1;
## Disconnecting connection ##
## switching to default connection ##
SET @@global.auto_increment_increment = @global_auto_increment_increment;
SET @@session.auto_increment_increment = @session_auto_increment_increment;
SET @@global.auto_increment_offset = @global_auto_increment_offset;
SET @@session.auto_increment_offset = @session_auto_increment_offset;

View file

@ -0,0 +1,109 @@
drop table if exists t1;
## Creating new table ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name varchar(30)
) ENGINE = INNODB;
'#--------------------FN_DYNVARS_003_01-------------------------#'
## Setting variable's value to 0 i.e false ##
SET @@autocommit = 0;
'#--------------------FN_DYNVARS_003_02-------------------------#'
## Creating new connection ##
## Checking value of variable after opening new connection ##
SELECT @@autocommit;
@@autocommit
1
## Setting value of variable to zero and inserting some rows ##
SET @@autocommit = 0;
INSERT into t1(name) values('Record_1');
INSERT into t1(name) values('Record_2');
SELECT * from t1;
id name
1 Record_1
2 Record_2
## Creating another connection and verifying records in table ##
## New Connection test_con2 ##
SELECT * from t1;
id name
'#--------------------FN_DYNVARS_003_03-------------------------#'
## Verifying behavior of variable by commiting rows in test_con1 ##
## Connecting with connection # 01 ##
SELECT * from t1;
id name
1 Record_1
2 Record_2
COMMIT;
## New Connection test_con2 ##
## Now verifying records in table from connection # 02 ##
SELECT * from t1;
id name
1 Record_1
2 Record_2
'#--------------------FN_DYNVARS_003_04-------------------------#'
## Connecting to connection # 01 ##
SELECT * from t1;
id name
1 Record_1
2 Record_2
## Updating value of first row ##
UPDATE t1 set name = 'Record_12' where name = 'Record_1';
SELECT * from t1;
id name
1 Record_12
2 Record_2
## Connecting to connecting # 02 and verifying effect of update query ##
SELECT * from t1;
id name
1 Record_1
2 Record_2
## Now connecting with connection # 01 and using ROLLBACK after it ##
ROLLBACK;
SELECT * from t1;
id name
1 Record_1
2 Record_2
'#--------------------FN_DYNVARS_003_05-------------------------#'
## Connecting with connection # 01 ##
INSERT into t1(name) values('Record_3');
## Connection test_con2 ##
## Now verifying records in table from connection # 02 and changing value ##
## of autocommit to true ##
SELECT * from t1;
id name
1 Record_1
2 Record_2
SET @@autocommit = 1;
INSERT into t1(name) values('Record_4');
INSERT into t1(name) values('Record_5');
SELECT * from t1;
id name
1 Record_1
2 Record_2
4 Record_4
5 Record_5
## Connecting with connection # 01 and inserting few records ##
SELECT * from t1;
id name
1 Record_1
2 Record_2
3 Record_3
'Bug#35373: Records donot get committed in transaction on switching connections'
INSERT into t1(name) values('Record_6');
SELECT * from t1;
id name
1 Record_1
2 Record_2
3 Record_3
6 Record_6
## Now verifying the effect of these new records in second connection ##
SELECT * from t1;
id name
1 Record_1
2 Record_2
4 Record_4
5 Record_5
## Dropping table t1 ##
DROP table t1;
## Disconnecting both connections ##

View file

@ -0,0 +1,101 @@
SET @start_value = @@global.automatic_sp_privileges;
SELECT @start_value;
@start_value
1
'#--------------------FN_DYNVARS_004_01------------------------#'
SET @@global.automatic_sp_privileges = 0;
SET @@global.automatic_sp_privileges = DEFAULT;
SELECT @@global.automatic_sp_privileges;
@@global.automatic_sp_privileges
1
'#---------------------FN_DYNVARS_004_02-------------------------#'
SET @@global.automatic_sp_privileges = @start_value;
SELECT @@global.automatic_sp_privileges = TRUE;
@@global.automatic_sp_privileges = TRUE
1
'#--------------------FN_DYNVARS_004_03------------------------#'
SET @@global.automatic_sp_privileges = 0;
SELECT @@global.automatic_sp_privileges;
@@global.automatic_sp_privileges
0
SET @@global.automatic_sp_privileges = 1;
SELECT @@global.automatic_sp_privileges;
@@global.automatic_sp_privileges
1
'#--------------------FN_DYNVARS_004_04-------------------------#'
SET @@global.automatic_sp_privileges = 2;
ERROR 42000: Variable 'automatic_sp_privileges' can't be set to the value of '2'
SET @@global.automatic_sp_privileges = -1;
ERROR 42000: Variable 'automatic_sp_privileges' can't be set to the value of '-1'
SET @@global.automatic_sp_privileges = TRUEF;
ERROR 42000: Variable 'automatic_sp_privileges' can't be set to the value of 'TRUEF'
SET @@global.automatic_sp_privileges = TRUE_F;
ERROR 42000: Variable 'automatic_sp_privileges' can't be set to the value of 'TRUE_F'
SET @@global.automatic_sp_privileges = FALSE0;
ERROR 42000: Variable 'automatic_sp_privileges' can't be set to the value of 'FALSE0'
SET @@global.automatic_sp_privileges = OON;
ERROR 42000: Variable 'automatic_sp_privileges' can't be set to the value of 'OON'
SET @@global.automatic_sp_privileges = ONN;
ERROR 42000: Variable 'automatic_sp_privileges' can't be set to the value of 'ONN'
SET @@global.automatic_sp_privileges = OOFF;
ERROR 42000: Variable 'automatic_sp_privileges' can't be set to the value of 'OOFF'
SET @@global.automatic_sp_privileges = 0FF;
ERROR 42000: Variable 'automatic_sp_privileges' can't be set to the value of '0FF'
SET @@global.automatic_sp_privileges = ' ';
ERROR 42000: Variable 'automatic_sp_privileges' can't be set to the value of ' '
SET @@global.automatic_sp_privileges = " ";
ERROR 42000: Variable 'automatic_sp_privileges' can't be set to the value of ' '
SET @@global.automatic_sp_privileges = '';
ERROR 42000: Variable 'automatic_sp_privileges' can't be set to the value of ''
'#-------------------FN_DYNVARS_004_05----------------------------#'
SET @@session.automatic_sp_privileges = 1;
ERROR HY000: Variable 'automatic_sp_privileges' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.automatic_sp_privileges;
ERROR HY000: Variable 'automatic_sp_privileges' is a GLOBAL variable
'#----------------------FN_DYNVARS_004_06------------------------#'
SELECT @@global.automatic_sp_privileges = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='automatic_sp_privileges';
@@global.automatic_sp_privileges = VARIABLE_VALUE
0
'Bug# 34839: Values in variable and information_schema donot match'
'#---------------------FN_DYNVARS_004_07----------------------#'
SET @@global.automatic_sp_privileges = OFF;
SELECT @@global.automatic_sp_privileges;
@@global.automatic_sp_privileges
0
SET @@global.automatic_sp_privileges = ON;
SELECT @@global.automatic_sp_privileges;
@@global.automatic_sp_privileges
1
'#---------------------FN_DYNVARS_004_08----------------------#'
SET @@global.automatic_sp_privileges = TRUE;
SELECT @@global.automatic_sp_privileges;
@@global.automatic_sp_privileges
1
SET @@global.automatic_sp_privileges = FALSE;
SELECT @@global.automatic_sp_privileges;
@@global.automatic_sp_privileges
0
'#---------------------FN_DYNVARS_004_09----------------------#'
SET @@global.automatic_sp_privileges = 1;
SELECT @@automatic_sp_privileges = @@global.automatic_sp_privileges;
@@automatic_sp_privileges = @@global.automatic_sp_privileges
1
'#---------------------FN_DYNVARS_004_10----------------------#'
SET automatic_sp_privileges = 1;
ERROR HY000: Variable 'automatic_sp_privileges' is a GLOBAL variable and should be set with SET GLOBAL
SET local.automatic_sp_privileges = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'automatic_sp_privileges = 1' at line 1
SELECT local.automatic_sp_privileges;
ERROR 42S02: Unknown table 'local' in field list
SET global.automatic_sp_privileges = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'automatic_sp_privileges = 1' at line 1
SELECT global.automatic_sp_privileges;
ERROR 42S02: Unknown table 'global' in field list
SELECT automatic_sp_privileges = @@session.automatic_sp_privileges;
ERROR 42S22: Unknown column 'automatic_sp_privileges' in 'field list'
SET @@global.automatic_sp_privileges = @start_value;
SELECT @@global.automatic_sp_privileges;
@@global.automatic_sp_privileges
1

View file

@ -0,0 +1,59 @@
** Setup **
SET @global_automatic_sp_privileges = @@GLOBAL.automatic_sp_privileges;
CREATE TABLE t1 (a varchar(200));
INSERT INTO t1 VALUES('Procedure Executed.');
CREATE USER 'userTest'@'localhost';
CREATE USER 'userTest1'@'localhost';
** Connection default **
SET GLOBAL automatic_sp_privileges = TRUE;
** Connecting using userTest **
** Connection conUser **
CREATE PROCEDURE testProc ()
BEGIN
SELECT * FROM t1;
END;|
CALL testProc();
a
Procedure Executed.
Expecting SELECT executed
** Connection default**
SET GLOBAL automatic_sp_privileges = FALSE;
** Connecting using userTest1 **
** Connection conUser1 **
CREATE PROCEDURE testProc1 ()
BEGIN
SELECT * FROM t1;
END;|
Expected error access denied
CALL testProc1();
ERROR 42000: execute command denied to user 'userTest1'@'localhost' for routine 'test.testProc1'
Expected error access denied
ALTER PROCEDURE testProc1 COMMENT 'My Comment';
ERROR 42000: alter routine command denied to user 'userTest1'@'localhost' for routine 'test.testProc1'
Expected error access denied
DROP PROCEDURE testProc1;
ERROR 42000: alter routine command denied to user 'userTest1'@'localhost' for routine 'test.testProc1'
** Connection default **
GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE testProc1 TO 'userTest1'@'localhost';
** Connection conUser1 **
CALL testProc1();
a
Procedure Executed.
Expecting seelect executed
ALTER PROCEDURE testProc1 COMMENT 'My Comment';
** Cleanup **
** Connection default **
disconnecting connections
SET GLOBAL automatic_sp_privileges = @global_automatic_sp_privileges;
REVOKE EXECUTE, ALTER ROUTINE ON PROCEDURE testProc FROM 'userTest'@'localhost';
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'userTest'@'localhost';
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'userTest1'@'localhost';
DROP PROCEDURE testProc;
DROP PROCEDURE testProc1;
DROP USER 'userTest'@'localhost';
DROP USER 'userTest1'@'localhost';
DROP TABLE t1;

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_001_01----------------------#'
SELECT COUNT(@@GLOBAL.basedir);
COUNT(@@GLOBAL.basedir)
1
1 Expected
'#---------------------BS_STVARS_001_02----------------------#'
SET @@GLOBAL.basedir=1;
ERROR HY000: Variable 'basedir' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.basedir);
COUNT(@@GLOBAL.basedir)
1
1 Expected
'#---------------------BS_STVARS_001_03----------------------#'
SELECT @@GLOBAL.basedir = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='basedir';
@@GLOBAL.basedir = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.basedir);
COUNT(@@GLOBAL.basedir)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='basedir';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_001_04----------------------#'
SELECT @@basedir = @@GLOBAL.basedir;
@@basedir = @@GLOBAL.basedir
1
1 Expected
'#---------------------BS_STVARS_001_05----------------------#'
SELECT COUNT(@@basedir);
COUNT(@@basedir)
1
1 Expected
SELECT COUNT(@@local.basedir);
ERROR HY000: Variable 'basedir' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.basedir);
ERROR HY000: Variable 'basedir' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.basedir);
COUNT(@@GLOBAL.basedir)
1
1 Expected
SELECT basedir = @@SESSION.basedir;
ERROR 42S22: Unknown column 'basedir' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,103 @@
SET @start_value = @@big_tables;
SELECT @start_value;
@start_value
0
'#--------------------FN_DYNVARS_005_01------------------------#'
SET @@big_tables = 1;
SET @@big_tables = DEFAULT;
SELECT @@big_tables;
@@big_tables
1
'Bug# 34829: No default value for variable and setting default does not raise error';
'#--------------------FN_DYNVARS_005_02------------------------#'
SET @@big_tables = 0;
SELECT @@big_tables;
@@big_tables
0
SET @@big_tables = 1;
SELECT @@big_tables;
@@big_tables
1
'#--------------------FN_DYNVARS_005_03-------------------------#'
SET @@big_tables = 2;
ERROR 42000: Variable 'big_tables' can't be set to the value of '2'
SET @@big_tables = -1;
ERROR 42000: Variable 'big_tables' can't be set to the value of '-1'
SET @@big_tables = TRUEF;
ERROR 42000: Variable 'big_tables' can't be set to the value of 'TRUEF'
SET @@big_tables = TRUE_F;
ERROR 42000: Variable 'big_tables' can't be set to the value of 'TRUE_F'
SET @@big_tables = FALSE0;
ERROR 42000: Variable 'big_tables' can't be set to the value of 'FALSE0'
SET @@big_tables = OON;
ERROR 42000: Variable 'big_tables' can't be set to the value of 'OON'
SET @@big_tables = ONN;
ERROR 42000: Variable 'big_tables' can't be set to the value of 'ONN'
SET @@big_tables = OOFF;
ERROR 42000: Variable 'big_tables' can't be set to the value of 'OOFF'
SET @@big_tables = 0FF;
ERROR 42000: Variable 'big_tables' can't be set to the value of '0FF'
SET @@big_tables = ' ';
ERROR 42000: Variable 'big_tables' can't be set to the value of ' '
SET @@big_tables = " ";
ERROR 42000: Variable 'big_tables' can't be set to the value of ' '
SET @@big_tables = '';
ERROR 42000: Variable 'big_tables' can't be set to the value of ''
'#-------------------FN_DYNVARS_005_04----------------------------#'
SET @@global.big_tables = 0;
ERROR HY000: Variable 'big_tables' is a SESSION variable and can't be used with SET GLOBAL
SELECT @@global.big_tables;
ERROR HY000: Variable 'big_tables' is a SESSION variable
'#----------------------FN_DYNVARS_005_05------------------------#'
SELECT @@big_tables = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='big_tables';
@@big_tables = VARIABLE_VALUE
0
Bug # 34839: Values in variable and information_schema do not match for autocommit
'#---------------------FN_DYNVARS_005_06----------------------#'
SET @@big_tables = OFF;
SELECT @@big_tables;
@@big_tables
0
SET @@big_tables = ON;
SELECT @@big_tables;
@@big_tables
1
'#---------------------FN_DYNVARS_005_07----------------------#'
SET @@big_tables = TRUE;
SELECT @@big_tables;
@@big_tables
1
SET @@big_tables = FALSE;
SELECT @@big_tables;
@@big_tables
0
'#---------------------FN_DYNVARS_005_08----------------------#'
SET @@big_tables = 0;
SELECT @@big_tables = @@session.big_tables;
@@big_tables = @@session.big_tables
1
SET @@big_tables = 1;
SELECT @@big_tables = @@local.big_tables and @@local.big_tables = @@session.big_tables;
@@big_tables = @@local.big_tables and @@local.big_tables = @@session.big_tables
1
'#---------------------FN_DYNVARS_005_09----------------------#'
SET big_tables = 1;
SELECT @@big_tables;
@@big_tables
1
SET local.big_tables = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'big_tables = 1' at line 1
SELECT local.big_tables;
ERROR 42S02: Unknown table 'local' in field list
SET session.big_tables = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'big_tables = 1' at line 1
SELECT session.big_tables;
ERROR 42S02: Unknown table 'session' in field list
select big_tables;
ERROR 42S22: Unknown column 'big_tables' in 'field list'
SET @@big_tables = @start_value;
SELECT @@big_tables;
@@big_tables
0

View file

@ -0,0 +1,75 @@
'#---------------------BS_STVARS_002_01----------------------#'
SELECT COUNT(@@GLOBAL.binlog_format);
COUNT(@@GLOBAL.binlog_format)
1
1 Expected
SELECT COUNT(@@SESSION.binlog_format);
COUNT(@@SESSION.binlog_format)
1
1 Expected
'#---------------------BS_STVARS_002_02----------------------#'
SET @@GLOBAL.binlog_format=1;
Expected error 'Read only variable'
Bug: Writeable static variable
SELECT COUNT(@@GLOBAL.binlog_format);
COUNT(@@GLOBAL.binlog_format)
1
1 Expected
SET @@SESSION.binlog_format=1;
Expected error 'Read only variable'
Bug: Writeable static variable
SELECT COUNT(@@SESSION.binlog_format);
COUNT(@@SESSION.binlog_format)
1
1 Expected
'#---------------------BS_STVARS_002_03----------------------#'
SELECT @@GLOBAL.binlog_format = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='binlog_format';
@@GLOBAL.binlog_format = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.binlog_format);
COUNT(@@GLOBAL.binlog_format)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='binlog_format';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_002_04----------------------#'
SELECT @@SESSION.binlog_format = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='binlog_format';
@@SESSION.binlog_format = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@SESSION.binlog_format);
COUNT(@@SESSION.binlog_format)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='binlog_format';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_002_05----------------------#'
SELECT COUNT(@@binlog_format);
COUNT(@@binlog_format)
1
1 Expected
SELECT COUNT(@@local.binlog_format);
COUNT(@@local.binlog_format)
1
1 Expected
SELECT COUNT(@@SESSION.binlog_format);
COUNT(@@SESSION.binlog_format)
1
1 Expected
SELECT COUNT(@@GLOBAL.binlog_format);
COUNT(@@GLOBAL.binlog_format)
1
1 Expected

View file

@ -0,0 +1,509 @@
SET @global_start_value = @@global.character_set_client;
SELECT @global_start_value;
@global_start_value
latin1
SET @session_start_value = @@character_set_client;
SELECT @session_start_value;
@session_start_value
latin1
SET @session_start_value = @@local.character_set_client;
SELECT @session_start_value;
@session_start_value
latin1
SET @session_start_value = @@session.character_set_client;
SELECT @session_start_value;
@session_start_value
latin1
'#--------------------FN_DYNVARS_010_01------------------#'
SELECT character_set_client;
ERROR 42S22: Unknown column 'character_set_client' in 'field list'
SET character_set_client=utf8;
SELECT @@session.character_set_client;
@@session.character_set_client
utf8
SET global.character_set_client=utf8;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'character_set_client=utf8' at line 1
SET session character_set_client=utf8;
SELECT session character_set_client;
ERROR 42S22: Unknown column 'session' in 'field list'
SET global character_set_client=utf8;
SELECT global character_set_client;
ERROR 42S22: Unknown column 'global' in 'field list'
'#--------------------FN_DYNVARS_010_02-------------------------#'
SET @@character_set_client = latin5;
SET @@character_set_client = DEFAULT;
SELECT @@character_set_client AS DEFAULT_VALUE;
DEFAULT_VALUE
utf8
SET @@global.character_set_client = latin5;
SET @@global.character_set_client = DEFAULT;
SELECT @@global.character_set_client;
@@global.character_set_client
latin1
'#--------------------FN_DYNVARS_010_03-------------------------#'
SET @@session.character_set_client = utf8;
SELECT @@session.character_set_client;
@@session.character_set_client
utf8
SET @@global.character_set_client = latin2;
SELECT @@global.character_set_client;
@@global.character_set_client
latin2
SELECT @@session.character_set_client AS res_is_utf8;
res_is_utf8
utf8
SET @@session.character_set_client = latin5;
SELECT @@session.character_set_client;
@@session.character_set_client
latin5
SELECT @@global.character_set_client AS res_is_latin2;
res_is_latin2
latin2
SELECT @@global.character_set_client=@@session.character_set_client
AS res_is_false;
res_is_false
0
'#--------------------FN_DYNVARS_010_04-------------------------#'
SELECT @@character_set_client = @@session.character_set_client AS res;
res
1
SELECT @@character_set_client = @@local.character_set_client AS res;
res
1
'#--------------------FN_DYNVARS_010_05-------------------------#'
SET @@character_set_client = utf8 + latin2;
ERROR 42S22: Unknown column 'utf8' in 'field list'
'#--------------------FN_DYNVARS_010_06-------------------------#'
SET @@character_set_client = big5;
SELECT @@character_set_client;
@@character_set_client
big5
SET @@character_set_client = dec8;
SELECT @@character_set_client;
@@character_set_client
dec8
SET @@character_set_client = cp850;
SELECT @@character_set_client;
@@character_set_client
cp850
SET @@character_set_client = hp8;
SELECT @@character_set_client;
@@character_set_client
hp8
SET @@character_set_client = koi8r;
SELECT @@character_set_client;
@@character_set_client
koi8r
SET @@character_set_client = latin1;
SELECT @@character_set_client;
@@character_set_client
latin1
SET @@character_set_client = latin2;
SELECT @@character_set_client;
@@character_set_client
latin2
SET @@character_set_client = swe7;
SELECT @@character_set_client;
ÉÉcharacter_set_client
swe7
SET @@character_set_client = ascii;
SELECT @@character_set_client;
@@character_set_client
ascii
SET @@character_set_client = ujis;
SELECT @@character_set_client;
@@character_set_client
ujis
SET @@character_set_client = sjis;
SELECT @@character_set_client;
@@character_set_client
sjis
SET @@character_set_client = hebrew;
SELECT @@character_set_client;
@@character_set_client
hebrew
SET @@character_set_client = tis620;
SELECT @@character_set_client;
@@character_set_client
tis620
SET @@character_set_client = euckr;
SELECT @@character_set_client;
@@character_set_client
euckr
SET @@character_set_client = koi8u;
SELECT @@character_set_client;
@@character_set_client
koi8u
SET @@character_set_client = gb2312;
SELECT @@character_set_client;
@@character_set_client
gb2312
SET @@character_set_client = greek;
SELECT @@character_set_client;
@@character_set_client
greek
SET @@character_set_client = cp1250;
SELECT @@character_set_client;
@@character_set_client
cp1250
SET @@character_set_client = gbk;
SELECT @@character_set_client;
@@character_set_client
gbk
SET @@character_set_client = latin5;
SELECT @@character_set_client;
@@character_set_client
latin5
SET @@character_set_client = armscii8;
SELECT @@character_set_client;
@@character_set_client
armscii8
SET @@character_set_client = utf8;
SELECT @@character_set_client;
@@character_set_client
utf8
'Bug: Assignment of ucs2 to session character-set does not raise error';
'but selecting variable after setting it does.';
'Even catching this does not allow any further character-set to be set.';
'Offending querry seems to be:';
'SET @@character_set_client = ucs2;'
SET @@character_set_client = cp866;
SELECT @@character_set_client;
@@character_set_client
cp866
SET @@character_set_client = keybcs2;
SELECT @@character_set_client;
@@character_set_client
keybcs2
SET @@character_set_client = macce;
SELECT @@character_set_client;
@@character_set_client
macce
SET @@character_set_client = macroman;
SELECT @@character_set_client;
@@character_set_client
macroman
SET @@character_set_client = cp852;
SELECT @@character_set_client;
@@character_set_client
cp852
SET @@character_set_client = latin7;
SELECT @@character_set_client;
@@character_set_client
latin7
SET @@character_set_client = cp1251;
SELECT @@character_set_client;
@@character_set_client
cp1251
SET @@character_set_client = cp1256;
SELECT @@character_set_client;
@@character_set_client
cp1256
SET @@character_set_client = cp1257;
SELECT @@character_set_client;
@@character_set_client
cp1257
SET @@character_set_client = binary;
SELECT @@character_set_client;
@@character_set_client
binary
SET @@character_set_client = geostd8;
SELECT @@character_set_client;
@@character_set_client
geostd8
SET @@character_set_client = cp932;
SELECT @@character_set_client;
@@character_set_client
cp932
SET @@character_set_client = eucjpms;
SELECT @@character_set_client;
@@character_set_client
eucjpms
'#--------------------FN_DYNVARS_010_07-------------------------#'
SET @@global.character_set_client = big5;
SELECT @@global.character_set_client;
@@global.character_set_client
big5
SET @@global.character_set_client = dec8;
SELECT @@global.character_set_client;
@@global.character_set_client
dec8
SET @@global.character_set_client = cp850;
SELECT @@global.character_set_client;
@@global.character_set_client
cp850
SET @@global.character_set_client = hp8;
SELECT @@global.character_set_client;
@@global.character_set_client
hp8
SET @@global.character_set_client = koi8r;
SELECT @@global.character_set_client;
@@global.character_set_client
koi8r
SET @@global.character_set_client = latin1;
SELECT @@global.character_set_client;
@@global.character_set_client
latin1
SET @@global.character_set_client = latin2;
SELECT @@global.character_set_client;
@@global.character_set_client
latin2
SET @@global.character_set_client = swe7;
SELECT @@global.character_set_client;
@@global.character_set_client
swe7
SET @@global.character_set_client = ascii;
SELECT @@global.character_set_client;
@@global.character_set_client
ascii
SET @@global.character_set_client = ujis;
SELECT @@global.character_set_client;
@@global.character_set_client
ujis
SET @@global.character_set_client = sjis;
SELECT @@global.character_set_client;
@@global.character_set_client
sjis
SET @@global.character_set_client = hebrew;
SELECT @@global.character_set_client;
@@global.character_set_client
hebrew
SET @@global.character_set_client = tis620;
SELECT @@global.character_set_client;
@@global.character_set_client
tis620
SET @@global.character_set_client = euckr;
SELECT @@global.character_set_client;
@@global.character_set_client
euckr
SET @@global.character_set_client = koi8u;
SELECT @@global.character_set_client;
@@global.character_set_client
koi8u
SET @@global.character_set_client = gb2312;
SELECT @@global.character_set_client;
@@global.character_set_client
gb2312
SET @@global.character_set_client = greek;
SELECT @@global.character_set_client;
@@global.character_set_client
greek
SET @@global.character_set_client = cp1250;
SELECT @@global.character_set_client;
@@global.character_set_client
cp1250
SET @@global.character_set_client = gbk;
SELECT @@global.character_set_client;
@@global.character_set_client
gbk
SET @@global.character_set_client = latin5;
SELECT @@global.character_set_client;
@@global.character_set_client
latin5
SET @@global.character_set_client = armscii8;
SELECT @@global.character_set_client;
@@global.character_set_client
armscii8
SET @@global.character_set_client = utf8;
SELECT @@global.character_set_client;
@@global.character_set_client
utf8
SET @@global.character_set_client = ucs2;
SELECT @@global.character_set_client;
@@global.character_set_client
utf8
SET @@global.character_set_client = cp866;
SELECT @@global.character_set_client;
@@global.character_set_client
cp866
SET @@global.character_set_client = keybcs2;
SELECT @@global.character_set_client;
@@global.character_set_client
keybcs2
SET @@global.character_set_client = macce;
SELECT @@global.character_set_client;
@@global.character_set_client
macce
SET @@global.character_set_client = macroman;
SELECT @@global.character_set_client;
@@global.character_set_client
macroman
SET @@global.character_set_client = cp852;
SELECT @@global.character_set_client;
@@global.character_set_client
cp852
SET @@global.character_set_client = latin7;
SELECT @@global.character_set_client;
@@global.character_set_client
latin7
SET @@global.character_set_client = cp1251;
SELECT @@global.character_set_client;
@@global.character_set_client
cp1251
SET @@global.character_set_client = cp1256;
SELECT @@global.character_set_client;
@@global.character_set_client
cp1256
SET @@global.character_set_client = cp1257;
SELECT @@global.character_set_client;
@@global.character_set_client
cp1257
SET @@global.character_set_client = binary;
SELECT @@global.character_set_client;
@@global.character_set_client
binary
SET @@global.character_set_client = geostd8;
SELECT @@global.character_set_client;
@@global.character_set_client
geostd8
SET @@global.character_set_client = cp932;
SELECT @@global.character_set_client;
@@global.character_set_client
cp932
SET @@global.character_set_client = eucjpms;
SELECT @@global.character_set_client;
@@global.character_set_client
eucjpms
'#--------------------FN_DYNVARS_010_08-------------------------#'
SET @@character_set_client = UTF8;
SELECT @@character_set_client;
@@character_set_client
utf8
SET @@character_set_client = utf8;
SELECT @@character_set_client;
@@character_set_client
utf8
SET @@global.character_set_client = uTf8;
SELECT @@global.character_set_client;
@@global.character_set_client
utf8
'#--------------------FN_DYNVARS_010_09-------------------------#'
SET @@character_set_client = 1;
SELECT @@character_set_client;
@@character_set_client
big5
SET @@character_set_client = 2;
SELECT @@character_set_client;
@@character_set_client
latin2
SET @@character_set_client = 3;
SELECT @@character_set_client;
@@character_set_client
dec8
SET @@character_set_client = 36;
SELECT @@character_set_client;
@@character_set_client
cp866
SET @@character_set_client = 99;
SELECT @@character_set_client;
@@character_set_client
cp1250
SET @@character_set_client = 100;
ERROR 42000: Unknown character set: '100'
SET @@global.character_set_client = 1;
SELECT @@global.character_set_client;
@@global.character_set_client
big5
SET @@global.character_set_client = 2;
SELECT @@global.character_set_client;
@@global.character_set_client
latin2
SET @@global.character_set_client = 3;
SELECT @@global.character_set_client;
@@global.character_set_client
dec8
SET @@global.character_set_client = 36;
SELECT @@global.character_set_client;
@@global.character_set_client
cp866
SET @@global.character_set_client = 99;
SELECT @@global.character_set_client;
@@global.character_set_client
cp1250
SET @@global.character_set_client = 100;
ERROR 42000: Unknown character set: '100'
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
@total_charset
36
'Bug # 34843: character sets are mapped in such a way that 100 and following';
'numbers gives error, and before 100 the 36 mapped wraps arround';
'several times.';
'#--------------------FN_DYNVARS_010_10-------------------------#'
SET @@character_set_client = abc;
ERROR 42000: Unknown character set: 'abc'
SET @@character_set_client = 1utf8;
ERROR 42000: Unknown character set: '1utf8'
SET @@character_set_client = 0;
ERROR 42000: Unknown character set: '0'
SET @@character_set_client = 1.1;
ERROR 42000: Incorrect argument type to variable 'character_set_client'
SET @@character_set_client = -1;
ERROR 42000: Unknown character set: '-1'
SET @@character_set_client = '';
ERROR 42000: Unknown character set: ''
SET @@character_set_client = 'utf';
ERROR 42000: Unknown character set: 'utf'
SET @@character_set_client = true;
SELECT @@character_set_client AS res_with_true;
res_with_true
big5
SET @@character_set_client = ON;
ERROR 42000: Unknown character set: 'ON'
'#--------------------FN_DYNVARS_010_11-------------------------#'
SET @@global.character_set_client = abc;
ERROR 42000: Unknown character set: 'abc'
SET @@global.character_set_client = 1utf8;
ERROR 42000: Unknown character set: '1utf8'
SET @@global.character_set_client = 0;
ERROR 42000: Unknown character set: '0'
SET @@global.character_set_client = 1.1;
ERROR 42000: Incorrect argument type to variable 'character_set_client'
SET @@global.character_set_client = -1;
ERROR 42000: Unknown character set: '-1'
SET @@global.character_set_client = '';
ERROR 42000: Unknown character set: ''
SET @@global.character_set_client = 'utf';
ERROR 42000: Unknown character set: 'utf'
SET @@global.character_set_client = true;
SET @@global.character_set_client = ON;
ERROR 42000: Unknown character set: 'ON'
'#--------------------FN_DYNVARS_010_12-------------------------#'
SELECT @@global.character_set_client =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='character_set_client') AS res;
res
1
SET @@global.character_set_client = 1;
SELECT @@global.character_set_client;
@@global.character_set_client
big5
SELECT @@global.character_set_client =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='character_set_client') AS res;
res
1
'#--------------------FN_DYNVARS_010_13-------------------------#'
SELECT @@character_set_client =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_client') AS res;
res
1
SELECT @@local.character_set_client =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_client') AS res;
res
1
SELECT @@session.character_set_client =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_client') AS res;
res
1
SET @@global.character_set_client = @global_start_value;
SELECT @@global.character_set_client;
@@global.character_set_client
latin1
SET @@session.character_set_client = @session_start_value;
SELECT @@session.character_set_client;
@@session.character_set_client
latin1

View file

@ -0,0 +1,38 @@
'#--------------------FN_DYNVARS_010_01-------------------------#'
SET @global_character_set_client = @@global.character_set_client;
SET @session_character_set_client = @@session.character_set_client;
SET @@global.character_set_client = utf8;
'connect (con1,localhost,root,,,,)'
'connection con1'
SELECT @@global.character_set_client;
@@global.character_set_client
utf8
SELECT @@session.character_set_client;
@@session.character_set_client
latin1
'Bug# 35372: session character_set_client is not effected by global character_set_client'
'#--------------------FN_DYNVARS_010_02-------------------------#'
'connection default'
SHOW VARIABLES like 'character_set_client';
Variable_name Value
character_set_client latin1
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(a CHAR(3) character set utf8);
'---verifying character_set_client with a utf8 character----'
'For latin1 characterset';
SET @@session.character_set_client = latin1;
INSERT INTO t1 values('è');
SELECT a,CHAR_LENGTH(a) FROM t1;
a CHAR_LENGTH(a)
è 2
DELETE FROM t1;
'For utf8 characterset';
SET @@session.character_set_client = utf8;
INSERT INTO t1 values('è');
SELECT a,CHAR_LENGTH(a) FROM t1;
a CHAR_LENGTH(a)
 1
DELETE FROM t1;
DROP TABLE IF EXISTS t1;
SET @@global.character_set_client = @global_character_set_client;
SET @@session.character_set_client = @session_character_set_client;

View file

@ -0,0 +1,508 @@
SET @global_start_value = @@global.character_set_connection;
SELECT @global_start_value;
@global_start_value
latin1
SET @session_start_value = @@character_set_connection;
SELECT @session_start_value;
@session_start_value
latin1
SET @session_start_value = @@local.character_set_connection;
SELECT @session_start_value;
@session_start_value
latin1
SET @session_start_value = @@session.character_set_connection;
SELECT @session_start_value;
@session_start_value
latin1
'#--------------------FN_DYNVARS_011_01------------------#'
SELECT character_set_connection;
ERROR 42S22: Unknown column 'character_set_connection' in 'field list'
SET character_set_connection=utf8;
SELECT @@session.character_set_connection;
@@session.character_set_connection
utf8
SET global.character_set_connection=utf8;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'character_set_connection=utf8' at line 1
SET session character_set_connection=utf8;
SELECT session character_set_connection;
ERROR 42S22: Unknown column 'session' in 'field list'
SET global character_set_connection=utf8;
SELECT global character_set_connection;
ERROR 42S22: Unknown column 'global' in 'field list'
'#--------------------FN_DYNVARS_011_02-------------------------#'
SET @@character_set_connection = latin5;
SET @@character_set_connection = DEFAULT;
SELECT @@character_set_connection AS DEFAULT_VALUE;
DEFAULT_VALUE
utf8
SET @@global.character_set_connection = latin5;
SET @@global.character_set_connection = DEFAULT;
SELECT @@global.character_set_connection;
@@global.character_set_connection
latin1
'#--------------------FN_DYNVARS_011_03-------------------------#'
SET @@session.character_set_connection = utf8;
SELECT @@session.character_set_connection;
@@session.character_set_connection
utf8
SET @@global.character_set_connection = latin2;
SELECT @@global.character_set_connection;
@@global.character_set_connection
latin2
SELECT @@session.character_set_connection AS res_is_utf8;
res_is_utf8
utf8
SET @@session.character_set_connection = latin5;
SELECT @@session.character_set_connection;
@@session.character_set_connection
latin5
SELECT @@global.character_set_connection AS res_is_latin2;
res_is_latin2
latin2
SELECT @@global.character_set_connection=@@session.character_set_connection
AS res_is_false;
res_is_false
0
'#--------------------FN_DYNVARS_011_04-------------------------#'
SELECT @@character_set_connection = @@session.character_set_connection AS res;
res
1
SELECT @@character_set_connection = @@local.character_set_connection AS res;
res
1
'#--------------------FN_DYNVARS_011_05-------------------------#'
SET @@character_set_connection = utf8 + latin2;
ERROR 42S22: Unknown column 'utf8' in 'field list'
'#--------------------FN_DYNVARS_011_06-------------------------#'
SET @@session.character_set_connection = big5;
SELECT @@session.character_set_connection;
@@session.character_set_connection
big5
SET @@session.character_set_connection = dec8;
SELECT @@session.character_set_connection;
@@session.character_set_connection
dec8
SET @@session.character_set_connection = cp850;
SELECT @@session.character_set_connection;
@@session.character_set_connection
cp850
SET @@session.character_set_connection = hp8;
SELECT @@session.character_set_connection;
@@session.character_set_connection
hp8
SET @@session.character_set_connection = koi8r;
SELECT @@session.character_set_connection;
@@session.character_set_connection
koi8r
SET @@session.character_set_connection = latin1;
SELECT @@session.character_set_connection;
@@session.character_set_connection
latin1
SET @@session.character_set_connection = latin2;
SELECT @@session.character_set_connection;
@@session.character_set_connection
latin2
SET @@session.character_set_connection = swe7;
SELECT @@session.character_set_connection;
@@session.character_set_connection
swe7
SET @@session.character_set_connection = ascii;
SELECT @@session.character_set_connection;
@@session.character_set_connection
ascii
SET @@session.character_set_connection = ujis;
SELECT @@session.character_set_connection;
@@session.character_set_connection
ujis
SET @@session.character_set_connection = sjis;
SELECT @@session.character_set_connection;
@@session.character_set_connection
sjis
SET @@session.character_set_connection = hebrew;
SELECT @@session.character_set_connection;
@@session.character_set_connection
hebrew
SET @@session.character_set_connection = tis620;
SELECT @@session.character_set_connection;
@@session.character_set_connection
tis620
SET @@session.character_set_connection = euckr;
SELECT @@session.character_set_connection;
@@session.character_set_connection
euckr
SET @@session.character_set_connection = koi8u;
SELECT @@session.character_set_connection;
@@session.character_set_connection
koi8u
SET @@session.character_set_connection = gb2312;
SELECT @@session.character_set_connection;
@@session.character_set_connection
gb2312
SET @@session.character_set_connection = greek;
SELECT @@session.character_set_connection;
@@session.character_set_connection
greek
SET @@session.character_set_connection = cp1250;
SELECT @@session.character_set_connection;
@@session.character_set_connection
cp1250
SET @@session.character_set_connection = gbk;
SELECT @@session.character_set_connection;
@@session.character_set_connection
gbk
SET @@session.character_set_connection = latin5;
SELECT @@session.character_set_connection;
@@session.character_set_connection
latin5
SET @@session.character_set_connection = armscii8;
SELECT @@session.character_set_connection;
@@session.character_set_connection
armscii8
SET @@session.character_set_connection = utf8;
SELECT @@session.character_set_connection;
@@session.character_set_connection
utf8
SET @@session.character_set_connection = ucs2;
SELECT @@session.character_set_connection;
@@session.character_set_connection
ucs2
SET @@session.character_set_connection = cp866;
SELECT @@session.character_set_connection;
@@session.character_set_connection
cp866
SET @@session.character_set_connection = keybcs2;
SELECT @@session.character_set_connection;
@@session.character_set_connection
keybcs2
SET @@session.character_set_connection = macce;
SELECT @@session.character_set_connection;
@@session.character_set_connection
macce
SET @@session.character_set_connection = macroman;
SELECT @@session.character_set_connection;
@@session.character_set_connection
macroman
SET @@session.character_set_connection = cp852;
SELECT @@session.character_set_connection;
@@session.character_set_connection
cp852
SET @@session.character_set_connection = latin7;
SELECT @@session.character_set_connection;
@@session.character_set_connection
latin7
SET @@session.character_set_connection = cp1251;
SELECT @@session.character_set_connection;
@@session.character_set_connection
cp1251
SET @@session.character_set_connection = cp1256;
SELECT @@session.character_set_connection;
@@session.character_set_connection
cp1256
SET @@session.character_set_connection = cp1257;
SELECT @@session.character_set_connection;
@@session.character_set_connection
cp1257
SET @@session.character_set_connection = binary;
SELECT @@session.character_set_connection;
@@session.character_set_connection
binary
SET @@session.character_set_connection = geostd8;
SELECT @@session.character_set_connection;
@@session.character_set_connection
geostd8
SET @@session.character_set_connection = cp932;
SELECT @@session.character_set_connection;
@@session.character_set_connection
cp932
SET @@session.character_set_connection = eucjpms;
SELECT @@session.character_set_connection;
@@session.character_set_connection
eucjpms
'#--------------------FN_DYNVARS_011_07-------------------------#'
SET @@global.character_set_connection = big5;
SELECT @@global.character_set_connection;
@@global.character_set_connection
big5
SET @@global.character_set_connection = dec8;
SELECT @@global.character_set_connection;
@@global.character_set_connection
dec8
SET @@global.character_set_connection = cp850;
SELECT @@global.character_set_connection;
@@global.character_set_connection
cp850
SET @@global.character_set_connection = hp8;
SELECT @@global.character_set_connection;
@@global.character_set_connection
hp8
SET @@global.character_set_connection = koi8r;
SELECT @@global.character_set_connection;
@@global.character_set_connection
koi8r
SET @@global.character_set_connection = latin1;
SELECT @@global.character_set_connection;
@@global.character_set_connection
latin1
SET @@global.character_set_connection = latin2;
SELECT @@global.character_set_connection;
@@global.character_set_connection
latin2
SET @@global.character_set_connection = swe7;
SELECT @@global.character_set_connection;
@@global.character_set_connection
swe7
SET @@global.character_set_connection = ascii;
SELECT @@global.character_set_connection;
@@global.character_set_connection
ascii
SET @@global.character_set_connection = ujis;
SELECT @@global.character_set_connection;
@@global.character_set_connection
ujis
SET @@global.character_set_connection = sjis;
SELECT @@global.character_set_connection;
@@global.character_set_connection
sjis
SET @@global.character_set_connection = hebrew;
SELECT @@global.character_set_connection;
@@global.character_set_connection
hebrew
SET @@global.character_set_connection = tis620;
SELECT @@global.character_set_connection;
@@global.character_set_connection
tis620
SET @@global.character_set_connection = euckr;
SELECT @@global.character_set_connection;
@@global.character_set_connection
euckr
SET @@global.character_set_connection = koi8u;
SELECT @@global.character_set_connection;
@@global.character_set_connection
koi8u
SET @@global.character_set_connection = gb2312;
SELECT @@global.character_set_connection;
@@global.character_set_connection
gb2312
SET @@global.character_set_connection = greek;
SELECT @@global.character_set_connection;
@@global.character_set_connection
greek
SET @@global.character_set_connection = cp1250;
SELECT @@global.character_set_connection;
@@global.character_set_connection
cp1250
SET @@global.character_set_connection = gbk;
SELECT @@global.character_set_connection;
@@global.character_set_connection
gbk
SET @@global.character_set_connection = latin5;
SELECT @@global.character_set_connection;
@@global.character_set_connection
latin5
SET @@global.character_set_connection = armscii8;
SELECT @@global.character_set_connection;
@@global.character_set_connection
armscii8
SET @@global.character_set_connection = utf8;
SELECT @@global.character_set_connection;
@@global.character_set_connection
utf8
SET @@global.character_set_connection = ucs2;
SELECT @@global.character_set_connection;
@@global.character_set_connection
ucs2
SET @@global.character_set_connection = cp866;
SELECT @@global.character_set_connection;
@@global.character_set_connection
cp866
SET @@global.character_set_connection = keybcs2;
SELECT @@global.character_set_connection;
@@global.character_set_connection
keybcs2
SET @@global.character_set_connection = macce;
SELECT @@global.character_set_connection;
@@global.character_set_connection
macce
SET @@global.character_set_connection = macroman;
SELECT @@global.character_set_connection;
@@global.character_set_connection
macroman
SET @@global.character_set_connection = cp852;
SELECT @@global.character_set_connection;
@@global.character_set_connection
cp852
SET @@global.character_set_connection = latin7;
SELECT @@global.character_set_connection;
@@global.character_set_connection
latin7
SET @@global.character_set_connection = cp1251;
SELECT @@global.character_set_connection;
@@global.character_set_connection
cp1251
SET @@global.character_set_connection = cp1256;
SELECT @@global.character_set_connection;
@@global.character_set_connection
cp1256
SET @@global.character_set_connection = cp1257;
SELECT @@global.character_set_connection;
@@global.character_set_connection
cp1257
SET @@global.character_set_connection = binary;
SELECT @@global.character_set_connection;
@@global.character_set_connection
binary
SET @@global.character_set_connection = geostd8;
SELECT @@global.character_set_connection;
@@global.character_set_connection
geostd8
SET @@global.character_set_connection = cp932;
SELECT @@global.character_set_connection;
@@global.character_set_connection
cp932
SET @@global.character_set_connection = eucjpms;
SELECT @@global.character_set_connection;
@@global.character_set_connection
eucjpms
'#--------------------FN_DYNVARS_011_08-------------------------#'
SET @@character_set_connection = UTF8;
SELECT @@character_set_connection;
@@character_set_connection
utf8
SET @@character_set_connection = utf8;
SELECT @@character_set_connection;
@@character_set_connection
utf8
SET @@global.character_set_connection = uTf8;
SELECT @@global.character_set_connection;
@@global.character_set_connection
utf8
'#--------------------FN_DYNVARS_011_09-------------------------#'
SET @@character_set_connection = 1;
SELECT @@character_set_connection;
@@character_set_connection
big5
SET @@character_set_connection = 2;
SELECT @@character_set_connection;
@@character_set_connection
latin2
SET @@character_set_connection = 3;
SELECT @@character_set_connection;
@@character_set_connection
dec8
SET @@character_set_connection = 36;
SELECT @@character_set_connection;
@@character_set_connection
cp866
SET @@character_set_connection = 99;
SELECT @@character_set_connection;
@@character_set_connection
cp1250
SET @@character_set_connection = 100;
ERROR 42000: Unknown character set: '100'
SET @@global.character_set_connection = 1;
SELECT @@global.character_set_connection;
@@global.character_set_connection
big5
SET @@global.character_set_connection = 2;
SELECT @@global.character_set_connection;
@@global.character_set_connection
latin2
SET @@global.character_set_connection = 3;
SELECT @@global.character_set_connection;
@@global.character_set_connection
dec8
SET @@global.character_set_connection = 36;
SELECT @@global.character_set_connection;
@@global.character_set_connection
cp866
SET @@global.character_set_connection = 99;
SELECT @@global.character_set_connection;
@@global.character_set_connection
cp1250
SET @@global.character_set_connection = 100;
ERROR 42000: Unknown character set: '100'
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
@total_charset
36
'Bug # 34843: character sets are mapped in such a way that 100 and following ';
'numbers gives error, and before 100 the 36 mapped wraps arround';
'several times.';
'#--------------------FN_DYNVARS_011_10-------------------------#'
SET @@character_set_connection = abc;
ERROR 42000: Unknown character set: 'abc'
SET @@character_set_connection = 1utf8;
ERROR 42000: Unknown character set: '1utf8'
SET @@character_set_connection = 0;
ERROR 42000: Unknown character set: '0'
SET @@character_set_connection = 1.1;
ERROR 42000: Incorrect argument type to variable 'character_set_connection'
SET @@character_set_connection = -1;
ERROR 42000: Unknown character set: '-1'
SET @@character_set_connection = 'utf8 ';
ERROR 42000: Unknown character set: 'utf8 '
SET @@character_set_connection = 'lätin2';
ERROR 42000: Unknown character set: 'lätin2'
SET @@character_set_connection = true;
SELECT @@character_set_connection AS res_with_true;
res_with_true
big5
SET @@character_set_connection = ON;
ERROR 42000: Unknown character set: 'ON'
'#--------------------FN_DYNVARS_011_11-------------------------#'
SET @@global.character_set_connection = abc;
ERROR 42000: Unknown character set: 'abc'
SET @@global.character_set_connection = 1utf8;
ERROR 42000: Unknown character set: '1utf8'
SET @@global.character_set_connection = 0;
ERROR 42000: Unknown character set: '0'
SET @@global.character_set_connection = 1.1;
ERROR 42000: Incorrect argument type to variable 'character_set_connection'
SET @@global.character_set_connection = -1;
ERROR 42000: Unknown character set: '-1'
SET @@global.character_set_connection = '';
ERROR 42000: Unknown character set: ''
SET @@global.character_set_connection = 'utf';
ERROR 42000: Unknown character set: 'utf'
SET @@global.character_set_connection = true;
SET @@global.character_set_connection = ON;
ERROR 42000: Unknown character set: 'ON'
'#--------------------FN_DYNVARS_011_12-------------------------#'
SELECT @@global.character_set_connection =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='character_set_connection') AS res;
res
1
SET @@global.character_set_connection = 1;
SELECT @@global.character_set_connection;
@@global.character_set_connection
big5
SELECT @@global.character_set_connection =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='character_set_connection') AS res;
res
1
'#--------------------FN_DYNVARS_011_13-------------------------#'
SELECT @@character_set_connection =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_connection') AS res;
res
1
SELECT @@local.character_set_connection =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_connection') AS res;
res
1
SELECT @@session.character_set_connection =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_connection') AS res;
res
1
SET @@global.character_set_connection = @global_start_value;
SELECT @@global.character_set_connection;
@@global.character_set_connection
latin1
SET @@session.character_set_connection = @session_start_value;
SELECT @@session.character_set_connection;
@@session.character_set_connection
latin1

View file

@ -0,0 +1,55 @@
'#--------------------FN_DYNVARS_011_01-------------------------#'
SET @global_character_set_connection = @@global.character_set_connection;
SET @session_character_set_connection = @@session.character_set_connection;
SET @session_character_set_client = @@session.character_set_client;
SET @session_character_set_results = @@session.character_set_results;
SET @@global.character_set_connection = utf8;
'connect (con1,localhost,root,,,,)'
'connection con1'
SELECT @@global.character_set_connection;
@@global.character_set_connection
utf8
SELECT @@session.character_set_connection;
@@session.character_set_connection
utf8
'#--------------------FN_DYNVARS_011_02-------------------------#'
'connection default'
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(b CHAR(40) character set utf8);
'--verify that character_set_connection converts character_set_client--'
SET @@session.character_set_client = utf8;
SET @@session.character_set_results = utf8;
SET @@session.character_set_connection = latin1;
SELECT 'ЁЂЃЄ' AS utf_text;
utf_text
????
SET @@session.character_set_connection = utf8;
SELECT 'ЁЂЃЄ' AS utf_text;
utf_text
ЁЂЃЄ
'---now inserting utf8 string with different character_set_connection--'
SET @@session.character_set_connection = ascii;
INSERT INTO t1 VALUES('ЁЂЃЄ');
SELECT * FROM t1;
b
????
TRUNCATE TABLE t1;
'--now client & results charset in latin1 & connection charset in ascii-'
SET @@session.character_set_connection = ascii;
SET @@session.character_set_client = latin1;
SET @@session.character_set_results = latin1;
INSERT INTO t1 VALUES('ЁЂЃЄ');
SELECT * FROM t1;
b
????????
TRUNCATE TABLE t1;
SET NAMES utf8;
INSERT INTO t1 VALUES('ЁЂЃЄ');
SELECT * FROM t1;
b
ЁЂЃЄ
TRUNCATE TABLE t1;
SET @@global.character_set_connection = @global_character_set_connection;
SET @@session.character_set_connection = @session_character_set_connection;
SET @@session.character_set_client = @session_character_set_client;
SET @@session.character_set_results = @session_character_set_results;

View file

@ -0,0 +1,507 @@
SET @global_start_value = @@global.character_set_database;
SELECT @global_start_value;
@global_start_value
latin1
SET @session_start_value = @@character_set_database;
SELECT @session_start_value;
@session_start_value
latin1
SET @session_start_value = @@local.character_set_database;
SELECT @session_start_value;
@session_start_value
latin1
SET @session_start_value = @@session.character_set_database;
SELECT @session_start_value;
@session_start_value
latin1
'#--------------------FN_DYNVARS_012_01------------------#'
SELECT character_set_database;
ERROR 42S22: Unknown column 'character_set_database' in 'field list'
SET character_set_database=utf8;
SELECT @@session.character_set_database;
@@session.character_set_database
utf8
SET global.character_set_database=utf8;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'character_set_database=utf8' at line 1
SET session character_set_database=utf8;
SELECT session character_set_database;
ERROR 42S22: Unknown column 'session' in 'field list'
SET global character_set_database=utf8;
SELECT global character_set_database;
ERROR 42S22: Unknown column 'global' in 'field list'
'#--------------------FN_DYNVARS_012_02-------------------------#'
SET @@character_set_database = latin5;
SET @@character_set_database = DEFAULT;
SELECT @@character_set_database AS DEFAULT_VALUE;
DEFAULT_VALUE
latin1
SET @@global.character_set_database = latin5;
SET @@global.character_set_database = DEFAULT;
SELECT @@global.character_set_database;
@@global.character_set_database
latin1
'#--------------------FN_DYNVARS_012_03-------------------------#'
SET @@session.character_set_database = utf8;
SELECT @@session.character_set_database;
@@session.character_set_database
utf8
SET @@global.character_set_database = latin2;
SELECT @@global.character_set_database;
@@global.character_set_database
latin2
SELECT @@session.character_set_database AS res_is_utf8;
res_is_utf8
utf8
SET @@session.character_set_database = latin5;
SELECT @@session.character_set_database;
@@session.character_set_database
latin5
SELECT @@global.character_set_database AS res_is_latin2;
res_is_latin2
latin2
SELECT @@global.character_set_database=@@session.character_set_database
AS res_is_false;
res_is_false
0
'#--------------------FN_DYNVARS_012_04-------------------------#'
SELECT @@character_set_database = @@session.character_set_database AS res;
res
1
SELECT @@character_set_database = @@local.character_set_database AS res;
res
1
'#--------------------FN_DYNVARS_012_05-------------------------#'
SET @@character_set_database = utf8 + latin2;
ERROR 42S22: Unknown column 'utf8' in 'field list'
'#--------------------FN_DYNVARS_012_06-------------------------#'
SET @@session.character_set_database = big5;
SELECT @@session.character_set_database;
@@session.character_set_database
big5
SET @@session.character_set_database = dec8;
SELECT @@session.character_set_database;
@@session.character_set_database
dec8
SET @@session.character_set_database = cp850;
SELECT @@session.character_set_database;
@@session.character_set_database
cp850
SET @@session.character_set_database = hp8;
SELECT @@session.character_set_database;
@@session.character_set_database
hp8
SET @@session.character_set_database = koi8r;
SELECT @@session.character_set_database;
@@session.character_set_database
koi8r
SET @@session.character_set_database = latin1;
SELECT @@session.character_set_database;
@@session.character_set_database
latin1
SET @@session.character_set_database = latin2;
SELECT @@session.character_set_database;
@@session.character_set_database
latin2
SET @@session.character_set_database = swe7;
SELECT @@session.character_set_database;
@@session.character_set_database
swe7
SET @@session.character_set_database = ascii;
SELECT @@session.character_set_database;
@@session.character_set_database
ascii
SET @@session.character_set_database = ujis;
SELECT @@session.character_set_database;
@@session.character_set_database
ujis
SET @@session.character_set_database = sjis;
SELECT @@session.character_set_database;
@@session.character_set_database
sjis
SET @@session.character_set_database = hebrew;
SELECT @@session.character_set_database;
@@session.character_set_database
hebrew
SET @@session.character_set_database = tis620;
SELECT @@session.character_set_database;
@@session.character_set_database
tis620
SET @@session.character_set_database = euckr;
SELECT @@session.character_set_database;
@@session.character_set_database
euckr
SET @@session.character_set_database = koi8u;
SELECT @@session.character_set_database;
@@session.character_set_database
koi8u
SET @@session.character_set_database = gb2312;
SELECT @@session.character_set_database;
@@session.character_set_database
gb2312
SET @@session.character_set_database = greek;
SELECT @@session.character_set_database;
@@session.character_set_database
greek
SET @@session.character_set_database = cp1250;
SELECT @@session.character_set_database;
@@session.character_set_database
cp1250
SET @@session.character_set_database = gbk;
SELECT @@session.character_set_database;
@@session.character_set_database
gbk
SET @@session.character_set_database = latin5;
SELECT @@session.character_set_database;
@@session.character_set_database
latin5
SET @@session.character_set_database = armscii8;
SELECT @@session.character_set_database;
@@session.character_set_database
armscii8
SET @@session.character_set_database = utf8;
SELECT @@session.character_set_database;
@@session.character_set_database
utf8
SET @@session.character_set_database = ucs2;
SELECT @@session.character_set_database;
@@session.character_set_database
ucs2
SET @@session.character_set_database = cp866;
SELECT @@session.character_set_database;
@@session.character_set_database
cp866
SET @@session.character_set_database = keybcs2;
SELECT @@session.character_set_database;
@@session.character_set_database
keybcs2
SET @@session.character_set_database = macce;
SELECT @@session.character_set_database;
@@session.character_set_database
macce
SET @@session.character_set_database = macroman;
SELECT @@session.character_set_database;
@@session.character_set_database
macroman
SET @@session.character_set_database = cp852;
SELECT @@session.character_set_database;
@@session.character_set_database
cp852
SET @@session.character_set_database = latin7;
SELECT @@session.character_set_database;
@@session.character_set_database
latin7
SET @@session.character_set_database = cp1251;
SELECT @@session.character_set_database;
@@session.character_set_database
cp1251
SET @@session.character_set_database = cp1256;
SELECT @@session.character_set_database;
@@session.character_set_database
cp1256
SET @@session.character_set_database = cp1257;
SELECT @@session.character_set_database;
@@session.character_set_database
cp1257
SET @@session.character_set_database = binary;
SELECT @@session.character_set_database;
@@session.character_set_database
binary
SET @@session.character_set_database = geostd8;
SELECT @@session.character_set_database;
@@session.character_set_database
geostd8
SET @@session.character_set_database = cp932;
SELECT @@session.character_set_database;
@@session.character_set_database
cp932
SET @@session.character_set_database = eucjpms;
SELECT @@session.character_set_database;
@@session.character_set_database
eucjpms
'#--------------------FN_DYNVARS_012_07-------------------------#'
SET @@global.character_set_database = big5;
SELECT @@global.character_set_database;
@@global.character_set_database
big5
SET @@global.character_set_database = dec8;
SELECT @@global.character_set_database;
@@global.character_set_database
dec8
SET @@global.character_set_database = cp850;
SELECT @@global.character_set_database;
@@global.character_set_database
cp850
SET @@global.character_set_database = hp8;
SELECT @@global.character_set_database;
@@global.character_set_database
hp8
SET @@global.character_set_database = koi8r;
SELECT @@global.character_set_database;
@@global.character_set_database
koi8r
SET @@global.character_set_database = latin1;
SELECT @@global.character_set_database;
@@global.character_set_database
latin1
SET @@global.character_set_database = latin2;
SELECT @@global.character_set_database;
@@global.character_set_database
latin2
SET @@global.character_set_database = swe7;
SELECT @@global.character_set_database;
@@global.character_set_database
swe7
SET @@global.character_set_database = ascii;
SELECT @@global.character_set_database;
@@global.character_set_database
ascii
SET @@global.character_set_database = ujis;
SELECT @@global.character_set_database;
@@global.character_set_database
ujis
SET @@global.character_set_database = sjis;
SELECT @@global.character_set_database;
@@global.character_set_database
sjis
SET @@global.character_set_database = hebrew;
SELECT @@global.character_set_database;
@@global.character_set_database
hebrew
SET @@global.character_set_database = tis620;
SELECT @@global.character_set_database;
@@global.character_set_database
tis620
SET @@global.character_set_database = euckr;
SELECT @@global.character_set_database;
@@global.character_set_database
euckr
SET @@global.character_set_database = koi8u;
SELECT @@global.character_set_database;
@@global.character_set_database
koi8u
SET @@global.character_set_database = gb2312;
SELECT @@global.character_set_database;
@@global.character_set_database
gb2312
SET @@global.character_set_database = greek;
SELECT @@global.character_set_database;
@@global.character_set_database
greek
SET @@global.character_set_database = cp1250;
SELECT @@global.character_set_database;
@@global.character_set_database
cp1250
SET @@global.character_set_database = gbk;
SELECT @@global.character_set_database;
@@global.character_set_database
gbk
SET @@global.character_set_database = latin5;
SELECT @@global.character_set_database;
@@global.character_set_database
latin5
SET @@global.character_set_database = armscii8;
SELECT @@global.character_set_database;
@@global.character_set_database
armscii8
SET @@global.character_set_database = utf8;
SELECT @@global.character_set_database;
@@global.character_set_database
utf8
SET @@global.character_set_database = ucs2;
SELECT @@global.character_set_database;
@@global.character_set_database
ucs2
SET @@global.character_set_database = cp866;
SELECT @@global.character_set_database;
@@global.character_set_database
cp866
SET @@global.character_set_database = keybcs2;
SELECT @@global.character_set_database;
@@global.character_set_database
keybcs2
SET @@global.character_set_database = macce;
SELECT @@global.character_set_database;
@@global.character_set_database
macce
SET @@global.character_set_database = macroman;
SELECT @@global.character_set_database;
@@global.character_set_database
macroman
SET @@global.character_set_database = cp852;
SELECT @@global.character_set_database;
@@global.character_set_database
cp852
SET @@global.character_set_database = latin7;
SELECT @@global.character_set_database;
@@global.character_set_database
latin7
SET @@global.character_set_database = cp1251;
SELECT @@global.character_set_database;
@@global.character_set_database
cp1251
SET @@global.character_set_database = cp1256;
SELECT @@global.character_set_database;
@@global.character_set_database
cp1256
SET @@global.character_set_database = cp1257;
SELECT @@global.character_set_database;
@@global.character_set_database
cp1257
SET @@global.character_set_database = binary;
SELECT @@global.character_set_database;
@@global.character_set_database
binary
SET @@global.character_set_database = geostd8;
SELECT @@global.character_set_database;
@@global.character_set_database
geostd8
SET @@global.character_set_database = cp932;
SELECT @@global.character_set_database;
@@global.character_set_database
cp932
SET @@global.character_set_database = eucjpms;
SELECT @@global.character_set_database;
@@global.character_set_database
eucjpms
'#--------------------FN_DYNVARS_012_08-------------------------#'
SET @@character_set_database = UTF8;
SELECT @@character_set_database;
@@character_set_database
utf8
SET @@character_set_database = utf8;
SELECT @@character_set_database;
@@character_set_database
utf8
SET @@global.character_set_database = uTf8;
SELECT @@global.character_set_database;
@@global.character_set_database
utf8
'#--------------------FN_DYNVARS_012_09-------------------------#'
SET @@character_set_database = 1;
SELECT @@character_set_database;
@@character_set_database
big5
SET @@character_set_database = 2;
SELECT @@character_set_database;
@@character_set_database
latin2
SET @@character_set_database = 3;
SELECT @@character_set_database;
@@character_set_database
dec8
SET @@character_set_database = 36;
SELECT @@character_set_database;
@@character_set_database
cp866
SET @@character_set_database = 99;
SELECT @@character_set_database;
@@character_set_database
cp1250
SET @@character_set_database = 100;
ERROR 42000: Unknown character set: '100'
SET @@global.character_set_database = 1;
SELECT @@global.character_set_database;
@@global.character_set_database
big5
SET @@global.character_set_database = 2;
SELECT @@global.character_set_database;
@@global.character_set_database
latin2
SET @@global.character_set_database = 3;
SELECT @@global.character_set_database;
@@global.character_set_database
dec8
SET @@global.character_set_database = 36;
SELECT @@global.character_set_database;
@@global.character_set_database
cp866
SET @@global.character_set_database = 99;
SELECT @@global.character_set_database;
@@global.character_set_database
cp1250
SET @@global.character_set_database = 100;
ERROR 42000: Unknown character set: '100'
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
@total_charset
36
'Bug # 34843: character sets are mapped in such a way that 100 and following';
'numbers gives error, and before 100 the 36 mapped wraps arround several times.';
'#--------------------FN_DYNVARS_012_10-------------------------#'
SET @@character_set_database = "grek";
ERROR 42000: Unknown character set: 'grek'
SET @@character_set_database = utf 8;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '8' at line 1
SET @@character_set_database = 0;
ERROR 42000: Unknown character set: '0'
SET @@character_set_database = 1.1;
ERROR 42000: Incorrect argument type to variable 'character_set_database'
SET @@character_set_database = -1;
ERROR 42000: Unknown character set: '-1'
SET @@character_set_database = '';
ERROR 42000: Unknown character set: ''
SET @@character_set_database = 'latin 2';
ERROR 42000: Unknown character set: 'latin 2'
SET @@character_set_database = true;
SELECT @@character_set_database AS res_with_true;
res_with_true
big5
SET @@character_set_database = ON;
ERROR 42000: Unknown character set: 'ON'
'#--------------------FN_DYNVARS_012_11-------------------------#'
SET @@global.character_set_database = abc;
ERROR 42000: Unknown character set: 'abc'
SET @@global.character_set_database = 1utf8;
ERROR 42000: Unknown character set: '1utf8'
SET @@global.character_set_database = 0;
ERROR 42000: Unknown character set: '0'
SET @@global.character_set_database = 1.1;
ERROR 42000: Incorrect argument type to variable 'character_set_database'
SET @@global.character_set_database = -1;
ERROR 42000: Unknown character set: '-1'
SET @@global.character_set_database = '';
ERROR 42000: Unknown character set: ''
SET @@global.character_set_database = 'utf';
ERROR 42000: Unknown character set: 'utf'
SET @@global.character_set_database = true;
SET @@global.character_set_database = ON;
ERROR 42000: Unknown character set: 'ON'
'#--------------------FN_DYNVARS_012_12-------------------------#'
SELECT @@global.character_set_database =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='character_set_database') AS res;
res
1
SET @@global.character_set_database = 1;
SELECT @@global.character_set_database;
@@global.character_set_database
big5
SELECT @@global.character_set_database =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='character_set_database') AS res;
res
1
'#--------------------FN_DYNVARS_012_13-------------------------#'
SELECT @@character_set_database =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_database') AS res;
res
1
SELECT @@local.character_set_database =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_database') AS res;
res
1
SELECT @@session.character_set_database =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_database') AS res;
res
1
SET @@global.character_set_database = @global_start_value;
SELECT @@global.character_set_database;
@@global.character_set_database
latin1
SET @@session.character_set_database = @session_start_value;
SELECT @@session.character_set_database;
@@session.character_set_database
latin1

View file

@ -0,0 +1,76 @@
'#--------------------FN_DYNVARS_008_01-------------------------#'
SET @global_character_set_database = @@global.character_set_database;
SET @session_character_set_database = @@session.character_set_database;
SET @session_character_set_server = @@session.character_set_server;
SET @@global.character_set_database = utf8;
'connect (con1,localhost,root,,,,)'
'connection con1'
SELECT @@global.character_set_database;
@@global.character_set_database
utf8
SELECT @@session.character_set_database;
@@session.character_set_database
latin1
'Bug#35356: session character_set_database differ from global character_set_database'
'#--------------------FN_DYNVARS_008_02-------------------------#'
'connection default'
DROP TABLE IF EXISTS t1;
'--check if setting session character_set_database effects new databases'
SET @@session.character_set_server = utf8;
SELECT @@session.character_set_database;
@@session.character_set_database
latin1
SET @@session.character_set_database = latin5;
SELECT @@session.character_set_database;
@@session.character_set_database
latin5
CREATE DATABASE db1;
USE db1;
SHOW CREATE DATABASE db1;
Database Create Database
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET utf8 */
CREATE TABLE t1(a INT, b VARCHAR(40));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` varchar(40) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
DROP TABLE t1;
DROP DATABASE db1;
'Bug#35357: character_set_database does not effects CREATE DATABASE without characater set'
'--ascii character set specified--'
CREATE DATABASE db1 CHARACTER SET ascii;
USE db1;
SHOW CREATE DATABASE db1;
Database Create Database
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET ascii */
CREATE TABLE t1(a INT, b VARCHAR(40));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` varchar(40) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=ascii
DROP TABLE t1;
DROP DATABASE db1;
'------Check if load data uses character_set_database----------'
USE test;
CREATE TABLE t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8;
'Verify with latin';
SET @@session.character_set_database = latin1;
LOAD DATA INFILE '../std_data_ln/charset_utf8.txt' INTO TABLE t1;
SELECT count(*) FROM t1 WHERE CHAR_LENGTH(a)>1;
count(*)
2433
TRUNCATE TABLE t1;
'Verify with utf8';
SET @@session.character_set_database = utf8;
LOAD DATA INFILE '../std_data_ln/charset_utf8.txt' INTO TABLE t1;
SELECT count(*) FROM t1 WHERE CHAR_LENGTH(a)>1;
count(*)
1
DROP TABLE IF EXISTS t1;
SET @@global.character_set_database = @global_character_set_database;
SET @@session.character_set_database = @session_character_set_database;
SET @@session.character_set_server = @session_character_set_server;

View file

@ -0,0 +1,485 @@
SET @global_start_value = @@global.character_set_filesystem;
SELECT @global_start_value;
@global_start_value
binary
SET @session_start_value = @@character_set_filesystem;
SELECT @session_start_value;
@session_start_value
binary
SET @session_start_value = @@local.character_set_filesystem;
SELECT @session_start_value;
@session_start_value
binary
SET @session_start_value = @@session.character_set_filesystem;
SELECT @session_start_value;
@session_start_value
binary
'#--------------------FN_DYNVARS_008_01------------------#'
SELECT character_set_filesystem;
ERROR 42S22: Unknown column 'character_set_filesystem' in 'field list'
SET character_set_filesystem=utf8;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
utf8
SET global.character_set_filesystem=utf8;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'character_set_filesystem=utf8' at line 1
SET session character_set_filesystem=utf8;
SELECT session character_set_filesystem;
ERROR 42S22: Unknown column 'session' in 'field list'
SET global character_set_filesystem=utf8;
SELECT global character_set_filesystem;
ERROR 42S22: Unknown column 'global' in 'field list'
'#--------------------FN_DYNVARS_008_02-------------------------#'
SET @@character_set_filesystem = latin5;
SET @@character_set_filesystem = DEFAULT;
SELECT @@character_set_filesystem AS DEFAULT_VALUE;
DEFAULT_VALUE
utf8
SET @@global.character_set_filesystem = latin5;
SET @@global.character_set_filesystem = DEFAULT;
SELECT @@global.character_set_filesystem AS DEFAULT_VALUE;
DEFAULT_VALUE
binary
'#--------------------FN_DYNVARS_008_03-------------------------#'
SET @@session.character_set_filesystem = utf8;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
utf8
SET @@global.character_set_filesystem = latin2;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
latin2
SELECT @@session.character_set_filesystem AS res_is_utf8;
res_is_utf8
utf8
SET @@session.character_set_filesystem = latin5;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
latin5
SELECT @@global.character_set_filesystem AS res_is_latin2;
res_is_latin2
latin2
SELECT @@global.character_set_filesystem=
@@session.character_set_filesystem AS res_is_false;
res_is_false
0
'#--------------------FN_DYNVARS_008_04-------------------------#'
SELECT @@character_set_filesystem = @@session.character_set_filesystem AS res;
res
1
SELECT @@character_set_filesystem = @@local.character_set_filesystem AS res;
res
1
'#--------------------FN_DYNVARS_008_05-------------------------#'
SET @@character_set_filesystem = utf8 + latin2;
ERROR 42S22: Unknown column 'utf8' in 'field list'
'#--------------------FN_DYNVARS_008_06-------------------------#'
SET @@session.character_set_filesystem = big5;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
big5
SET @@session.character_set_filesystem = dec8;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
dec8
SET @@session.character_set_filesystem = cp850;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
cp850
SET @@session.character_set_filesystem = hp8;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
hp8
SET @@session.character_set_filesystem = koi8r;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
koi8r
SET @@session.character_set_filesystem = latin1;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
latin1
SET @@session.character_set_filesystem = latin2;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
latin2
SET @@session.character_set_filesystem = swe7;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
swe7
SET @@session.character_set_filesystem = ascii;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
ascii
SET @@session.character_set_filesystem = ujis;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
ujis
SET @@session.character_set_filesystem = sjis;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
sjis
SET @@session.character_set_filesystem = hebrew;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
hebrew
SET @@session.character_set_filesystem = tis620;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
tis620
SET @@session.character_set_filesystem = euckr;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
euckr
SET @@session.character_set_filesystem = koi8u;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
koi8u
SET @@session.character_set_filesystem = gb2312;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
gb2312
SET @@session.character_set_filesystem = greek;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
greek
SET @@session.character_set_filesystem = cp1250;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
cp1250
SET @@session.character_set_filesystem = gbk;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
gbk
SET @@session.character_set_filesystem = latin5;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
latin5
SET @@session.character_set_filesystem = armscii8;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
armscii8
SET @@session.character_set_filesystem = utf8;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
utf8
SET @@session.character_set_filesystem = ucs2;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
ucs2
SET @@session.character_set_filesystem = cp866;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
cp866
SET @@session.character_set_filesystem = keybcs2;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
keybcs2
SET @@session.character_set_filesystem = macce;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
macce
SET @@session.character_set_filesystem = macroman;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
macroman
SET @@session.character_set_filesystem = cp852;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
cp852
SET @@session.character_set_filesystem = latin7;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
latin7
SET @@session.character_set_filesystem = cp1251;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
cp1251
SET @@session.character_set_filesystem = cp1256;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
cp1256
SET @@session.character_set_filesystem = cp1257;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
cp1257
SET @@session.character_set_filesystem = binary;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
binary
SET @@session.character_set_filesystem = geostd8;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
geostd8
SET @@session.character_set_filesystem = cp932;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
cp932
SET @@session.character_set_filesystem = eucjpms;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
eucjpms
'#--------------------FN_DYNVARS_008_07-------------------------#'
SET @@global.character_set_filesystem = big5;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
big5
SET @@global.character_set_filesystem = dec8;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
dec8
SET @@global.character_set_filesystem = cp850;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
cp850
SET @@global.character_set_filesystem = hp8;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
hp8
SET @@global.character_set_filesystem = koi8r;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
koi8r
SET @@global.character_set_filesystem = latin1;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
latin1
SET @@global.character_set_filesystem = latin2;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
latin2
SET @@global.character_set_filesystem = swe7;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
swe7
SET @@global.character_set_filesystem = ascii;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
ascii
SET @@global.character_set_filesystem = ujis;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
ujis
SET @@global.character_set_filesystem = sjis;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
sjis
SET @@global.character_set_filesystem = hebrew;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
hebrew
SET @@global.character_set_filesystem = tis620;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
tis620
SET @@global.character_set_filesystem = euckr;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
euckr
SET @@global.character_set_filesystem = koi8u;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
koi8u
SET @@global.character_set_filesystem = gb2312;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
gb2312
SET @@global.character_set_filesystem = greek;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
greek
SET @@global.character_set_filesystem = cp1250;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
cp1250
SET @@global.character_set_filesystem = gbk;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
gbk
SET @@global.character_set_filesystem = latin5;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
latin5
SET @@global.character_set_filesystem = armscii8;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
armscii8
SET @@global.character_set_filesystem = utf8;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
utf8
SET @@global.character_set_filesystem = ucs2;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
ucs2
SET @@global.character_set_filesystem = cp866;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
cp866
SET @@global.character_set_filesystem = keybcs2;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
keybcs2
SET @@global.character_set_filesystem = macce;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
macce
SET @@global.character_set_filesystem = macroman;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
macroman
SET @@global.character_set_filesystem = cp852;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
cp852
SET @@global.character_set_filesystem = latin7;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
latin7
SET @@global.character_set_filesystem = cp1251;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
cp1251
SET @@global.character_set_filesystem = cp1256;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
cp1256
SET @@global.character_set_filesystem = cp1257;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
cp1257
SET @@global.character_set_filesystem = binary;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
binary
SET @@global.character_set_filesystem = geostd8;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
geostd8
SET @@global.character_set_filesystem = cp932;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
cp932
SET @@global.character_set_filesystem = eucjpms;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
eucjpms
'#--------------------FN_DYNVARS_008_08-------------------------#'
SET @@character_set_filesystem = UTF8;
SELECT @@character_set_filesystem;
@@character_set_filesystem
utf8
SET @@character_set_filesystem = utf8;
SELECT @@character_set_filesystem;
@@character_set_filesystem
utf8
SET @@character_set_filesystem = uTf8;
SELECT @@character_set_filesystem;
@@character_set_filesystem
utf8
'#--------------------FN_DYNVARS_008_09-------------------------#'
SET @@character_set_filesystem = 1;
SELECT @@character_set_filesystem;
@@character_set_filesystem
big5
SET @@character_set_filesystem = 2;
SELECT @@character_set_filesystem;
@@character_set_filesystem
latin2
SET @@character_set_filesystem = 3;
SELECT @@character_set_filesystem;
@@character_set_filesystem
dec8
SET @@character_set_filesystem = 36;
SELECT @@character_set_filesystem;
@@character_set_filesystem
cp866
SET @@character_set_filesystem = 99;
SELECT @@character_set_filesystem;
@@character_set_filesystem
cp1250
SET @@character_set_filesystem = 100;
ERROR 42000: Unknown character set: '100'
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
@total_charset
36
'Bug # 34843: character sets are mapped in such a way that 100 and following '
'numbers give error, and before 100 the 36 mapped wraps arround several times.'
'#--------------------FN_DYNVARS_008_10-------------------------#'
SET @@character_set_filesystem = abc;
ERROR 42000: Unknown character set: 'abc'
SET @@character_set_filesystem = 1utf8;
ERROR 42000: Unknown character set: '1utf8'
SET @@character_set_filesystem = 0;
ERROR 42000: Unknown character set: '0'
SET @@character_set_filesystem = 1.1;
ERROR 42000: Incorrect argument type to variable 'character_set_filesystem'
SET @@character_set_filesystem = -1;
ERROR 42000: Unknown character set: '-1'
SET @@character_set_filesystem = '';
ERROR 42000: Unknown character set: ''
SET @@character_set_filesystem = 'utf';
ERROR 42000: Unknown character set: 'utf'
SET @@character_set_filesystem = true;
SELECT @@character_set_filesystem AS res_with_true;
res_with_true
big5
SET @@character_set_filesystem = ON;
ERROR 42000: Unknown character set: 'ON'
'#--------------------FN_DYNVARS_008_11-------------------------#'
SET @@global.character_set_filesystem = abc;
ERROR 42000: Unknown character set: 'abc'
SET @@global.character_set_filesystem = 1utf8;
ERROR 42000: Unknown character set: '1utf8'
SET @@global.character_set_filesystem = 0;
ERROR 42000: Unknown character set: '0'
SET @@global.character_set_filesystem = 1.1;
ERROR 42000: Incorrect argument type to variable 'character_set_filesystem'
SET @@global.character_set_filesystem = -1;
ERROR 42000: Unknown character set: '-1'
SET @@global.character_set_filesystem = '';
ERROR 42000: Unknown character set: ''
SET @@global.character_set_filesystem = 'utf';
ERROR 42000: Unknown character set: 'utf'
SET @@global.character_set_filesystem = true;
SET @@global.character_set_filesystem = ON;
ERROR 42000: Unknown character set: 'ON'
'#--------------------FN_DYNVARS_008_12-------------------------#'
SELECT @@global.character_set_filesystem =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='character_set_filesystem') AS res;
res
1
SET @@global.character_set_filesystem = 1;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
big5
SELECT @@global.character_set_filesystem =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='character_set_filesystem') AS res;
res
1
'#--------------------FN_DYNVARS_008_13-------------------------#'
SELECT @@character_set_filesystem =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_filesystem') AS res;
res
1
SELECT @@local.character_set_filesystem =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_filesystem') AS res;
res
1
SELECT @@session.character_set_filesystem =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_filesystem') AS res;
res
1
SET @@global.character_set_filesystem = @global_start_value;
SELECT @@global.character_set_filesystem;
@@global.character_set_filesystem
binary
SET @@session.character_set_filesystem = @session_start_value;
SELECT @@session.character_set_filesystem;
@@session.character_set_filesystem
binary

Binary file not shown.

View file

@ -0,0 +1,64 @@
'#--------------------FN_DYNVARS_012_01-------------------------#'
SET @global_character_set_results = @@global.character_set_results;
SET @session_character_set_results = @@session.character_set_results;
SET @@global.character_set_results = utf8;
'connect (con1,localhost,root,,,,)'
'connection con1'
SELECT @@global.character_set_results;
@@global.character_set_results
utf8
SELECT @@session.character_set_results;
@@session.character_set_results
utf8
'#--------------------FN_DYNVARS_012_02-------------------------#'
'connection default'
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(b CHAR(40) character set utf8);
SET NAMES utf8;
'----check string literals against different character_set_results---'
check if results are converted to character_set_results
SET @@session.character_set_results = greek;
SELECT 'Ð<>ÐЃЄ' AS utf_text;
utf_text
????
check effect of character_set_results when introducers are used
SET @@session.character_set_results = latin1;
SELECT _latin1'Müller' AS latin1_text;
latin1_text
Müller
SET @@session.character_set_results = ascii;
SELECT _latin1'Müller' AS latin1_text;
latin1_text
M?ller
check when we dont want any conversion
SET @@session.character_set_results = NULL;
SELECT 'Ð<>ÐЃЄ' AS utf_text;
utf_text
Ð<EFBFBD>ÐЃЄ
'---check results from table against different character_set_results--'
INSERT INTO t1 VALUES(_utf8'Ð<>ÐЃЄ');
INSERT INTO t1 VALUES('ФХЦЧШ');
SET @@session.character_set_results = NULL;
SELECT b, CHAR_LENGTH(b) FROM t1;
b CHAR_LENGTH(b)
Ð<EFBFBD>ÐЃЄ 4
ФХЦЧШ 5
SET @@session.character_set_results = utf8;
SELECT b, CHAR_LENGTH(b) FROM t1;
b CHAR_LENGTH(b)
Ð<EFBFBD>ÐЃЄ 4
ФХЦЧШ 5
SET @@session.character_set_results = koi8r;
SELECT b, CHAR_LENGTH(b) FROM t1;
b CHAR_LENGTH(b)
³??? 4
æèãþû 5
SET @@session.character_set_results = cp1250;
SELECT b, CHAR_LENGTH(b) FROM t1;
b CHAR_LENGTH(b)
???? 4
????? 5
DROP TABLE t1;
'connection default;'
SET @@global.character_set_results = @global_character_set_results;
SET @@session.character_set_results = @session_character_set_results;

View file

@ -0,0 +1,504 @@
SET @global_start_value = @@global.character_set_server;
SELECT @global_start_value;
@global_start_value
latin1
SET @session_start_value = @@character_set_server;
SELECT @session_start_value;
@session_start_value
latin1
SET @session_start_value = @@local.character_set_server;
SELECT @session_start_value;
@session_start_value
latin1
SET @session_start_value = @@session.character_set_server;
SELECT @session_start_value;
@session_start_value
latin1
'#--------------------FN_DYNVARS_009_01------------------#'
SELECT character_set_server;
ERROR 42S22: Unknown column 'character_set_server' in 'field list'
SET character_set_server=utf8;
SELECT @@session.character_set_server;
@@session.character_set_server
utf8
SET global.character_set_server=utf8;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'character_set_server=utf8' at line 1
SET session character_set_server=utf8;
SELECT session character_set_server;
ERROR 42S22: Unknown column 'session' in 'field list'
SET global character_set_server=utf8;
SELECT global character_set_server;
ERROR 42S22: Unknown column 'global' in 'field list'
'#--------------------FN_DYNVARS_009_02-------------------------#'
SET @@character_set_server = latin5;
SET @@character_set_server = DEFAULT;
SELECT @@character_set_server AS DEFAULT_VALUE;
DEFAULT_VALUE
utf8
SET @@global.character_set_server = latin5;
SET @@global.character_set_server = DEFAULT;
SELECT @@global.character_set_server;
@@global.character_set_server
latin1
'#--------------------FN_DYNVARS_009_03-------------------------#'
SET @@session.character_set_server = utf8;
SELECT @@session.character_set_server;
@@session.character_set_server
utf8
SET @@global.character_set_server = latin2;
SELECT @@global.character_set_server;
@@global.character_set_server
latin2
SELECT @@session.character_set_server AS res_is_utf8;
res_is_utf8
utf8
SET @@session.character_set_server = latin5;
SELECT @@session.character_set_server;
@@session.character_set_server
latin5
SELECT @@global.character_set_server AS res_is_latin2;
res_is_latin2
latin2
SELECT @@global.character_set_server=@@session.character_set_server
AS res_is_false;
res_is_false
0
'#--------------------FN_DYNVARS_009_04-------------------------#'
SELECT @@character_set_server = @@session.character_set_server AS res;
res
1
SELECT @@character_set_server = @@local.character_set_server AS res;
res
1
'#--------------------FN_DYNVARS_009_05-------------------------#'
SET @@character_set_server = utf8 + latin2;
ERROR 42S22: Unknown column 'utf8' in 'field list'
'#--------------------FN_DYNVARS_009_06-------------------------#'
SET @@session.character_set_server = big5;
SELECT @@session.character_set_server;
@@session.character_set_server
big5
SET @@session.character_set_server = dec8;
SELECT @@session.character_set_server;
@@session.character_set_server
dec8
SET @@session.character_set_server = cp850;
SELECT @@session.character_set_server;
@@session.character_set_server
cp850
SET @@session.character_set_server = hp8;
SELECT @@session.character_set_server;
@@session.character_set_server
hp8
SET @@session.character_set_server = koi8r;
SELECT @@session.character_set_server;
@@session.character_set_server
koi8r
SET @@session.character_set_server = latin1;
SELECT @@session.character_set_server;
@@session.character_set_server
latin1
SET @@session.character_set_server = latin2;
SELECT @@session.character_set_server;
@@session.character_set_server
latin2
SET @@session.character_set_server = swe7;
SELECT @@session.character_set_server;
@@session.character_set_server
swe7
SET @@session.character_set_server = ascii;
SELECT @@session.character_set_server;
@@session.character_set_server
ascii
SET @@session.character_set_server = ujis;
SELECT @@session.character_set_server;
@@session.character_set_server
ujis
SET @@session.character_set_server = sjis;
SELECT @@session.character_set_server;
@@session.character_set_server
sjis
SET @@session.character_set_server = hebrew;
SELECT @@session.character_set_server;
@@session.character_set_server
hebrew
SET @@session.character_set_server = tis620;
SELECT @@session.character_set_server;
@@session.character_set_server
tis620
SET @@session.character_set_server = euckr;
SELECT @@session.character_set_server;
@@session.character_set_server
euckr
SET @@session.character_set_server = koi8u;
SELECT @@session.character_set_server;
@@session.character_set_server
koi8u
SET @@session.character_set_server = gb2312;
SELECT @@session.character_set_server;
@@session.character_set_server
gb2312
SET @@session.character_set_server = greek;
SELECT @@session.character_set_server;
@@session.character_set_server
greek
SET @@session.character_set_server = cp1250;
SELECT @@session.character_set_server;
@@session.character_set_server
cp1250
SET @@session.character_set_server = gbk;
SELECT @@session.character_set_server;
@@session.character_set_server
gbk
SET @@session.character_set_server = latin5;
SELECT @@session.character_set_server;
@@session.character_set_server
latin5
SET @@session.character_set_server = armscii8;
SELECT @@session.character_set_server;
@@session.character_set_server
armscii8
SET @@session.character_set_server = utf8;
SELECT @@session.character_set_server;
@@session.character_set_server
utf8
SET @@session.character_set_server = ucs2;
SELECT @@session.character_set_server;
@@session.character_set_server
ucs2
SET @@session.character_set_server = cp866;
SELECT @@session.character_set_server;
@@session.character_set_server
cp866
SET @@session.character_set_server = keybcs2;
SELECT @@session.character_set_server;
@@session.character_set_server
keybcs2
SET @@session.character_set_server = macce;
SELECT @@session.character_set_server;
@@session.character_set_server
macce
SET @@session.character_set_server = macroman;
SELECT @@session.character_set_server;
@@session.character_set_server
macroman
SET @@session.character_set_server = cp852;
SELECT @@session.character_set_server;
@@session.character_set_server
cp852
SET @@session.character_set_server = latin7;
SELECT @@session.character_set_server;
@@session.character_set_server
latin7
SET @@session.character_set_server = cp1251;
SELECT @@session.character_set_server;
@@session.character_set_server
cp1251
SET @@session.character_set_server = cp1256;
SELECT @@session.character_set_server;
@@session.character_set_server
cp1256
SET @@session.character_set_server = cp1257;
SELECT @@session.character_set_server;
@@session.character_set_server
cp1257
SET @@session.character_set_server = binary;
SELECT @@session.character_set_server;
@@session.character_set_server
binary
SET @@session.character_set_server = geostd8;
SELECT @@session.character_set_server;
@@session.character_set_server
geostd8
SET @@session.character_set_server = cp932;
SELECT @@session.character_set_server;
@@session.character_set_server
cp932
SET @@session.character_set_server = eucjpms;
SELECT @@session.character_set_server;
@@session.character_set_server
eucjpms
'#--------------------FN_DYNVARS_009_07-------------------------#'
SET @@global.character_set_server = big5;
SELECT @@global.character_set_server;
@@global.character_set_server
big5
SET @@global.character_set_server = dec8;
SELECT @@global.character_set_server;
@@global.character_set_server
dec8
SET @@global.character_set_server = cp850;
SELECT @@global.character_set_server;
@@global.character_set_server
cp850
SET @@global.character_set_server = hp8;
SELECT @@global.character_set_server;
@@global.character_set_server
hp8
SET @@global.character_set_server = koi8r;
SELECT @@global.character_set_server;
@@global.character_set_server
koi8r
SET @@global.character_set_server = latin1;
SELECT @@global.character_set_server;
@@global.character_set_server
latin1
SET @@global.character_set_server = latin2;
SELECT @@global.character_set_server;
@@global.character_set_server
latin2
SET @@global.character_set_server = swe7;
SELECT @@global.character_set_server;
@@global.character_set_server
swe7
SET @@global.character_set_server = ascii;
SELECT @@global.character_set_server;
@@global.character_set_server
ascii
SET @@global.character_set_server = ujis;
SELECT @@global.character_set_server;
@@global.character_set_server
ujis
SET @@global.character_set_server = sjis;
SELECT @@global.character_set_server;
@@global.character_set_server
sjis
SET @@global.character_set_server = hebrew;
SELECT @@global.character_set_server;
@@global.character_set_server
hebrew
SET @@global.character_set_server = tis620;
SELECT @@global.character_set_server;
@@global.character_set_server
tis620
SET @@global.character_set_server = euckr;
SELECT @@global.character_set_server;
@@global.character_set_server
euckr
SET @@global.character_set_server = koi8u;
SELECT @@global.character_set_server;
@@global.character_set_server
koi8u
SET @@global.character_set_server = gb2312;
SELECT @@global.character_set_server;
@@global.character_set_server
gb2312
SET @@global.character_set_server = greek;
SELECT @@global.character_set_server;
@@global.character_set_server
greek
SET @@global.character_set_server = cp1250;
SELECT @@global.character_set_server;
@@global.character_set_server
cp1250
SET @@global.character_set_server = gbk;
SELECT @@global.character_set_server;
@@global.character_set_server
gbk
SET @@global.character_set_server = latin5;
SELECT @@global.character_set_server;
@@global.character_set_server
latin5
SET @@global.character_set_server = armscii8;
SELECT @@global.character_set_server;
@@global.character_set_server
armscii8
SET @@global.character_set_server = utf8;
SELECT @@global.character_set_server;
@@global.character_set_server
utf8
SET @@global.character_set_server = ucs2;
SELECT @@global.character_set_server;
@@global.character_set_server
ucs2
SET @@global.character_set_server = cp866;
SELECT @@global.character_set_server;
@@global.character_set_server
cp866
SET @@global.character_set_server = keybcs2;
SELECT @@global.character_set_server;
@@global.character_set_server
keybcs2
SET @@global.character_set_server = macce;
SELECT @@global.character_set_server;
@@global.character_set_server
macce
SET @@global.character_set_server = macroman;
SELECT @@global.character_set_server;
@@global.character_set_server
macroman
SET @@global.character_set_server = cp852;
SELECT @@global.character_set_server;
@@global.character_set_server
cp852
SET @@global.character_set_server = latin7;
SELECT @@global.character_set_server;
@@global.character_set_server
latin7
SET @@global.character_set_server = cp1251;
SELECT @@global.character_set_server;
@@global.character_set_server
cp1251
SET @@global.character_set_server = cp1256;
SELECT @@global.character_set_server;
@@global.character_set_server
cp1256
SET @@global.character_set_server = cp1257;
SELECT @@global.character_set_server;
@@global.character_set_server
cp1257
SET @@global.character_set_server = binary;
SELECT @@global.character_set_server;
@@global.character_set_server
binary
SET @@global.character_set_server = geostd8;
SELECT @@global.character_set_server;
@@global.character_set_server
geostd8
SET @@global.character_set_server = cp932;
SELECT @@global.character_set_server;
@@global.character_set_server
cp932
SET @@global.character_set_server = eucjpms;
SELECT @@global.character_set_server;
@@global.character_set_server
eucjpms
'#--------------------FN_DYNVARS_009_08-------------------------#'
SET @@character_set_server = UTF8;
SELECT @@character_set_server;
@@character_set_server
utf8
SET @@character_set_server = utf8;
SELECT @@character_set_server;
@@character_set_server
utf8
SET @@global.character_set_server = uTf8;
SELECT @@global.character_set_server;
@@global.character_set_server
utf8
'#--------------------FN_DYNVARS_009_09-------------------------#'
SET @@character_set_server = 1;
SELECT @@character_set_server;
@@character_set_server
big5
SET @@character_set_server = 2;
SELECT @@character_set_server;
@@character_set_server
latin2
SET @@character_set_server = 3;
SELECT @@character_set_server;
@@character_set_server
dec8
SET @@character_set_server = 36;
SELECT @@character_set_server;
@@character_set_server
cp866
SET @@character_set_server = 99;
SELECT @@character_set_server;
@@character_set_server
cp1250
SET @@character_set_server = 100;
ERROR 42000: Unknown character set: '100'
SET @@global.character_set_server = 1;
SELECT @@global.character_set_server;
@@global.character_set_server
big5
SET @@global.character_set_server = 2;
SELECT @@global.character_set_server;
@@global.character_set_server
latin2
SET @@global.character_set_server = 36;
SELECT @@global.character_set_server;
@@global.character_set_server
cp866
SET @@global.character_set_server = 99;
SELECT @@global.character_set_server;
@@global.character_set_server
cp1250
SET @@global.character_set_server = 100;
ERROR 42000: Unknown character set: '100'
SET @total_charset = (SELECT count(*) FROM INFORMATION_SCHEMA.CHARACTER_SETS);
SELECT @total_charset;
@total_charset
36
'Bug # 34843: character sets are mapped in such a way that 100 and following ';
'numbers gives error, and before 100 the 36 mapped wraps arround ';
'several times.';
'#--------------------FN_DYNVARS_009_10-------------------------#'
SET @@character_set_server = abc;
ERROR 42000: Unknown character set: 'abc'
SET @@character_set_server = 1utf8;
ERROR 42000: Unknown character set: '1utf8'
SET @@character_set_server = 0;
ERROR 42000: Unknown character set: '0'
SET @@character_set_server = 1.1;
ERROR 42000: Incorrect argument type to variable 'character_set_server'
SET @@character_set_server = -1;
ERROR 42000: Unknown character set: '-1'
SET @@character_set_server = '';
ERROR 42000: Unknown character set: ''
SET @@character_set_server = 'utf';
ERROR 42000: Unknown character set: 'utf'
SET @@character_set_server = true;
SELECT @@character_set_server AS res_with_true;
res_with_true
big5
SET @@character_set_server = ON;
ERROR 42000: Unknown character set: 'ON'
'#--------------------FN_DYNVARS_009_11-------------------------#'
SET @@global.character_set_server = abc;
ERROR 42000: Unknown character set: 'abc'
SET @@global.character_set_server = 1utf8;
ERROR 42000: Unknown character set: '1utf8'
SET @@global.character_set_server = 0;
ERROR 42000: Unknown character set: '0'
SET @@global.character_set_server = 1.1;
ERROR 42000: Incorrect argument type to variable 'character_set_server'
SET @@global.character_set_server = -1;
ERROR 42000: Unknown character set: '-1'
SET @@global.character_set_server = '';
ERROR 42000: Unknown character set: ''
SET @@global.character_set_server = 'utf';
ERROR 42000: Unknown character set: 'utf'
SET @@global.character_set_server = true;
SET @@global.character_set_server = ON;
ERROR 42000: Unknown character set: 'ON'
'#--------------------FN_DYNVARS_009_12-------------------------#'
SELECT @@global.character_set_server =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='character_set_server') AS res;
res
1
SET @@global.character_set_server = 1;
SELECT @@global.character_set_server;
@@global.character_set_server
big5
SELECT @@global.character_set_server =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='character_set_server') AS res;
res
1
'#--------------------FN_DYNVARS_009_13-------------------------#'
SELECT @@character_set_server =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_server') AS res;
res
1
SELECT @@local.character_set_server =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_server') AS res;
res
1
SELECT @@session.character_set_server =
(SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='character_set_server') AS res;
res
1
SET @@global.character_set_server = @global_start_value;
SELECT @@global.character_set_server;
@@global.character_set_server
latin1
SET @@session.character_set_server = @session_start_value;
SELECT @@session.character_set_server;
@@session.character_set_server
latin1

View file

@ -0,0 +1,65 @@
'#--------------------FN_DYNVARS_009_01-------------------------#'
SET @global_character_set_server = @@global.character_set_server;
SET @session_character_set_server = @@session.character_set_server;
SET @@global.character_set_server = utf8;
'connect (con1,localhost,root,,,,)'
'connection con1'
SELECT @@global.character_set_server;
@@global.character_set_server
utf8
SELECT @@session.character_set_server;
@@session.character_set_server
utf8
'#--------------------FN_DYNVARS_009_02-------------------------#'
'connection default'
'---global character_set_server should not effects current connection---'
SET @@global.character_set_server = utf8;
CREATE DATABASE db1;
USE db1;
SHOW CREATE DATABASE db1;
Database Create Database
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET latin1 */
DROP DATABASE db1;
select @@character_set_database;
@@character_set_database
latin1
'---session character_set_server should effects current connection---'
SET @@session.character_set_server = utf8;
CREATE DATABASE db1;
USE db1;
SHOW CREATE DATABASE db1;
Database Create Database
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET utf8 */
DROP DATABASE db1;
select @@character_set_database;
@@character_set_database
utf8
'----test with new connection----'
'connect (con1,localhost,root,,,,)'
'connection con1'
SELECT @@session.character_set_server;
@@session.character_set_server
utf8
'----------character set not specified---------'
CREATE DATABASE db1;
USE db1;
SHOW CREATE DATABASE db1;
Database Create Database
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET utf8 */
DROP DATABASE db1;
SELECT @@character_set_database;
@@character_set_database
utf8
'----------ascii character set specified----------'
CREATE DATABASE db1 character set ascii;
USE db1;
SHOW CREATE DATABASE db1;
Database Create Database
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET ascii */
DROP DATABASE db1;
select @@character_set_database;
@@character_set_database
utf8
'connection default;'
SET @@global.character_set_server = @global_character_set_server;
SET @@session.character_set_server = @session_character_set_server;

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_003_01----------------------#'
SELECT COUNT(@@GLOBAL.character_set_system);
COUNT(@@GLOBAL.character_set_system)
1
1 Expected
'#---------------------BS_STVARS_003_02----------------------#'
SET @@GLOBAL.character_set_system=1;
ERROR HY000: Variable 'character_set_system' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.character_set_system);
COUNT(@@GLOBAL.character_set_system)
1
1 Expected
'#---------------------BS_STVARS_003_03----------------------#'
SELECT @@GLOBAL.character_set_system = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='character_set_system';
@@GLOBAL.character_set_system = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.character_set_system);
COUNT(@@GLOBAL.character_set_system)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='character_set_system';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_003_04----------------------#'
SELECT @@character_set_system = @@GLOBAL.character_set_system;
@@character_set_system = @@GLOBAL.character_set_system
1
1 Expected
'#---------------------BS_STVARS_003_05----------------------#'
SELECT COUNT(@@character_set_system);
COUNT(@@character_set_system)
1
1 Expected
SELECT COUNT(@@local.character_set_system);
ERROR HY000: Variable 'character_set_system' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.character_set_system);
ERROR HY000: Variable 'character_set_system' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.character_set_system);
COUNT(@@GLOBAL.character_set_system)
1
1 Expected
SELECT character_set_system = @@SESSION.character_set_system;
ERROR 42S22: Unknown column 'character_set_system' in 'field list'
Expected error 'Readonly variable'

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,60 @@
'#--------------------FN_DYNVARS_015_01-------------------------#'
SET @global_collation_connection = @@global.collation_connection;
SET @session_collation_connection = @@session.collation_connection;
SET @@global.collation_connection = latin1_danish_ci;
'connect (con1,localhost,root,,,,)'
'connection con1'
SELECT @@global.collation_connection;
@@global.collation_connection
latin1_danish_ci
SELECT @@session.collation_connection;
@@session.collation_connection
latin1_danish_ci
'#--------------------FN_DYNVARS_015_02-------------------------#'
'connection default'
DROP TABLE IF EXISTS t1;
'----check if collation_connection update character_set_connection---'
SET @@session.collation_connection = utf8_spanish_ci;
SELECT @@collation_connection, @@character_set_database;
@@collation_connection @@character_set_database
utf8_spanish_ci latin1
'---check if collation_connection works for literal string comparision--'
SET @@session.collation_connection = latin1_swedish_ci;
SELECT 'mysql'='MySql';
'mysql'='MySql'
1
SELECT _latin2'mysql' COLLATE latin2_general_ci='MySql';
_latin2'mysql' COLLATE latin2_general_ci='MySql'
1
SELECT _utf8'mysql'=_utf8'MySql' COLLATE utf8_unicode_ci;
_utf8'mysql'=_utf8'MySql' COLLATE utf8_unicode_ci
1
SET @@session.collation_connection = latin1_general_cs;
SELECT 'mysql'='MySql';
'mysql'='MySql'
0
SELECT _latin2'mysql'COLLATE latin2_general_ci='MySql';
_latin2'mysql'COLLATE latin2_general_ci='MySql'
1
SELECT _utf8'mysql'COLLATE utf8_danish_ci=_utf8'MySql'COLLATE utf8_unicode_ci;
ERROR HY000: Illegal mix of collations (utf8_danish_ci,EXPLICIT) and (utf8_unicode_ci,EXPLICIT) for operation '='
'---collation_connection does not effect comparision with column---'
CREATE TABLE t1(a CHAR(20)CHARACTER SET latin1 COLLATE latin1_german2_ci);
INSERT INTO t1 VALUES('Müller');
SET @@session.collation_connection = latin2_hungarian_ci;
SELECT * FROM t1 WHERE a='Müller';
a
Müller
SET @@session.collation_connection = latin1_general_cs;
SELECT * FROM t1 WHERE a='müller';
a
Müller
'check if string literal collation is used';
SELECT * FROM t1 WHERE a='müller' COLLATE latin1_general_cs;
a
SELECT * FROM t1 WHERE a='müller' COLLATE latin1_german1_ci;
a
Müller
DROP TABLE t1;
SET @@global.collation_connection = @global_collation_connection;
SET @@session.collation_connection = @session_collation_connection;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,111 @@
'#--------------------FN_DYNVARS_011_01-------------------------#'
SET @global_collation_database = @@global.collation_database;
SET @session_collation_database = @@session.collation_database;
SET @session_collation_server = @@session.collation_server;
SET @@global.collation_database = latin1_danish_ci;
'connect (con1,localhost,root,,,,)'
'connection con1'
SELECT @@global.collation_database;
@@global.collation_database
latin1_danish_ci
SELECT @@session.collation_database;
@@session.collation_database
latin1_swedish_ci
'Bug#35378: New session collation_database is not change by global collation_database'
'#--------------------FN_DYNVARS_011_02-------------------------#'
'connection default'
DROP TABLE IF EXISTS t1,t2;
SELECT @@character_set_server,@@collation_server;
@@character_set_server @@collation_server
latin1 latin1_swedish_ci
'--check if setting collation_database update character_set_database--'
SET @@session.collation_database = utf8_spanish_ci;
SELECT @@collation_database, @@character_set_database;
@@collation_database @@character_set_database
utf8_spanish_ci utf8
'--check if collation_database effects database/tables charset/collation'
SET @@session.collation_server = utf8_roman_ci;
SET @@session.collation_database = latin2_croatian_ci;
CREATE DATABASE db1;
USE db1;
SHOW CREATE DATABASE db1;
Database Create Database
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_roman_ci */
'Bug#35380: collation_database does not effects CREATE DATABASE without characater set'
CREATE TABLE t1(a CHAR(20));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(20) COLLATE utf8_roman_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci
'---check if updating collation_database effects new table/column---'
SET @@session.collation_database = latin7_general_cs;
CREATE TABLE t2(a CHAR(10));
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` char(10) COLLATE utf8_roman_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci
DROP TABLE t1,t2;
'--check value of collation and character set when current db is dropped'
DROP DATABASE db1;
SELECT @@collation_database,@@collation_server,@@character_set_database,@@character_set_server;
@@collation_database @@collation_server @@character_set_database @@character_set_server
utf8_roman_ci utf8_roman_ci utf8 utf8
USE test;
SELECT @@collation_database,@@collation_server,@@character_set_database,@@character_set_server;
@@collation_database @@collation_server @@character_set_database @@character_set_server
utf8_roman_ci utf8_roman_ci utf8 utf8
'fill table with some test data';
CREATE TABLE t1(a CHAR(20))CHARACTER SET=latin1;
INSERT INTO t1 VALUES('Muffler'),('Müller'),('MX Systems');
'---check if collation_database effects results sort order---'
SET @@session.collation_database = latin1_swedish_ci;
SELECT * FROM t1 ORDER BY a;
a
Muffler
MX Systems
Müller
SET @@session.collation_database = latin1_german1_ci;
SELECT * FROM t1 ORDER BY a;
a
Muffler
MX Systems
Müller
'explicit Collate clause should effects results sort order';
SELECT * FROM t1 ORDER BY a COLLATE latin1_swedish_ci;
a
Muffler
MX Systems
Müller
SELECT * FROM t1 ORDER BY a COLLATE latin1_german1_ci;
a
Muffler
Müller
MX Systems
'----check if indexing is effected by collation_database---'
SET @@session.collation_database = latin1_swedish_ci;
ALTER TABLE t1 ADD PRIMARY KEY (a);
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
SELECT * FROM t1 ORDER BY a;
a
Muffler
MX Systems
Müller
ALTER TABLE t1 DROP PRIMARY KEY;
SET @@session.collation_database = latin1_german1_ci;
ALTER TABLE t1 ADD PRIMARY KEY (a);
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
SELECT * FROM t1 ORDER BY a;
a
Muffler
MX Systems
Müller
DROP TABLE t1;
SET @@global.collation_database = @global_collation_database;
SET @@session.collation_database = @session_collation_database;
SET @@session.collation_server = @session_collation_server;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,91 @@
'#--------------------FN_DYNVARS_014_01-------------------------#'
SET @global_collation_server = @@global.collation_server;
SET @session_collation_server = @@session.collation_server;
SET @@global.collation_server = latin1_danish_ci;
'connect (con1,localhost,root,,,,)'
'connection con1'
SELECT @@global.collation_server;
@@global.collation_server
latin1_danish_ci
SELECT @@session.collation_server;
@@session.collation_server
latin1_danish_ci
'#--------------------FN_DYNVARS_014_02-------------------------#'
'connection default'
DROP TABLE IF EXISTS t1,t2;
'---check if setting collation_server update character_set_server---'
SET @@session.collation_server = utf8_spanish_ci;
SELECT @@collation_server, @@character_set_server;
@@collation_server @@character_set_server
utf8_spanish_ci utf8
'--check if collation_server effects database/table charset/collation--'
SET @@session.collation_server = latin1_german1_ci;
CREATE DATABASE db1;
USE db1;
SHOW CREATE DATABASE db1;
Database Create Database
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_german1_ci */
CREATE TABLE t1(a CHAR(20));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(20) COLLATE latin1_german1_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci
'---check if updating collation_server effects new table/column---'
SET @@session.collation_server = latin1_swedish_ci;
CREATE TABLE t2(a CHAR(10));
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` char(10) COLLATE latin1_german1_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci
INSERT INTO t1 VALUES('Muffler'),('Müller'),('MX Systems');
'---check if collation_server effects results sort order---'
SET @@session.collation_server = latin1_swedish_ci;
SELECT * FROM t1 ORDER BY a;
a
Muffler
Müller
MX Systems
SET @@session.collation_server = latin1_german1_ci;
SELECT * FROM t1 ORDER BY a;
a
Muffler
Müller
MX Systems
SELECT * FROM t1 ORDER BY a COLLATE latin1_swedish_ci;
a
Muffler
MX Systems
Müller
SELECT * FROM t1 ORDER BY a COLLATE latin1_german1_ci;
a
Muffler
Müller
MX Systems
'---check if indexing is effected by collation_server---'
SET @@session.collation_server = latin1_swedish_ci;
ALTER TABLE t1 ADD PRIMARY KEY (a);
REPAIR TABLE t1;
Table Op Msg_type Msg_text
db1.t1 repair status OK
SELECT * FROM t1 ORDER BY a;
a
Muffler
Müller
MX Systems
ALTER TABLE t1 DROP PRIMARY KEY;
SET @@session.collation_server = latin1_german1_ci;
ALTER TABLE t1 ADD PRIMARY KEY (a);
REPAIR TABLE t1;
Table Op Msg_type Msg_text
db1.t1 repair status OK
SELECT * FROM t1 ORDER BY a;
a
Muffler
Müller
MX Systems
DROP TABLE t1,t2;
DROP DATABASE db1;
SET @@global.collation_server = @global_collation_server;
SET @@session.collation_server = @session_collation_server;

View file

@ -0,0 +1,122 @@
SET @start_global_value = @@global.completion_type;
SELECT @start_global_value;
@start_global_value
0
SET @start_session_value = @@session.completion_type;
SELECT @start_session_value;
@start_session_value
0
'#--------------------FN_DYNVARS_017_01-------------------------#'
SET @@global.completion_type = 2;
SET @@global.completion_type = DEFAULT;
SELECT @@global.completion_type;
@@global.completion_type
0
SET @@session.completion_type = 1;
SET @@session.completion_type = DEFAULT;
SELECT @@session.completion_type;
@@session.completion_type
0
'#--------------------FN_DYNVARS_017_02-------------------------#'
SET @@global.completion_type = @start_global_value;
SELECT @@global.completion_type = 0;
@@global.completion_type = 0
1
SET @@session.completion_type = @start_session_value;
SELECT @@session.completion_type = 0;
@@session.completion_type = 0
1
'#--------------------FN_DYNVARS_017_03-------------------------#'
SET @@global.completion_type = 0;
SELECT @@global.completion_type;
@@global.completion_type
0
SET @@global.completion_type = 1;
SELECT @@global.completion_type;
@@global.completion_type
1
SET @@global.completion_type = 2;
SELECT @@global.completion_type;
@@global.completion_type
2
'#--------------------FN_DYNVARS_017_04-------------------------#'
SET @@session.completion_type = 0;
SELECT @@session.completion_type;
@@session.completion_type
0
SET @@session.completion_type = 1;
SELECT @@session.completion_type;
@@session.completion_type
1
SET @@session.completion_type = 2;
SELECT @@session.completion_type;
@@session.completion_type
2
'#------------------FN_DYNVARS_017_05-----------------------#'
SET @@global.completion_type = 10;
ERROR 42000: Variable 'completion_type' can't be set to the value of '10'
SET @@global.completion_type = -1024;
ERROR 42000: Variable 'completion_type' can't be set to the value of '-1024'
SET @@global.completion_type = 2.4;
ERROR 42000: Incorrect argument type to variable 'completion_type'
SET @@global.completion_type = OFF;
ERROR 42000: Incorrect argument type to variable 'completion_type'
SET @@session.completion_type = 10;
ERROR 42000: Variable 'completion_type' can't be set to the value of '10'
SET @@session.completion_type = -2;
ERROR 42000: Variable 'completion_type' can't be set to the value of '-2'
SET @@session.completion_type = 1.2;
ERROR 42000: Incorrect argument type to variable 'completion_type'
SET @@session.completion_type = ON;
ERROR 42000: Incorrect argument type to variable 'completion_type'
'#------------------FN_DYNVARS_017_06-----------------------#'
SELECT @@global.completion_type = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='completion_type';
@@global.completion_type = VARIABLE_VALUE
1
SELECT @@session.completion_type = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='completion_type';
@@session.completion_type = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_017_07-----------------------#'
SET @@global.completion_type = TRUE;
SELECT @@global.completion_type;
@@global.completion_type
1
SET @@global.completion_type = FALSE;
SELECT @@global.completion_type;
@@global.completion_type
0
'#---------------------FN_DYNVARS_001_08----------------------#'
SET @@completion_type = 1;
SELECT @@completion_type = @@local.completion_type;
@@completion_type = @@local.completion_type
1
SELECT @@local.completion_type = @@session.completion_type;
@@local.completion_type = @@session.completion_type
1
'#---------------------FN_DYNVARS_001_09----------------------#'
SET completion_type = 1;
SELECT @@completion_type;
@@completion_type
1
SET local.completion_type = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'completion_type = 1' at line 1
SELECT local.completion_type;
ERROR 42S02: Unknown table 'local' in field list
SET session.completion_type = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'completion_type = 1' at line 1
SELECT session.completion_type;
ERROR 42S02: Unknown table 'session' in field list
SELECT completion_type = @@session.completion_type;
ERROR 42S22: Unknown column 'completion_type' in 'field list'
SET @@global.completion_type = @start_global_value;
SELECT @@global.completion_type;
@@global.completion_type
0
SET @@session.completion_type = @start_session_value;
SELECT @@session.completion_type;
@@session.completion_type
0

View file

@ -0,0 +1,76 @@
drop table if exists t1;
## Creating new table ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name varchar(30)
) ENGINE = INNODB;
'#--------------------FN_DYNVARS_017_01-------------------------#'
## Creating new connection ##
INSERT into t1(name) values('Record_1');
SET @@autocommit = 0;
SELECT * from t1;
id name
1 Record_1
## Setting value of variable to 0 ##
SET @@session.completion_type = 0;
## Here commit & rollback should work normally ##
START TRANSACTION;
SELECT * from t1;
id name
1 Record_1
INSERT into t1(name) values('Record_2');
INSERT into t1(name) values('Record_3');
SELECT * from t1;
id name
1 Record_1
2 Record_2
3 Record_3
DELETE FROM t1 where id = 2;
SELECT * from t1;
id name
1 Record_1
3 Record_3
START TRANSACTION;
SELECT * from t1;
id name
1 Record_1
3 Record_3
INSERT into t1(name) values('Record_4');
INSERT into t1(name) values('Record_5');
COMMIT;
'#--------------------FN_DYNVARS_017_02-------------------------#'
SET @@session.completion_type = 2;
## Here commit should work as COMMIT RELEASE ##
START TRANSACTION;
SELECT * from t1;
id name
1 Record_1
3 Record_3
4 Record_4
5 Record_5
INSERT into t1(name) values('Record_6');
INSERT into t1(name) values('Record_7');
COMMIT;
## Inserting rows should give error here because connection should ##
## disconnect after using COMMIT ##
INSERT into t1(name) values('Record_4');
Got one of the listed errors
## Creating new connection test_con2 ##
SET @@session.completion_type = 2;
## Inserting rows and using Rollback which should Rollback & release ##
START TRANSACTION;
SELECT * from t1;
id name
1 Record_1
3 Record_3
4 Record_4
5 Record_5
6 Record_6
7 Record_7
INSERT into t1(name) values('Record_8');
INSERT into t1(name) values('Record_9');
ROLLBACK;
INSERT into t1(name) values('Record_4');
Got one of the listed errors

View file

@ -0,0 +1,106 @@
SET @start_value = @@global.concurrent_insert;
SELECT @start_value;
@start_value
1
'#--------------------FN_DYNVARS_018_01------------------------#'
SET @@global.concurrent_insert = 0;
SET @@global.concurrent_insert = DEFAULT;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
1
'#---------------------FN_DYNVARS_018_02-------------------------#'
SET @@global.concurrent_insert = DEFAULT;
SELECT @@global.concurrent_insert = 1;
@@global.concurrent_insert = 1
1
'#--------------------FN_DYNVARS_018_03------------------------#'
SET @@global.concurrent_insert = 0;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
0
SET @@global.concurrent_insert = 1;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
1
SET @@global.concurrent_insert = 2;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
2
'#--------------------FN_DYNVARS_018_04-------------------------#'
SET @@global.concurrent_insert = -1;
Select @@global.concurrent_insert;
@@global.concurrent_insert
0
SET @@global.concurrent_insert = 100;
Warnings:
Warning 1292 Truncated incorrect concurrent-insert value: '100'
Select @@global.concurrent_insert;
@@global.concurrent_insert
2
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.concurrent_insert = TRUEF;
ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
SET @@global.concurrent_insert = TRUE_F;
ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
SET @@global.concurrent_insert = FALSE0;
ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
SET @@global.concurrent_insert = OON;
ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
SET @@global.concurrent_insert = ONN;
ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
SET @@global.concurrent_insert = OOFF;
ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
SET @@global.concurrent_insert = 0FF;
ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
SET @@global.concurrent_insert = ' ';
ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
SET @@global.concurrent_insert = " ";
ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
SET @@global.concurrent_insert = '';
ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
'#-------------------FN_DYNVARS_018_05----------------------------#'
SET @@session.concurrent_insert = 1;
ERROR HY000: Variable 'concurrent_insert' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.concurrent_insert = 1;
ERROR HY000: Variable 'concurrent_insert' is a GLOBAL variable
'#----------------------FN_DYNVARS_018_06------------------------#'
SELECT @@global.concurrent_insert = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='concurrent_insert';
@@global.concurrent_insert = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_018_07----------------------#'
SET @@global.concurrent_insert = OFF;
ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
SET @@global.concurrent_insert = ON;
ERROR 42000: Incorrect argument type to variable 'concurrent_insert'
'#---------------------FN_DYNVARS_018_08----------------------#'
SET @@global.concurrent_insert = TRUE;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
1
SET @@global.concurrent_insert = FALSE;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
0
'#---------------------FN_DYNVARS_018_09----------------------#'
SET @@global.concurrent_insert = 1;
SELECT @@concurrent_insert = @@global.concurrent_insert;
@@concurrent_insert = @@global.concurrent_insert
1
'#---------------------FN_DYNVARS_018_10----------------------#'
SET concurrent_insert = 1;
ERROR HY000: Variable 'concurrent_insert' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@concurrent_insert;
@@concurrent_insert
1
SET global.concurrent_insert = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'concurrent_insert = 1' at line 1
SELECT global.concurrent_insert;
ERROR 42S02: Unknown table 'global' in field list
SELECT concurrent_insert = @@session.concurrent_insert;
ERROR 42S22: Unknown column 'concurrent_insert' in 'field list'
SET @@global.concurrent_insert = @start_value;
SELECT @@global.concurrent_insert;
@@global.concurrent_insert
1

View file

@ -0,0 +1,73 @@
drop table if exists t1;
## Creating new table ##
CREATE TABLE t1
(
name varchar(30)
);
'#--------------------FN_DYNVARS_018_01-------------------------#'
## Setting initial value of variable to 1 ##
SET @@global.concurrent_insert = 1;
INSERT into t1(name) values('Record_1');
INSERT into t1(name) values('Record_2');
INSERT into t1(name) values('Record_3');
## locking table ##
lock table t1 read local;
## Creating new connection to insert some rows in table ##
## New records should come at the end of all rows ##
INSERT into t1(name) values('Record_4');
SELECT * from t1;
name
Record_1
Record_2
Record_3
Record_4
## unlocking tables ##
unlock tables;
## deleting record to create hole in table ##
DELETE from t1 where name ='Record_2';
'#--------------------FN_DYNVARS_018_02-------------------------#'
'#--------------------FN_DYNVARS_018_03-------------------------#'
## lock table and connect with connection1 ##
lock table t1 read local;
## setting value of concurrent_insert to 2 ##
SET @@global.concurrent_insert=2;
## Inserting record in table, record should go at the end of the table ##
INSERT into t1(name) values('Record_5');
SELECT * from t1;
name
Record_1
Record_3
Record_4
Record_5
SELECT @@concurrent_insert;
@@concurrent_insert
2
## Switching to default connection ##
## Unlocking table ##
unlock tables;
SELECT * from t1;
name
Record_1
Record_3
Record_4
Record_5
## Inserting new row, this should go in the hole ##
INSERT into t1(name) values('Record_6');
SELECT * from t1;
name
Record_1
Record_6
Record_3
Record_4
Record_5
## connection test_con1 ##
DELETE from t1 where name ='Record_3';
SELECT * from t1;
name
Record_1
Record_6
Record_4
Record_5
## Dropping table ##
DROP table t1;
## Disconnecting connection ##

View file

@ -0,0 +1,94 @@
SET @start_value = @@global.connect_timeout;
SELECT @start_value;
@start_value
60
'#--------------------FN_DYNVARS_019_01------------------------#'
SET @@global.connect_timeout = 100;
SET @@global.connect_timeout = DEFAULT;
SELECT @@global.connect_timeout;
@@global.connect_timeout
10
'#---------------------FN_DYNVARS_019_02-------------------------#'
SET @@global.connect_timeout = @start_value;
SELECT @@global.connect_timeout = 5;
@@global.connect_timeout = 5
0
'#--------------------FN_DYNVARS_019_03------------------------#'
SET @@global.connect_timeout = 2;
SELECT @@global.connect_timeout;
@@global.connect_timeout
2
SET @@global.connect_timeout = 10000;
SELECT @@global.connect_timeout;
@@global.connect_timeout
10000
SET @@global.connect_timeout = 21221204;
SELECT @@global.connect_timeout;
@@global.connect_timeout
21221204
'#--------------------FN_DYNVARS_019_04-------------------------#'
SET @@global.connect_timeout = 1;
Warnings:
Warning 1292 Truncated incorrect connect_timeout value: '1'
SELECT @@global.connect_timeout;
@@global.connect_timeout
2
SET @@global.connect_timeout = -1024;
Warnings:
Warning 1292 Truncated incorrect connect_timeout value: '0'
SELECT @@global.connect_timeout;
@@global.connect_timeout
2
SET @@global.connect_timeout = 42949672950;
Warnings:
Warning 1292 Truncated incorrect connect_timeout value: '42949672950'
SELECT @@global.connect_timeout;
@@global.connect_timeout
31536000
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.connect_timeout = 21221204.10;
ERROR 42000: Incorrect argument type to variable 'connect_timeout'
SET @@global.connect_timeout = ON;
ERROR 42000: Incorrect argument type to variable 'connect_timeout'
'#-------------------FN_DYNVARS_019_05----------------------------#'
SET @@session.connect_timeout = 0;
ERROR HY000: Variable 'connect_timeout' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.connect_timeout;
ERROR HY000: Variable 'connect_timeout' is a GLOBAL variable
'#----------------------FN_DYNVARS_019_06------------------------#'
SELECT @@global.connect_timeout = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='connect_timeout';
@@global.connect_timeout = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_019_07----------------------#'
SET @@global.connect_timeout = TRUE;
Warnings:
Warning 1292 Truncated incorrect connect_timeout value: '1'
SELECT @@global.connect_timeout;
@@global.connect_timeout
2
SET @@global.connect_timeout = FALSE;
Warnings:
Warning 1292 Truncated incorrect connect_timeout value: '0'
SELECT @@global.connect_timeout;
@@global.connect_timeout
2
'#---------------------FN_DYNVARS_019_08----------------------#'
SET @@global.connect_timeout = 5;
SELECT @@connect_timeout = @@global.connect_timeout;
@@connect_timeout = @@global.connect_timeout
1
'#---------------------FN_DYNVARS_019_09----------------------#'
SET connect_timeout = 1;
ERROR HY000: Variable 'connect_timeout' is a GLOBAL variable and should be set with SET GLOBAL
SET global.connect_timeout = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'connect_timeout = 1' at line 1
SELECT global.connect_timeout;
ERROR 42S02: Unknown table 'global' in field list
SELECT connect_timeout = @@session.connect_timeout;
ERROR 42S22: Unknown column 'connect_timeout' in 'field list'
SET @@global.connect_timeout = @start_value;
SELECT @@global.connect_timeout;
@@global.connect_timeout
60

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_004_01----------------------#'
SELECT COUNT(@@GLOBAL.datadir);
COUNT(@@GLOBAL.datadir)
1
1 Expected
'#---------------------BS_STVARS_004_02----------------------#'
SET @@GLOBAL.datadir=1;
ERROR HY000: Variable 'datadir' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.datadir);
COUNT(@@GLOBAL.datadir)
1
1 Expected
'#---------------------BS_STVARS_004_03----------------------#'
SELECT @@GLOBAL.datadir = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='datadir';
@@GLOBAL.datadir = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.datadir);
COUNT(@@GLOBAL.datadir)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='datadir';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_004_04----------------------#'
SELECT @@datadir = @@GLOBAL.datadir;
@@datadir = @@GLOBAL.datadir
1
1 Expected
'#---------------------BS_STVARS_004_05----------------------#'
SELECT COUNT(@@datadir);
COUNT(@@datadir)
1
1 Expected
SELECT COUNT(@@local.datadir);
ERROR HY000: Variable 'datadir' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.datadir);
ERROR HY000: Variable 'datadir' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.datadir);
COUNT(@@GLOBAL.datadir)
1
1 Expected
SELECT datadir = @@SESSION.datadir;
ERROR 42S22: Unknown column 'datadir' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,168 @@
SET @start_global_value = @@global.default_week_format;
SELECT @start_global_value;
@start_global_value
0
SET @start_session_value = @@session.default_week_format;
SELECT @start_session_value;
@start_session_value
0
'#--------------------FN_DYNVARS_022_01-------------------------#'
SET @@global.default_week_format = 100;
Warnings:
Warning 1292 Truncated incorrect default_week_format value: '100'
SET @@global.default_week_format = DEFAULT;
SELECT @@global.default_week_format;
@@global.default_week_format
0
SET @@session.default_week_format = 200;
Warnings:
Warning 1292 Truncated incorrect default_week_format value: '200'
SET @@session.default_week_format = DEFAULT;
SELECT @@session.default_week_format;
@@session.default_week_format
0
'#--------------------FN_DYNVARS_022_02-------------------------#'
SET @@global.default_week_format = @start_global_value;
SELECT @@global.default_week_format = 0;
@@global.default_week_format = 0
1
SET @@session.default_week_format = @start_global_value;
SELECT @@session.default_week_format = 0;
@@session.default_week_format = 0
1
'#--------------------FN_DYNVARS_022_03-------------------------#'
SET @@global.default_week_format = 1;
SELECT @@global.default_week_format;
@@global.default_week_format
1
SET @@global.default_week_format = 0;
SELECT @@global.default_week_format;
@@global.default_week_format
0
SET @@global.default_week_format = 7;
SELECT @@global.default_week_format;
@@global.default_week_format
7
'#--------------------FN_DYNVARS_022_04-------------------------#'
SET @@session.default_week_format = 1;
SELECT @@session.default_week_format;
@@session.default_week_format
1
SET @@session.default_week_format = 0;
SELECT @@session.default_week_format;
@@session.default_week_format
0
SET @@session.default_week_format = 7;
SELECT @@session.default_week_format;
@@session.default_week_format
7
'#------------------FN_DYNVARS_022_05-----------------------#'
SET @@global.default_week_format = 8;
Warnings:
Warning 1292 Truncated incorrect default_week_format value: '8'
SELECT @@global.default_week_format;
@@global.default_week_format
7
SET @@global.default_week_format = -1024;
SELECT @@global.default_week_format;
@@global.default_week_format
0
SET @@global.default_week_format = 65536;
Warnings:
Warning 1292 Truncated incorrect default_week_format value: '65536'
SELECT @@global.default_week_format;
@@global.default_week_format
7
SET @@global.default_week_format = 65530.30;
ERROR 42000: Incorrect argument type to variable 'default_week_format'
SELECT @@global.default_week_format;
@@global.default_week_format
7
SET @@global.default_week_format = OFF;
ERROR 42000: Incorrect argument type to variable 'default_week_format'
SELECT @@global.default_week_format;
@@global.default_week_format
7
SET @@session.default_week_format = ON;
ERROR 42000: Incorrect argument type to variable 'default_week_format'
SELECT @@session.default_week_format;
@@session.default_week_format
7
SET @@session.default_week_format = 65530.30;
ERROR 42000: Incorrect argument type to variable 'default_week_format'
SELECT @@session.default_week_format;
@@session.default_week_format
7
SET @@session.default_week_format = 10;
Warnings:
Warning 1292 Truncated incorrect default_week_format value: '10'
SELECT @@session.default_week_format;
@@session.default_week_format
7
SET @@session.default_week_format = -2;
SELECT @@session.default_week_format;
@@session.default_week_format
0
SET @@session.default_week_format = 65550;
Warnings:
Warning 1292 Truncated incorrect default_week_format value: '65550'
SELECT @@session.default_week_format;
@@session.default_week_format
7
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
'#------------------FN_DYNVARS_022_06-----------------------#'
SELECT @@global.default_week_format = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='default_week_format';
@@global.default_week_format = VARIABLE_VALUE
1
SELECT @@session.default_week_format = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='default_week_format';
@@session.default_week_format = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_022_07-----------------------#'
SET @@global.default_week_format = TRUE;
SELECT @@global.default_week_format;
@@global.default_week_format
1
SET @@global.default_week_format = FALSE;
SELECT @@global.default_week_format;
@@global.default_week_format
0
'#---------------------FN_DYNVARS_001_08----------------------#'
SET @@global.default_week_format = 0;
SELECT @@default_week_format = @@global.default_week_format;
@@default_week_format = @@global.default_week_format
0
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@default_week_format = 1;
SELECT @@default_week_format = @@local.default_week_format;
@@default_week_format = @@local.default_week_format
1
SELECT @@local.default_week_format = @@session.default_week_format;
@@local.default_week_format = @@session.default_week_format
1
'#---------------------FN_DYNVARS_001_10----------------------#'
SET default_week_format = 1;
SELECT @@default_week_format;
@@default_week_format
1
SET local.default_week_format = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'default_week_format = 1' at line 1
SELECT local.default_week_format;
ERROR 42S02: Unknown table 'local' in field list
SET session.default_week_format = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'default_week_format = 1' at line 1
SELECT session.default_week_format;
ERROR 42S02: Unknown table 'session' in field list
SELECT default_week_format = @@session.default_week_format;
ERROR 42S22: Unknown column 'default_week_format' in 'field list'
SET @@global.default_week_format = @start_global_value;
SELECT @@global.default_week_format;
@@global.default_week_format
0
SET @@session.default_week_format = @start_session_value;
SELECT @@session.default_week_format;
@@session.default_week_format
0

View file

@ -0,0 +1,65 @@
'#--------------------FN_DYNVARS_022_01-------------------------#'
## Setting variable's value to 0 ##
SET @@session.default_week_format = 0;
SELECT @@session.default_week_format;
@@session.default_week_format
0
SELECT WEEK('2008-01-20');
WEEK('2008-01-20')
3
## Setting variable's value to 1 ##
SET @@session.default_week_format = 1;
SELECT @@session.default_week_format;
@@session.default_week_format
1
SELECT WEEK('2008-01-20');
WEEK('2008-01-20')
3
## Setting variable's value to 2 ##
SET @@session.default_week_format = 2;
SELECT @@session.default_week_format;
@@session.default_week_format
2
SELECT WEEK('2008-01-20');
WEEK('2008-01-20')
3
## Setting variable's value to 3 ##
SET @@session.default_week_format = 3;
SELECT @@session.default_week_format;
@@session.default_week_format
3
SELECT WEEK('2008-01-20');
WEEK('2008-01-20')
3
## Setting variable's value to 4 ##
SET @@session.default_week_format = 4;
SELECT @@session.default_week_format;
@@session.default_week_format
4
SELECT WEEK('2008-01-20');
WEEK('2008-01-20')
4
## Setting variable's value to 5 ##
SET @@session.default_week_format = 5;
SELECT @@session.default_week_format;
@@session.default_week_format
5
SELECT WEEK('2008-01-20');
WEEK('2008-01-20')
2
## Setting variable's value to 6 ##
SET @@session.default_week_format = 6;
SELECT @@session.default_week_format;
@@session.default_week_format
6
SELECT WEEK('2008-01-20');
WEEK('2008-01-20')
4
## Setting variable's value to 7 ##
SET @@session.default_week_format = 7;
SELECT @@session.default_week_format;
@@session.default_week_format
7
SELECT WEEK('2008-01-20');
WEEK('2008-01-20')
2

View file

@ -0,0 +1,98 @@
SET @start_value = @@global.delay_key_write;
SELECT @start_value;
@start_value
ON
'#--------------------FN_DYNVARS_023_01------------------------#'
SET @@global.delay_key_write = OFF;
SET @@global.delay_key_write = DEFAULT;
ERROR 42000: Variable 'delay_key_write' doesn't have a default value
'Bug # 34878: Documentation specifies a DEFAULT value of ON for variable but';
'its not supported';
SELECT @@global.delay_key_write;
@@global.delay_key_write
OFF
'#---------------------FN_DYNVARS_023_02-------------------------#'
SET @@global.delay_key_write = NULL;
ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'NULL'
'#--------------------FN_DYNVARS_023_03------------------------#'
SET @@global.delay_key_write = ON;
SELECT @@global.delay_key_write;
@@global.delay_key_write
ON
SET @@global.delay_key_write = OFF;
SELECT @@global.delay_key_write;
@@global.delay_key_write
OFF
SET @@global.delay_key_write = ALL;
SELECT @@global.delay_key_write;
@@global.delay_key_write
ALL
'#--------------------FN_DYNVARS_023_04-------------------------#'
SET @@global.delay_key_write = 3;
ERROR 42000: Variable 'delay_key_write' can't be set to the value of '3'
SET @@global.delay_key_write = -1;
ERROR 42000: Variable 'delay_key_write' can't be set to the value of '-1'
SET @@global.delay_key_write = TRU;
ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'TRU'
SET @@global.delay_key_write = ERROR;
ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'ERROR'
SET @@global.delay_key_write = FALSE0;
ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'FALSE0'
SET @@global.delay_key_write = ONN;
ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'ONN'
SET @@global.delay_key_write = OF;
SELECT @@global.delay_key_write;
@@global.delay_key_write
OFF
'Bug# 34828: Variable is incorrectly accepting OF as a value'
SET @@global.delay_key_write = ' ';
ERROR 42000: Variable 'delay_key_write' can't be set to the value of ' '
SET @@global.delay_key_write = "";
ERROR 42000: Variable 'delay_key_write' can't be set to the value of ''
'#-------------------FN_DYNVARS_023_05----------------------------#'
SET @@delay_key_write = 0;
ERROR HY000: Variable 'delay_key_write' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.delay_key_write;
ERROR HY000: Variable 'delay_key_write' is a GLOBAL variable
'#----------------------FN_DYNVARS_023_06------------------------#'
SELECT @@delay_key_write = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='delay_key_write';
@@delay_key_write = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_023_07-------------------------#'
SET @@global.delay_key_write = 0;
SELECT @@global.delay_key_write;
@@global.delay_key_write
OFF
SET @@global.delay_key_write = 1;
SELECT @@global.delay_key_write;
@@global.delay_key_write
ON
SET @@global.delay_key_write = 2;
SELECT @@global.delay_key_write;
@@global.delay_key_write
ALL
'#---------------------FN_DYNVARS_023_08----------------------#'
SET @@global.delay_key_write = TRUE;
SELECT @@global.delay_key_write;
@@global.delay_key_write
ON
SET @@global.delay_key_write = FALSE;
SELECT @@global.delay_key_write;
@@global.delay_key_write
OFF
'#---------------------FN_DYNVARS_023_09----------------------#'
SET delay_key_write = ON;
ERROR HY000: Variable 'delay_key_write' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@delay_key_write;
@@delay_key_write
OFF
SET GLOBAL delay_key_write = OFF;
SELECT @@global.delay_key_write;
@@global.delay_key_write
OFF
SET @@global.delay_key_write = @start_value;
SELECT @@global.delay_key_write;
@@global.delay_key_write
ON

View file

@ -0,0 +1,66 @@
'#--------------------FN_DYNVARS_023_01-------------------------#'
SET @@global.delay_key_write = ON;
SELECT @@global.delay_key_write;
@@global.delay_key_write
ON
'connect (user1,localhost,root,,,,)'
'connection user1'
SELECT @@global.delay_key_write AS res_is_ON;
res_is_ON
ON
SET @@global.delay_key_write = ALL;
'connect (user1,localhost,root,,,,)'
'connection user1'
SELECT @@global.delay_key_write AS res_is_ALL;
res_is_ALL
ALL
'#--------------------FN_DYNVARS_023_02-------------------------#'
'---check when delay_key_write is OFF---'
SET @@global.delay_key_write = OFF;
FLUSH STATUS;
CALL sp_addRecords(1,10);
SHOW STATUS LIKE 'Key_reads';
Variable_name Value
Key_reads 0
SHOW STATUS LIKE 'Key_writes';
Variable_name Value
Key_writes 9
SHOW STATUS LIKE 'Key_write_requests';
Variable_name Value
Key_write_requests 9
select count(*) from t1;
count(*)
9
'----check when delay_key_write is ON---'
SET @@global.delay_key_write = ON;
FLUSH STATUS;
CALL sp_addRecords(1,10);
SHOW STATUS LIKE 'Key_reads';
Variable_name Value
Key_reads 0
SHOW STATUS LIKE 'Key_writes';
Variable_name Value
Key_writes 0
SHOW STATUS LIKE 'Key_write_requests';
Variable_name Value
Key_write_requests 9
select count(*) from t1;
count(*)
9
'----check when delay_key_write is ALL---'
SET @@global.delay_key_write = ALL;
FLUSH STATUS;
CALL sp_addRecords(1,10);
SHOW STATUS LIKE 'Key_reads';
Variable_name Value
Key_reads 0
SHOW STATUS LIKE 'Key_writes';
Variable_name Value
Key_writes 0
SHOW STATUS LIKE 'Key_write_requests';
Variable_name Value
Key_write_requests 9
select count(*) from t1;
count(*)
9
DROP TABLE t1;

View file

@ -0,0 +1,186 @@
** Setup **
Creating connection con0
Creating connection con1
SET @global_delayed_insert_limit = @@GLOBAL.delayed_insert_limit;
CREATE TABLE t1 (a varchar(100));
'#--------------------FN_DYNVARS_25_01-------------------------#'
SET GLOBAL delayed_insert_limit = 9;
** Connection con0 **
SET GLOBAL delayed_insert_limit = 9;
** Connection con1 **
SET GLOBAL delayed_insert_limit = 9;
** Connection default **
SET GLOBAL delayed_insert_limit = 9;
INSERT INTO t1 VALUES('1');
INSERT INTO t1 VALUES('2');
INSERT INTO t1 VALUES('3');
INSERT INTO t1 VALUES('4');
INSERT INTO t1 VALUES('5');
INSERT INTO t1 VALUES('6');
LOCK TABLE t1 WRITE;
** Connection con1 **
INSERT DELAYED INTO t1 VALUES('7');
INSERT DELAYED INTO t1 VALUES('8');
INSERT DELAYED INTO t1 VALUES('9');
INSERT DELAYED INTO t1 VALUES('10');
INSERT DELAYED INTO t1 VALUES('11');
INSERT DELAYED INTO t1 VALUES('12');
INSERT DELAYED INTO t1 VALUES('13');
INSERT DELAYED INTO t1 VALUES('14');
INSERT DELAYED INTO t1 VALUES('15');
INSERT DELAYED INTO t1 VALUES('16');
INSERT DELAYED INTO t1 VALUES('17');
INSERT DELAYED INTO t1 VALUES('18');
INSERT DELAYED INTO t1 VALUES('19');
INSERT DELAYED INTO t1 VALUES('20');
INSERT DELAYED INTO t1 VALUES('21');
INSERT DELAYED INTO t1 VALUES('22');|
** Connection con0 **
SELECT * FROM t1;|
** Connection default **
Waiting for 1 sec
UNLOCK TABLES;
** Connection con0 **
a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'Bug#35386: insert delayed inserts 1 + limit rows instead of just limit rows'
** Connection default **
Waiting for 1 sec
Checking if the delayed insert continued afterwards
SELECT * FROM t1;
a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
DELETE FROM t1;
'#--------------------FN_DYNVARS_25_02-------------------------#'
SET GLOBAL delayed_insert_limit = 20;
** Connection con0 **
SET GLOBAL delayed_insert_limit = 20;
** Connection con1 **
SET GLOBAL delayed_insert_limit = 20;
** Connection default **
SET GLOBAL delayed_insert_limit = 20;
INSERT INTO t1 VALUES('1');
INSERT INTO t1 VALUES('2');
INSERT INTO t1 VALUES('3');
INSERT INTO t1 VALUES('4');
INSERT INTO t1 VALUES('5');
INSERT INTO t1 VALUES('6');
LOCK TABLE t1 WRITE;
** Connection con1 **
Asynchronous execute
INSERT DELAYED INTO t1 VALUES('7');
INSERT DELAYED INTO t1 VALUES('8');
INSERT DELAYED INTO t1 VALUES('9');
INSERT DELAYED INTO t1 VALUES('10');
INSERT DELAYED INTO t1 VALUES('11');
INSERT DELAYED INTO t1 VALUES('12');
INSERT DELAYED INTO t1 VALUES('13');
INSERT DELAYED INTO t1 VALUES('14');
INSERT DELAYED INTO t1 VALUES('15');
INSERT DELAYED INTO t1 VALUES('16');
INSERT DELAYED INTO t1 VALUES('17');
INSERT DELAYED INTO t1 VALUES('18');
INSERT DELAYED INTO t1 VALUES('19');
INSERT DELAYED INTO t1 VALUES('20');
INSERT DELAYED INTO t1 VALUES('21');
INSERT DELAYED INTO t1 VALUES('22');|
** Connection con0 **
Asynchronous execute
SELECT * FROM t1;|
** Connection default **
Waiting for 1 sec
UNLOCK TABLES;
** Connection con0 **
Asynchronous execute result
a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
** Connection default**
Waiting for 1 sec
Checking if the delayed insert gives the same result afterwards
SELECT * FROM t1;
a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
DELETE FROM t1;
Switching to default
Disconnecting from con1, con0
DROP TABLE t1;
SET @@GLOBAL.delayed_insert_limit = @global_delayed_insert_limit;

View file

@ -0,0 +1,114 @@
SET @start_value = @@global.delayed_insert_timeout;
SELECT @start_value;
@start_value
300
'#--------------------FN_DYNVARS_025_01------------------------#'
SET @@global.delayed_insert_timeout = 100;
SET @@global.delayed_insert_timeout = DEFAULT;
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
300
'#---------------------FN_DYNVARS_025_02-------------------------#'
SET @@global.delayed_insert_timeout = @start_value;
SELECT @@global.delayed_insert_timeout = 300;
@@global.delayed_insert_timeout = 300
1
'#--------------------FN_DYNVARS_025_03------------------------#'
SET @@global.delayed_insert_timeout = 10000;
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
10000
SET @@global.delayed_insert_timeout = 429;
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
429
SET @@global.delayed_insert_timeout = 1;
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
1
'#--------------------FN_DYNVARS_025_04-------------------------#'
SET @@global.delayed_insert_timeout = 0;
Warnings:
Warning 1292 Truncated incorrect delayed_insert_timeout value: '0'
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
1
SET @@global.delayed_insert_timeout = -1024;
Warnings:
Warning 1292 Truncated incorrect delayed_insert_timeout value: '0'
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
1
SET @@global.delayed_insert_timeout = 42949672950;
Warnings:
Warning 1292 Truncated incorrect delayed_insert_timeout value: '42949672950'
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
31536000
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.delayed_insert_timeout = 429496729.5;
ERROR 42000: Incorrect argument type to variable 'delayed_insert_timeout'
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
31536000
SET @@global.delayed_insert_timeout = ON;
ERROR 42000: Incorrect argument type to variable 'delayed_insert_timeout'
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
31536000
'#-------------------FN_DYNVARS_025_05----------------------------#'
SET @@session.delayed_insert_timeout = 0;
ERROR HY000: Variable 'delayed_insert_timeout' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.dalayed_insert_timeout;
ERROR HY000: Unknown system variable 'dalayed_insert_timeout'
'#----------------------FN_DYNVARS_025_06------------------------#'
SELECT @@global.delayed_insert_timeout = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='delayed_insert_timeout';
@@global.delayed_insert_timeout = VARIABLE_VALUE
1
SELECT @@delayed_insert_timeout = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='delayed_insert_timeout';
@@delayed_insert_timeout = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_025_07----------------------#'
SET @@global.delayed_insert_timeout = TRUE;
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
1
SET @@global.delayed_insert_timeout = FALSE;
Warnings:
Warning 1292 Truncated incorrect delayed_insert_timeout value: '0'
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
1
'#---------------------FN_DYNVARS_025_08----------------------#'
SET @@global.delayed_insert_timeout = 1;
SELECT @@delayed_insert_timeout = @@global.delayed_insert_timeout;
@@delayed_insert_timeout = @@global.delayed_insert_timeout
1
'#---------------------FN_DYNVARS_025_09----------------------#'
SET delayed_insert_timeout = 1;
ERROR HY000: Variable 'delayed_insert_timeout' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@delayed_insert_timeout;
@@delayed_insert_timeout
1
SET local.delayed_insert_timeout = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delayed_insert_timeout = 1' at line 1
SELECT local.delayed_insert_timeout;
ERROR 42S02: Unknown table 'local' in field list
SET global.delayed_insert_timeout = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delayed_insert_timeout = 1' at line 1
SELECT global.delayed_insert_timeout;
ERROR 42S02: Unknown table 'global' in field list
SELECT delayed_insert_timeout = @@session.delayed_insert_timeout;
ERROR 42S22: Unknown column 'delayed_insert_timeout' in 'field list'
SET @@global.delayed_insert_timeout = @start_value;
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
300
SET @@global.delayed_insert_timeout = @start_value;
SELECT @@global.delayed_insert_timeout;
@@global.delayed_insert_timeout
300

View file

@ -0,0 +1,186 @@
SET @start_global_value = @@global.div_precision_increment;
SELECT @start_global_value;
@start_global_value
4
SET @start_session_value = @@session.div_precision_increment;
SELECT @start_session_value;
@start_session_value
4
'#--------------------FN_DYNVARS_027_01-------------------------#'
SET @@global.div_precision_increment = 100;
Warnings:
Warning 1292 Truncated incorrect div_precision_increment value: '100'
SET @@global.div_precision_increment = DEFAULT;
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
4
SET @@session.div_precision_increment = 200;
Warnings:
Warning 1292 Truncated incorrect div_precision_increment value: '200'
SET @@session.div_precision_increment = DEFAULT;
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
4
'#--------------------FN_DYNVARS_027_02-------------------------#'
SET @@global.div_precision_increment = @start_global_value;
SELECT @@global.div_precision_increment = 4;
@@global.div_precision_increment = 4
1
SET @@session.div_precision_increment = @start_session_value;
SELECT @@session.div_precision_increment = 4;
@@session.div_precision_increment = 4
1
'#--------------------FN_DYNVARS_027_03-------------------------#'
SET @@global.div_precision_increment = 1;
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
1
SET @@global.div_precision_increment = 0;
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
0
SET @@global.div_precision_increment = 10;
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
10
SET @@global.div_precision_increment = 30;
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
30
'#--------------------FN_DYNVARS_027_04-------------------------#'
SET @@session.div_precision_increment = 1;
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
1
SET @@session.div_precision_increment = 0;
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
0
SET @@session.div_precision_increment = 7;
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
7
SET @@session.div_precision_increment = 30;
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
30
'#------------------FN_DYNVARS_027_05-----------------------#'
SET @@global.div_precision_increment = 31;
Warnings:
Warning 1292 Truncated incorrect div_precision_increment value: '31'
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
30
SET @@global.div_precision_increment = 40;
Warnings:
Warning 1292 Truncated incorrect div_precision_increment value: '40'
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
30
SET @@global.div_precision_increment = -1024;
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
0
SET @@global.div_precision_increment = 65536;
Warnings:
Warning 1292 Truncated incorrect div_precision_increment value: '65536'
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
30
SET @@session.div_precision_increment = 40;
Warnings:
Warning 1292 Truncated incorrect div_precision_increment value: '40'
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
30
SET @@session.div_precision_increment = 31;
Warnings:
Warning 1292 Truncated incorrect div_precision_increment value: '31'
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
30
SET @@session.div_precision_increment = -2;
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
0
SET @@session.div_precision_increment = 65550;
Warnings:
Warning 1292 Truncated incorrect div_precision_increment value: '65550'
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
30
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.div_precision_increment = 65530.30;
ERROR 42000: Incorrect argument type to variable 'div_precision_increment'
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
30
SET @@global.div_precision_increment = OFF;
ERROR 42000: Incorrect argument type to variable 'div_precision_increment'
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
30
SET @@session.div_precision_increment = ON;
ERROR 42000: Incorrect argument type to variable 'div_precision_increment'
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
30
SET @@session.div_precision_increment = 65530.30;
ERROR 42000: Incorrect argument type to variable 'div_precision_increment'
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
30
'#------------------FN_DYNVARS_027_06-----------------------#'
SELECT @@global.div_precision_increment = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='div_precision_increment';
@@global.div_precision_increment = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_027_07-----------------------#'
SELECT @@session.div_precision_increment = VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='div_precision_increment';
@@session.div_precision_increment = VARIABLE_VALUE
1
SET @@global.div_precision_increment = TRUE;
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
1
SET @@global.div_precision_increment = FALSE;
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
0
'#---------------------FN_DYNVARS_027_08----------------------#'
SET @@global.div_precision_increment = 0;
SELECT @@div_precision_increment = @@global.div_precision_increment;
@@div_precision_increment = @@global.div_precision_increment
0
'#---------------------FN_DYNVARS_027_09----------------------#'
SET @@div_precision_increment = 1;
SELECT @@div_precision_increment = @@local.div_precision_increment;
@@div_precision_increment = @@local.div_precision_increment
1
SELECT @@local.div_precision_increment = @@session.div_precision_increment;
@@local.div_precision_increment = @@session.div_precision_increment
1
'#---------------------FN_DYNVARS_027_10----------------------#'
SET div_precision_increment = 1;
SELECT @@div_precision_increment;
@@div_precision_increment
1
SET local.div_precision_increment = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'div_precision_increment = 1' at line 1
SELECT local.div_precision_increment;
ERROR 42S02: Unknown table 'local' in field list
SET session.div_precision_increment = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'div_precision_increment = 1' at line 1
SELECT session.div_precision_increment;
ERROR 42S02: Unknown table 'session' in field list
SELECT div_precision_increment = @@session.div_precision_increment;
ERROR 42S22: Unknown column 'div_precision_increment' in 'field list'
SET @@global.div_precision_increment = @start_global_value;
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
4
SET @@session.div_precision_increment = @start_session_value;
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
4

View file

@ -0,0 +1,79 @@
drop table if exists t1;
## Creating new table ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30),
salary LONG
);
'#--------------------FN_DYNVARS_027_01-------------------------#'
## Setting initial session value of variable to 3 ##
SET @@session.div_precision_increment = 3;
## Inserting some rows in table ##
INSERT into t1(name, salary) values('Record_1', 100011);
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;
name salary INCOME
Record_1 100011 250.0275
Record_2 501 1.2525
Record_3 210 0.525
'Bug#35374: div_precision is not working with table column'
## Verifying variable's behavior with direct division ##
SELECT 1/7;
1/7
0.143
'#--------------------FN_DYNVARS_027_02-------------------------#'
drop table if exists t1;
## Creating new table ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30),
salary LONG,
income_tax FLOAT
);
## Creating new connection test_con1 ##
## Setting global & session scope value of variable ##
SET @@global.div_precision_increment = 2;
SET @@session.div_precision_increment = 1;
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
2
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
1
## Inserting some data and verifying behavior of variable ##
INSERT into t1(name, salary, income_tax) values('Record_1', 100011, 100011*2.5/1000);
INSERT into t1(name, salary, income_tax) values('Record_2', 501, 501*2.5/1000);
INSERT into t1(name, salary, income_tax) values('Record_3', 210, 210*2.5/1000);
SELECT * from t1;
id name salary income_tax
1 Record_1 100011 250.027
2 Record_2 501 1.2525
3 Record_3 210 0.525
## Creating new connection ##
## Verifying session & global value of variable ##
SELECT @@global.div_precision_increment = 2;
@@global.div_precision_increment = 2
1
SELECT @@session.div_precision_increment = 2;
@@session.div_precision_increment = 2
1
## Verifying behavior of variable by inserting some rows in table ##
INSERT into t1(name, salary, income_tax) values('Record_4', 100011, 100011*2.5/1000);
INSERT into t1(name, salary, income_tax) values('Record_5', 501, 501*2.5/1000);
INSERT into t1(name, salary, income_tax) values('Record_6', 210, 210*2.5/1000);
SELECT * from t1;
id name salary income_tax
1 Record_1 100011 250.027
2 Record_2 501 1.2525
3 Record_3 210 0.525
4 Record_4 100011 250.027
5 Record_5 501 1.2525
6 Record_6 210 0.525
## Dropping table t1 ##
drop table t1;
## Disconnection both the connections ##

View file

@ -0,0 +1,174 @@
SET @session_start_value = @@session.engine_condition_pushdown;
SELECT @session_start_value;
@session_start_value
1
SET @global_start_value = @@global.engine_condition_pushdown;
SELECT @global_start_value;
@global_start_value
1
'#--------------------FN_DYNVARS_028_01------------------------#'
SET @@session.engine_condition_pushdown = 0;
SET @@session.engine_condition_pushdown = DEFAULT;
SELECT @@session.engine_condition_pushdown;
@@session.engine_condition_pushdown
1
SET @@global.engine_condition_pushdown = 0;
SET @@global.engine_condition_pushdown = DEFAULT;
SELECT @@global.engine_condition_pushdown;
@@global.engine_condition_pushdown
1
'#---------------------FN_DYNVARS_028_02-------------------------#'
SET engine_condition_pushdown = 1;
SELECT @@engine_condition_pushdown;
@@engine_condition_pushdown
1
SELECT session.engine_condition_pushdown;
ERROR 42S02: Unknown table 'session' in field list
SELECT local.engine_condition_pushdown;
ERROR 42S02: Unknown table 'local' in field list
SELECT global.engine_condition_pushdown;
ERROR 42S02: Unknown table 'global' in field list
SET session engine_condition_pushdown = 0;
SELECT @@session.engine_condition_pushdown;
@@session.engine_condition_pushdown
0
SET global engine_condition_pushdown = 0;
SELECT @@global.engine_condition_pushdown;
@@global.engine_condition_pushdown
0
'#--------------------FN_DYNVARS_028_03------------------------#'
SET @@session.engine_condition_pushdown = 0;
SELECT @@session.engine_condition_pushdown;
@@session.engine_condition_pushdown
0
SET @@session.engine_condition_pushdown = 1;
SELECT @@session.engine_condition_pushdown;
@@session.engine_condition_pushdown
1
SET @@global.engine_condition_pushdown = 0;
SELECT @@global.engine_condition_pushdown;
@@global.engine_condition_pushdown
0
SET @@global.engine_condition_pushdown = 1;
SELECT @@global.engine_condition_pushdown;
@@global.engine_condition_pushdown
1
'#--------------------FN_DYNVARS_028_04-------------------------#'
SET @@session.engine_condition_pushdown = -1;
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '-1'
SET @@session.engine_condition_pushdown = 1.6;
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '2'
SET @@session.engine_condition_pushdown = "T";
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'T'
SET @@session.engine_condition_pushdown = "Y";
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'Y'
SET @@session.engine_condition_pushdown = TRÜE;
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'TRÃœE'
SET @@session.engine_condition_pushdown = ÕN;
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'ÕN'
SET @@session.engine_condition_pushdown = OF;
SELECT @@session.engine_condition_pushdown;
@@session.engine_condition_pushdown
0
'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
SET @@session.engine_condition_pushdown = ÓFF;
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'ÓFF'
SET @@global.engine_condition_pushdown = -1;
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '-1'
SET @@global.engine_condition_pushdown = 2;
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '2'
SET @@global.engine_condition_pushdown = "T";
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'T'
SET @@global.engine_condition_pushdown = "Y";
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'Y'
SET @@global.engine_condition_pushdown = TRÜE;
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'TRÃœE'
SET @@global.engine_condition_pushdown = ÕN;
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'ÕN'
SET @@global.engine_condition_pushdown = OF;
SELECT @@global.engine_condition_pushdown;
@@global.engine_condition_pushdown
0
'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
SET @@global.engine_condition_pushdown = ÓFF;
ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of 'ÓFF'
'#-------------------FN_DYNVARS_028_05----------------------------#'
SET @@global.engine_condition_pushdown = 0;
SET @@session.engine_condition_pushdown = 1;
SELECT @@global.engine_condition_pushdown AS res_is_0;
res_is_0
0
SET @@global.engine_condition_pushdown = 0;
SELECT @@session.engine_condition_pushdown AS res_is_1;
res_is_1
1
'#----------------------FN_DYNVARS_028_06------------------------#'
SELECT @@global.engine_condition_pushdown = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='engine_condition_pushdown';
@@global.engine_condition_pushdown = VARIABLE_VALUE
1
SELECT @@global.engine_condition_pushdown;
@@global.engine_condition_pushdown
0
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='engine_condition_pushdown';
VARIABLE_VALUE
OFF
'#----------------------FN_DYNVARS_028_07------------------------#'
SELECT @@session.engine_condition_pushdown = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='engine_condition_pushdown';
@@session.engine_condition_pushdown = VARIABLE_VALUE
0
SELECT @@session.engine_condition_pushdown;
@@session.engine_condition_pushdown
1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='engine_condition_pushdown';
VARIABLE_VALUE
ON
'#---------------------FN_DYNVARS_028_08-------------------------#'
SET @@session.engine_condition_pushdown = OFF;
SELECT @@session.engine_condition_pushdown;
@@session.engine_condition_pushdown
0
SET @@session.engine_condition_pushdown = ON;
SELECT @@session.engine_condition_pushdown;
@@session.engine_condition_pushdown
1
SET @@global.engine_condition_pushdown = OFF;
SELECT @@global.engine_condition_pushdown;
@@global.engine_condition_pushdown
0
SET @@global.engine_condition_pushdown = ON;
SELECT @@global.engine_condition_pushdown;
@@global.engine_condition_pushdown
1
'#---------------------FN_DYNVARS_028_09----------------------#'
SET @@session.engine_condition_pushdown = TRUE;
SELECT @@session.engine_condition_pushdown;
@@session.engine_condition_pushdown
1
SET @@session.engine_condition_pushdown = FALSE;
SELECT @@session.engine_condition_pushdown;
@@session.engine_condition_pushdown
0
SET @@global.engine_condition_pushdown = TRUE;
SELECT @@global.engine_condition_pushdown;
@@global.engine_condition_pushdown
1
SET @@global.engine_condition_pushdown = FALSE;
SELECT @@global.engine_condition_pushdown;
@@global.engine_condition_pushdown
0
SET @@session.engine_condition_pushdown = @session_start_value;
SELECT @@session.engine_condition_pushdown;
@@session.engine_condition_pushdown
1
SET @@global.engine_condition_pushdown = @global_start_value;
SELECT @@global.engine_condition_pushdown;
@@global.engine_condition_pushdown
1

View file

@ -0,0 +1,54 @@
'#---------------------BS_STVARS_005_01----------------------#'
SELECT COUNT(@@SESSION.error_count);
COUNT(@@SESSION.error_count)
1
1 Expected
'#---------------------BS_STVARS_005_02----------------------#'
SET @@SESSION.error_count=1;
ERROR HY000: Variable 'error_count' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@SESSION.error_count);
COUNT(@@SESSION.error_count)
1
1 Expected
'#---------------------BS_STVARS_005_03----------------------#'
SELECT @@SESSION.error_count = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='error_count';
@@SESSION.error_count = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@SESSION.error_count);
COUNT(@@SESSION.error_count)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='error_count';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_005_04----------------------#'
SELECT @@error_count = @@SESSION.error_count;
@@error_count = @@SESSION.error_count
1
1 Expected
'#---------------------BS_STVARS_005_05----------------------#'
SELECT COUNT(@@error_count);
COUNT(@@error_count)
1
1 Expected
SELECT COUNT(@@local.error_count);
COUNT(@@local.error_count)
1
1 Expected
SELECT COUNT(@@SESSION.error_count);
COUNT(@@SESSION.error_count)
1
1 Expected
SELECT COUNT(@@GLOBAL.error_count);
ERROR HY000: Variable 'error_count' is a SESSION variable
Expected error 'Variable is a SESSION variable'
SELECT COUNT(error_count = @@GLOBAL.error_count);
ERROR 42S22: Unknown column 'error_count' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,98 @@
SET @start_value = @@global.event_scheduler;
SELECT @start_value;
@start_value
OFF
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.event_scheduler = DEFAULT;
ERROR 42000: Variable 'event_scheduler' doesn't have a default value
'Bug# 34878: According to documentation the default value of variable is OFF';
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.event_scheduler = ON;
SELECT @@global.event_scheduler;
@@global.event_scheduler
ON
SET @@global.event_scheduler = OFF;
SELECT @@global.event_scheduler;
@@global.event_scheduler
OFF
SET @@global.event_scheduler = DISABLED;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'DISABLED'
SELECT @@global.event_scheduler;
@@global.event_scheduler
OFF
'#--------------------FN_DYNVARS_004_03-------------------------#'
SET @@global.event_scheduler = 2;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2'
SET @@global.event_scheduler = -1;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of '-1'
SET @@global.event_scheduler = TRUEF;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'TRUEF'
SET @@global.event_scheduler = TRUE_F;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'TRUE_F'
SET @@global.event_scheduler = FALSE0;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'FALSE0'
SET @@global.event_scheduler = OON;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'OON'
SET @@global.event_scheduler = ONN;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'ONN'
SET @@global.event_scheduler = OOFF;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'OOFF'
SET @@global.event_scheduler = 0FF;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of '0FF'
SET @@global.event_scheduler = ' ';
ERROR 42000: Variable 'event_scheduler' can't be set to the value of ' '
SET @@global.event_scheduler = " ";
ERROR 42000: Variable 'event_scheduler' can't be set to the value of ' '
SET @@global.event_scheduler = '';
ERROR 42000: Variable 'event_scheduler' can't be set to the value of ''
'#-------------------FN_DYNVARS_004_04----------------------------#'
SET @@session.event_scheduler = OFF;
ERROR HY000: Variable 'event_scheduler' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.event_scheduler;
ERROR HY000: Variable 'event_scheduler' is a GLOBAL variable
'#----------------------FN_DYNVARS_004_05------------------------#'
SELECT @@global.event_scheduler = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='event_scheduler';
@@global.event_scheduler = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_004_06----------------------#'
SET @@global.event_scheduler = 0;
SELECT @@global.event_scheduler;
@@global.event_scheduler
OFF
SET @@global.event_scheduler = 1;
SELECT @@global.event_scheduler;
@@global.event_scheduler
ON
'#---------------------FN_DYNVARS_004_07----------------------#'
SET @@global.event_scheduler = TRUE;
SELECT @@global.event_scheduler;
@@global.event_scheduler
ON
SET @@global.event_scheduler = FALSE;
SELECT @@global.event_scheduler;
@@global.event_scheduler
OFF
'#---------------------FN_DYNVARS_004_08----------------------#'
SET @@global.event_scheduler = ON;
SELECT @@event_scheduler = @@global.event_scheduler;
@@event_scheduler = @@global.event_scheduler
1
'#---------------------FN_DYNVARS_004_09----------------------#'
SET event_scheduler = ON;
ERROR HY000: Variable 'event_scheduler' is a GLOBAL variable and should be set with SET GLOBAL
SET local.event_scheduler = OFF;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'event_scheduler = OFF' at line 1
SELECT local.event_scheduler;
ERROR 42S02: Unknown table 'local' in field list
SET global.event_scheduler = ON;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'event_scheduler = ON' at line 1
SELECT global.event_scheduler;
ERROR 42S02: Unknown table 'global' in field list
SELECT event_scheduler = @@session.event_scheduler;
ERROR 42S22: Unknown column 'event_scheduler' in 'field list'
SET @@global.event_scheduler = @start_value;
SELECT @@global.event_scheduler;
@@global.event_scheduler
OFF

View file

@ -0,0 +1,44 @@
drop table if exists t1;
## Creating new table ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30)
);
'#--------------------FN_DYNVARS_018_01-------------------------#'
## Setting initial value of variable to ON ##
SET @@global.event_scheduler = ON;
SELECT @@event_scheduler;
@@event_scheduler
ON
## Creating new event ##
CREATE EVENT test_event_1
ON SCHEDULE EVERY 3 SECOND
DO
INSERT into t1(name) values('Record_1');
SELECT * from t1;
id name
1 Record_1
2 Record_1
DROP EVENT test_event_1;
DELETE from t1;
select * from t1;
id name
'#--------------------FN_DYNVARS_018_02-------------------------#'
## Setting value of variable to OFF ##
SET @@global.event_scheduler = OFF;
SELECT @@event_scheduler;
@@event_scheduler
OFF
## Creating new event ##
CREATE EVENT test_event_1
ON SCHEDULE EVERY 3 SECOND
DO
INSERT into t1(name) values('Record_2');
## Table should be empty ##
SELECT * from t1;
id name
DROP EVENT test_event_1;
## Dropping table ##
DROP table t1;

View file

@ -0,0 +1,126 @@
SET @start_value = @@global.expire_logs_days;
SELECT @start_value;
@start_value
0
'#--------------------FN_DYNVARS_029_01------------------------#'
SET @@global.expire_logs_days = 99;
SET @@global.expire_logs_days = DEFAULT;
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
0
'#---------------------FN_DYNVARS_029_02-------------------------#'
SET @@global.expire_logs_days = @start_value;
SELECT @@global.expire_logs_days = 0;
@@global.expire_logs_days = 0
1
'#--------------------FN_DYNVARS_029_03------------------------#'
SET @@global.expire_logs_days = 0;
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
0
SET @@global.expire_logs_days = 99;
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
99
SET @@global.expire_logs_days = 10;
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
10
SET @@global.expire_logs_days = 21;
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
21
'#--------------------FN_DYNVARS_029_04-------------------------#'
SET @@global.expire_logs_days = -1;
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
0
SET @@global.expire_logs_days = 100;
Warnings:
Warning 1292 Truncated incorrect expire_logs_days value: '100'
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
99
SET @@global.expire_logs_days = 1024;
Warnings:
Warning 1292 Truncated incorrect expire_logs_days value: '1024'
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
99
SET @@global.expire_logs_days = 10000.01;
ERROR 42000: Incorrect argument type to variable 'expire_logs_days'
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
99
SET @@global.expire_logs_days = -1024;
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
0
SET @@global.expire_logs_days = 42949672950;
Warnings:
Warning 1292 Truncated incorrect expire_logs_days value: '42949672950'
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
99
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@global.expire_logs_days = ON;
ERROR 42000: Incorrect argument type to variable 'expire_logs_days'
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
99
SET @@global.expire_logs_days = 'test';
ERROR 42000: Incorrect argument type to variable 'expire_logs_days'
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
99
'#-------------------FN_DYNVARS_029_05----------------------------#'
SET @@session.expire_logs_days = 0;
ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@expire_logs_days;
@@expire_logs_days
99
'#----------------------FN_DYNVARS_029_06------------------------#'
SELECT @@global.expire_logs_days = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='expire_logs_days';
@@global.expire_logs_days = VARIABLE_VALUE
1
SELECT @@expire_logs_days = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='expire_logs_days';
@@expire_logs_days = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_029_07----------------------#'
SET @@global.expire_logs_days = TRUE;
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
1
SET @@global.expire_logs_days = FALSE;
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
0
'#---------------------FN_DYNVARS_029_08----------------------#'
SET @@global.expire_logs_days = 1;
SELECT @@expire_logs_days = @@global.expire_logs_days;
@@expire_logs_days = @@global.expire_logs_days
1
'#---------------------FN_DYNVARS_029_09----------------------#'
SET expire_logs_days = 1;
ERROR HY000: Variable 'expire_logs_days' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@expire_logs_days;
@@expire_logs_days
1
SET local.expire_logs_days = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'expire_logs_days = 1' at line 1
SELECT local.expire_logs_days;
ERROR 42S02: Unknown table 'local' in field list
SET global.expire_logs_days = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'expire_logs_days = 1' at line 1
SELECT global.expire_logs_days;
ERROR 42S02: Unknown table 'global' in field list
SELECT expire_logs_days = @@session.expire_logs_days;
ERROR 42S22: Unknown column 'expire_logs_days' in 'field list'
SET @@global.expire_logs_days = @start_value;
SELECT @@global.expire_logs_days;
@@global.expire_logs_days
0

View file

@ -0,0 +1,97 @@
SET @start_value = @@global.flush;
SELECT @start_value;
@start_value
0
'#--------------------FN_DYNVARS_030_01------------------------#'
SET @@global.flush = ON;
SET @@global.flush = DEFAULT;
ERROR 42000: Variable 'flush' doesn't have a default value
'Bug# 34878: FN_DYNVARS_002_01 - Default value is off according to Documentation of MySQL';
SELECT @@global.flush;
@@global.flush
1
'#---------------------FN_DYNVARS_030_02-------------------------#'
SET @@global.flush = @start_value;
SELECT @@global.flush;
@@global.flush
0
'#--------------------FN_DYNVARS_030_03------------------------#'
SET @@global.flush = ON;
SELECT @@global.flush;
@@global.flush
1
SET @@global.flush = OFF;
SELECT @@global.flush;
@@global.flush
0
SET @@global.flush = 0;
SELECT @@global.flush;
@@global.flush
0
SET @@global.flush = 1;
SELECT @@global.flush;
@@global.flush
1
'#--------------------FN_DYNVARS_030_04-------------------------#'
SET @@global.flush = 2;
ERROR 42000: Variable 'flush' can't be set to the value of '2'
SET @@global.flush = -1;
ERROR 42000: Variable 'flush' can't be set to the value of '-1'
SET @@global.flush = TRUEF;
ERROR 42000: Variable 'flush' can't be set to the value of 'TRUEF'
SET @@global.flush = TRUE_F;
ERROR 42000: Variable 'flush' can't be set to the value of 'TRUE_F'
SET @@global.flush = FALSE0;
ERROR 42000: Variable 'flush' can't be set to the value of 'FALSE0'
SET @@global.flush = OON;
ERROR 42000: Variable 'flush' can't be set to the value of 'OON'
SET @@global.flush = ONN;
ERROR 42000: Variable 'flush' can't be set to the value of 'ONN'
SET @@global.flush = OOFF;
ERROR 42000: Variable 'flush' can't be set to the value of 'OOFF'
SET @@global.flush = 0FF;
ERROR 42000: Variable 'flush' can't be set to the value of '0FF'
SET @@global.flush = ' ';
ERROR 42000: Variable 'flush' can't be set to the value of ' '
SET @@global.flush = " ";
ERROR 42000: Variable 'flush' can't be set to the value of ' '
SET @@global.flush = '';
ERROR 42000: Variable 'flush' can't be set to the value of ''
'#-------------------FN_DYNVARS_030_05----------------------------#'
SET @@session.flush = 1;
ERROR HY000: Variable 'flush' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.flush;
ERROR HY000: Variable 'flush' is a GLOBAL variable
'#----------------------FN_DYNVARS_030_06------------------------#'
SELECT @@global.flush = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='flush';
@@global.flush = VARIABLE_VALUE
0
'#---------------------FN_DYNVARS_030_07----------------------#'
SET @@global.flush = TRUE;
SELECT @@global.flush;
@@global.flush
1
SET @@global.flush = FALSE;
SELECT @@global.flush;
@@global.flush
0
'#---------------------FN_DYNVARS_030_08----------------------#'
SET @@global.flush = 1;
SELECT @@flush = @@global.flush;
@@flush = @@global.flush
1
'#---------------------FN_DYNVARS_030_09----------------------#'
SET flush = 1;
ERROR HY000: Variable 'flush' is a GLOBAL variable and should be set with SET GLOBAL
SET global.flush = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'flush = 1' at line 1
SELECT global.flush;
ERROR 42S02: Unknown table 'global' in field list
SELECT flush = @@session.flush;
ERROR 42S22: Unknown column 'flush' in 'field list'
SET @@global.flush = @start_value;
SELECT @@global.flush;
@@global.flush
0

View file

@ -0,0 +1,102 @@
SET @session_start_value = @@session.foreign_key_checks;
SELECT @session_start_value;
@session_start_value
1
'#--------------------FN_DYNVARS_032_01------------------------#'
SET @@session.foreign_key_checks = 1;
SET @@session.foreign_key_checks = DEFAULT;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
1
'Bug# 34878: No DEFAULT value for variable. Also setting DEFAULT does not give error'
'#---------------------FN_DYNVARS_032_02-------------------------#'
SET foreign_key_checks = 1;
SELECT @@foreign_key_checks;
@@foreign_key_checks
1
SELECT session.foreign_key_checks;
ERROR 42S02: Unknown table 'session' in field list
SELECT local.foreign_key_checks;
ERROR 42S02: Unknown table 'local' in field list
SET session foreign_key_checks = 0;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
0
'#--------------------FN_DYNVARS_032_03------------------------#'
SET @@session.foreign_key_checks = 0;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
0
SET @@session.foreign_key_checks = 1;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
1
'#--------------------FN_DYNVARS_032_04-------------------------#'
SET @@session.foreign_key_checks = -1;
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of '-1'
SET @@session.foreign_key_checks = 2;
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of '2'
SET @@session.foreign_key_checks = "T";
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'T'
SET @@session.foreign_key_checks = "Y";
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'Y'
SET @@session.foreign_key_checks = TRÜE;
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'TRÃœE'
SET @@session.foreign_key_checks = ÕN;
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'ÕN'
SET @@session.foreign_key_checks = OF;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
0
'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
SET @@session.foreign_key_checks = ÓFF;
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'ÓFF'
SET @@session.foreign_key_checks = '¹';
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of '¹'
SET @@session.foreign_key_checks = NO;
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'NO'
'#-------------------FN_DYNVARS_032_05----------------------------#'
SET @@global.foreign_key_checks = 0;
ERROR HY000: Variable 'foreign_key_checks' is a SESSION variable and can't be used with SET GLOBAL
SELECT @@global.foreign_key_checks;
ERROR HY000: Variable 'foreign_key_checks' is a SESSION variable
'#----------------------FN_DYNVARS_032_06------------------------#'
SELECT count(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='foreign_key_checks';
count(VARIABLE_VALUE)
1
'#----------------------FN_DYNVARS_032_07------------------------#'
SELECT @@session.foreign_key_checks = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='foreign_key_checks';
@@session.foreign_key_checks = VARIABLE_VALUE
1
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
0
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='foreign_key_checks';
VARIABLE_VALUE
OFF
'#---------------------FN_DYNVARS_032_08-------------------------#'
SET @@session.foreign_key_checks = OFF;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
0
SET @@session.foreign_key_checks = ON;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
1
'#---------------------FN_DYNVARS_032_09----------------------#'
SET @@session.foreign_key_checks = TRUE;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
1
SET @@session.foreign_key_checks = FALSE;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
0
SET @@session.foreign_key_checks = @session_start_value;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
1

View file

@ -0,0 +1,59 @@
'#--------------------FN_DYNVARS_032_01-------------------------#'
SET @@session.foreign_key_checks = 0;
'connect (con1,localhost,root,,,,)'
'connection con1'
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
1
SET @@session.foreign_key_checks = 1;
'connect (con2,localhost,root,,,,)'
'connection con2'
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
1
'#--------------------FN_DYNVARS_032_02-------------------------#'
'connection con1'
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1(a INT PRIMARY KEY)ENGINE = INNODB;
CREATE TABLE t2(a INT PRIMARY KEY,b INT)ENGINE = INNODB;
ALTER TABLE t2
ADD CONSTRAINT fk FOREIGN KEY (b) REFERENCES t1 (a);
'---Check when foreign_key_checks is enabled---'
SET @@session.foreign_key_checks = 1;
INSERT INTO t1 values (1),(2),(3);
INSERT INTO t2 values (10,1);
INSERT INTO t2 values (20,22);
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`b`) REFERENCES `t1` (`a`))
'---Check when foreign_key_checks is disabled---'
TRUNCATE t1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`b`) REFERENCES `t1` (`a`))
SET @@session.foreign_key_checks = 0;
TRUNCATE t1;
TRUNCATE t2;
INSERT INTO t1 values (1),(2),(3);
INSERT INTO t2 values (10,1);
INSERT INTO t2 values (20,4);
'try enabling foreign_key_checks again';
SET @@session.foreign_key_checks = 1;
UPDATE t2 SET b=4 where a=20;
'Bug#35358: Updating an incorrect foreign key(inserted by disabling '
'foreign_key_checks)to the same value does not raise error after '
'enabling foreign_key_checks'
'Check when foreign_key_checks is enabled and FK constraint is re-created'
SET @@session.foreign_key_checks = 0;
TRUNCATE t2;
TRUNCATE t1;
INSERT INTO t1 values (1),(2),(3);
INSERT INTO t2 values (10,1),(20,4);
ALTER TABLE t2 DROP FOREIGN KEY fk;
SET @@session.foreign_key_checks = 1;
DELETE FROM t2 WHERE b not in (SELECT a from t1);
ALTER TABLE t2
ADD CONSTRAINT fk FOREIGN KEY (b) REFERENCES t1 (a);
INSERT INTO t2 values (20,2);
SELECT * from t2;
a b
10 1
20 2
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t1;

View file

@ -0,0 +1,102 @@
SET @global_start_value = @@global.ft_boolean_syntax;
SELECT @global_start_value;
@global_start_value
+ -><()~*:""&|
'#--------------------FN_DYNVARS_033_01------------------#'
SELECT ft_boolean_syntax;
ERROR 42S22: Unknown column 'ft_boolean_syntax' in 'field list'
SELECT @@ft_boolean_syntax;
@@ft_boolean_syntax
+ -><()~*:""&|
SET @@global.ft_boolean_syntax='+ -><()~*:""&|';
SELECT @@global.ft_boolean_syntax;
@@global.ft_boolean_syntax
+ -><()~*:""&|
SET global ft_boolean_syntax='$ -><()`*:""&|';
SELECT global ft_boolean_syntax;
ERROR 42S22: Unknown column 'global' in 'field list'
'#--------------------FN_DYNVARS_033_02-------------------------#'
SET @@global.ft_boolean_syntax = '# -><()!*:""&|';
SET @@global.ft_boolean_syntax = DEFAULT;
SELECT @@global.ft_boolean_syntax;
@@global.ft_boolean_syntax
+ -><()~*:""&|
'#--------------------FN_DYNVARS_033_03-------------------------#'
SET @@session.ft_boolean_syntax = '# -><()!*:""&|';
ERROR HY000: Variable 'ft_boolean_syntax' is a GLOBAL variable and should be set with SET GLOBAL
SET @@ft_boolean_syntax = '# -><()!*:""&|';
ERROR HY000: Variable 'ft_boolean_syntax' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.ft_boolean_syntax;
ERROR HY000: Variable 'ft_boolean_syntax' is a GLOBAL variable
SELECT @@local.ft_boolean_syntax;
ERROR HY000: Variable 'ft_boolean_syntax' is a GLOBAL variable
'#--------------------FN_DYNVARS_033_04-------------------------#'
SET @@global.ft_boolean_syntax='+ -><()~*:""&|';
SELECT @@global.ft_boolean_syntax;
@@global.ft_boolean_syntax
+ -><()~*:""&|
SET @@global.ft_boolean_syntax=' +-><()~*:""&|';
SELECT @@global.ft_boolean_syntax;
@@global.ft_boolean_syntax
+-><()~*:""&|
SET @@global.ft_boolean_syntax=' -+()<>~*:``&|';
SELECT @@global.ft_boolean_syntax;
@@global.ft_boolean_syntax
-+()<>~*:``&|
SET @@global.ft_boolean_syntax='+ -><()~*:""@!';
SELECT @@global.ft_boolean_syntax;
@@global.ft_boolean_syntax
+ -><()~*:""@!
SET @@global.ft_boolean_syntax=" +-><()~*:''&|";
SELECT @@global.ft_boolean_syntax;
@@global.ft_boolean_syntax
+-><()~*:''&|
SET @@global.ft_boolean_syntax=' ~/!@#$%^&*()-';
SELECT @@global.ft_boolean_syntax;
@@global.ft_boolean_syntax
~/!@#$%^&*()-
'#--------------------FN_DYNVARS_033_05-------------------------#'
SET @@global.ft_boolean_syntax = '+-> <()~*:""&|';
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of '+-> <()~*:""&|'
SET @@global.ft_boolean_syntax = '0';
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of '0'
SET @@global.ft_boolean_syntax = '1 -><()~*:11&|';
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of '1 -><()~*:11&|'
SET @@global.ft_boolean_syntax = '# -><()~*:11&1';
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of '# -><()~*:11&1'
SET @@global.ft_boolean_syntax = '1234567890ABCD';
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of '1234567890ABCD'
SET @@global.ft_boolean_syntax = -1;
ERROR 42000: Incorrect argument type to variable 'ft_boolean_syntax'
SET @@global.ft_boolean_syntax = '+-> <((~*:".&|';
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of '+-> <((~*:".&|'
SET @@global.ft_boolean_syntax = ' ';
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of ' '
SET @@global.ft_boolean_syntax = ON;
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of 'ON'
SET @@global.ft_boolean_syntax = true;
ERROR 42000: Incorrect argument type to variable 'ft_boolean_syntax'
SET @@global.ft_boolean_syntax = + -><()~*:""&|;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '><()~*:""&|' at line 1
SET @@global.ft_boolean_syntax = ENABLE;
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of 'ENABLE'
SET @@global.ft_boolean_syntax = 'IGNORE';
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of 'IGNORE'
'#--------------------FN_DYNVARS_033_06-------------------------#'
SELECT @@global.ft_boolean_syntax = (SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='ft_boolean_syntax') AS res;
res
1
'#--------------------FN_DYNVARS_033_07-------------------------#'
SELECT @global_start_value;
@global_start_value
+ -><()~*:""&|
SET @@global.ft_boolean_syntax = @global_start_value;
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of ''
'Bug# 34883: ft_boolean_syntax cant be assigned values from session temporary';
'variables';
SET @@global.ft_boolean_syntax = DEFAULT;
SELECT @@global.ft_boolean_syntax;
@@global.ft_boolean_syntax
+ -><()~*:""&|

View file

@ -0,0 +1,107 @@
'#--------------------FN_DYNVARS_033_01-------------------------#'
SET @@global.ft_boolean_syntax = ' -+()<>~*:``&|';
'connect (con1,localhost,root,,,,)'
'connection con1'
SELECT @@global.ft_boolean_syntax;
@@global.ft_boolean_syntax
-+()<>~*:``&|
SET @@global.ft_boolean_syntax = '+ -><()~*:""&|';
'connect (con2,localhost,root,,,,)'
'connection con2'
SELECT @@global.ft_boolean_syntax;
@@global.ft_boolean_syntax
+ -><()~*:""&|
'#--------------------FN_DYNVARS_033_02-------------------------#'
'connection default'
DROP TABLE IF EXISTS t1;
CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200),
body TEXT,
FULLTEXT (title,body)
);
INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...'),
('How To',''),
('How To Use MySQL Well','After you went through a ...'),
('Optimizing MySQL','In this tutorial we will show .... Run command line ...'),
('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
('100 Tips for Myisam','1. Myisam is faster than innodb 2. Tricks and Tips for Myisam...'),
('MySQL vs. YourSQL','In the following database comparison ...'),
('MySQL Security','When configured properly, MySQL ...'),
('Database Security','Configuring MySQL for ...');
SET @@global.ft_boolean_syntax = DEFAULT;
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('+mySQL -yourSQL' IN BOOLEAN MODE);
id title body
1 MySQL Tutorial DBMS stands for DataBase ...
3 How To Use MySQL Well After you went through a ...
4 Optimizing MySQL In this tutorial we will show .... Run command line ...
5 1001 MySQL Tricks 1. Never run mysqld as root. 2. ...
8 MySQL Security When configured properly, MySQL ...
9 Database Security Configuring MySQL for ...
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('+MySQL +YourSQL' IN BOOLEAN MODE);
id title body
7 MySQL vs. YourSQL In the following database comparison ...
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('MySQL' IN BOOLEAN MODE);
id title body
1 MySQL Tutorial DBMS stands for DataBase ...
3 How To Use MySQL Well After you went through a ...
4 Optimizing MySQL In this tutorial we will show .... Run command line ...
5 1001 MySQL Tricks 1. Never run mysqld as root. 2. ...
7 MySQL vs. YourSQL In the following database comparison ...
8 MySQL Security When configured properly, MySQL ...
9 Database Security Configuring MySQL for ...
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('mysql tutorial dbms' IN BOOLEAN MODE);
id title body
1 MySQL Tutorial DBMS stands for DataBase ...
3 How To Use MySQL Well After you went through a ...
4 Optimizing MySQL In this tutorial we will show .... Run command line ...
5 1001 MySQL Tricks 1. Never run mysqld as root. 2. ...
7 MySQL vs. YourSQL In the following database comparison ...
8 MySQL Security When configured properly, MySQL ...
9 Database Security Configuring MySQL for ...
SELECT id,title,body, (MATCH (title,body)
AGAINST ('+security configuring' IN BOOLEAN MODE)) AS relevance
FROM articles WHERE MATCH (title,body)
AGAINST ('+security configuring' IN BOOLEAN MODE);
id title body relevance
8 MySQL Security When configured properly, MySQL ... 1
9 Database Security Configuring MySQL for ... 1.3333333730698
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('"faster than"' IN BOOLEAN MODE);
id title body
6 100 Tips for Myisam 1. Myisam is faster than innodb 2. Tricks and Tips for Myisam...
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('+run ~line' IN BOOLEAN MODE);
id title body
'Bug#35359: ~ is not working correctly. Its behaving like -'
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('10*' IN BOOLEAN MODE);
id title body
5 1001 MySQL Tricks 1. Never run mysqld as root. 2. ...
'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)
AGAINST ('+MySQL +(>show <dbms)' IN BOOLEAN MODE)
ORDER BY relevance DESC;
id title body relevance
4 Optimizing MySQL In this tutorial we will show .... Run command line ... 1.25
1 MySQL Tutorial DBMS stands for DataBase ... 0.83333337306976
'---try setting different operators. Default '+ -><()~*:""&|'--'
SET @@global.ft_boolean_syntax='~ /!@#$%^&*()-';
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('~mySQL /yourSQL' IN BOOLEAN MODE);
id title body
1 MySQL Tutorial DBMS stands for DataBase ...
3 How To Use MySQL Well After you went through a ...
4 Optimizing MySQL In this tutorial we will show .... Run command line ...
5 1001 MySQL Tricks 1. Never run mysqld as root. 2. ...
8 MySQL Security When configured properly, MySQL ...
9 Database Security Configuring MySQL for ...
'Bug#35361: Different syntax does not produce result as default operators'
SET @@global.ft_boolean_syntax=DEFAULT;

View file

@ -0,0 +1,94 @@
SET @start_value = @@global.general_log;
SELECT @start_value;
@start_value
1
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.general_log = DEFAULT;
SELECT @@global.general_log = 0;
@@global.general_log = 0
1
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.general_log = ON;
SELECT @@global.general_log;
@@global.general_log
1
SET @@global.general_log = OFF;
SELECT @@global.general_log;
@@global.general_log
0
'#--------------------FN_DYNVARS_004_03-------------------------#'
SET @@global.general_log = 2;
ERROR 42000: Variable 'general_log' can't be set to the value of '2'
SET @@global.general_log = -1;
ERROR 42000: Variable 'general_log' can't be set to the value of '-1'
SET @@global.general_log = TRUEF;
ERROR 42000: Variable 'general_log' can't be set to the value of 'TRUEF'
SET @@global.general_log = TRUE_F;
ERROR 42000: Variable 'general_log' can't be set to the value of 'TRUE_F'
SET @@global.general_log = FALSE0;
ERROR 42000: Variable 'general_log' can't be set to the value of 'FALSE0'
SET @@global.general_log = OON;
ERROR 42000: Variable 'general_log' can't be set to the value of 'OON'
SET @@global.general_log = ONN;
ERROR 42000: Variable 'general_log' can't be set to the value of 'ONN'
SET @@global.general_log = OOFF;
ERROR 42000: Variable 'general_log' can't be set to the value of 'OOFF'
SET @@global.general_log = 0FF;
ERROR 42000: Variable 'general_log' can't be set to the value of '0FF'
SET @@global.general_log = ' ';
ERROR 42000: Variable 'general_log' can't be set to the value of ' '
SET @@global.general_log = " ";
ERROR 42000: Variable 'general_log' can't be set to the value of ' '
SET @@global.general_log = '';
ERROR 42000: Variable 'general_log' can't be set to the value of ''
'#-------------------FN_DYNVARS_004_04----------------------------#'
SET @@session.general_log = OFF;
ERROR HY000: Variable 'general_log' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.general_log;
ERROR HY000: Variable 'general_log' is a GLOBAL variable
'#----------------------FN_DYNVARS_004_05------------------------#'
SELECT @@global.general_log = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='general_log';
@@global.general_log = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_004_06----------------------#'
SET @@global.general_log = 0;
SELECT @@global.general_log;
@@global.general_log
0
SET @@global.general_log = 1;
SELECT @@global.general_log;
@@global.general_log
1
'#---------------------FN_DYNVARS_004_07----------------------#'
SET @@global.general_log = TRUE;
SELECT @@global.general_log;
@@global.general_log
1
SET @@global.general_log = FALSE;
SELECT @@global.general_log;
@@global.general_log
0
'#---------------------FN_DYNVARS_004_08----------------------#'
SET @@global.general_log = ON;
SELECT @@general_log = @@global.general_log;
@@general_log = @@global.general_log
1
'#---------------------FN_DYNVARS_004_09----------------------#'
SET general_log = ON;
ERROR HY000: Variable 'general_log' is a GLOBAL variable and should be set with SET GLOBAL
SET local.general_log = OFF;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'general_log = OFF' at line 1
SELECT local.general_log;
ERROR 42S02: Unknown table 'local' in field list
SET global.general_log = ON;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'general_log = ON' at line 1
SELECT global.general_log;
ERROR 42S02: Unknown table 'global' in field list
SELECT general_log = @@session.general_log;
ERROR 42S22: Unknown column 'general_log' in 'field list'
SET @@global.general_log = @start_value;
SELECT @@global.general_log;
@@global.general_log
1

View file

@ -0,0 +1,18 @@
SET @start_value = @@global.general_log_file;
SELECT @start_value;
@start_value
test.log
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.general_log_file = DEFAULT;
SELECT RIGHT(@@global.general_log_file,10) AS log_file;
log_file
master.log
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.general_log_file = mytest.log;
ERROR 42000: Variable 'general_log_file' can't be set to the value of 'log'
'#----------------------FN_DYNVARS_004_03------------------------#'
SELECT @@global.general_log_file = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='general_log_file';
@@global.general_log_file = VARIABLE_VALUE
1

View file

@ -0,0 +1,19 @@
drop table if exists t1;
## Creating new table ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30)
);
'#--------------------FN_DYNVARS_018_01-------------------------#'
SELECT @@general_log_file;
@@general_log_file
mysql-test.log
INSERT into t1(name) values('Record_1');
INSERT into t1(name) values('Record_2');
INSERT into t1(name) values('Record_3');
INSERT into t1(name) values('Record_4');
## Verifying general log file ##
## Dropping table ##
DROP TABLE t1;

View file

@ -0,0 +1,32 @@
drop table if exists t1;
## Creating new table ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30)
);
'#--------------------FN_DYNVARS_018_01-------------------------#'
## Setting initial value of variable to OFF ##
SET @@global.general_log = OFF;
SELECT @@general_log;
@@general_log
0
## Inserting some Records & Verifying output in log ##
INSERT into t1(name) values('Record_1');
INSERT into t1(name) values('Record_2');
## There should be no difference, case should pass ##
'#--------------------FN_DYNVARS_018_01-------------------------#'
## Setting initial value of variable to OFF ##
SET @@global.general_log = ON;
SELECT @@general_log;
@@general_log
1
## Inserting some Records & Verifying output in log ##
INSERT into t1(name) values('Record_3');
INSERT into t1(name) values('Record_4');
## There should be no difference, case should pass ##
## This case is failing which shows that mysql is writing in general ##
## log when we set general_log to ON ##
## Dropping tables ##
DROP TABLE t1;

View file

@ -0,0 +1,168 @@
SET @start_global_value = @@global.group_concat_max_len;
SELECT @start_global_value;
@start_global_value
1024
SET @start_session_value = @@session.group_concat_max_len;
SELECT @start_session_value;
@start_session_value
1024
'#--------------------FN_DYNVARS_034_01-------------------------#'
SET @@global.group_concat_max_len = 100;
SET @@global.group_concat_max_len = DEFAULT;
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
1024
SET @@session.group_concat_max_len = 200;
SET @@session.group_concat_max_len = DEFAULT;
SELECT @@session.group_concat_max_len;
@@session.group_concat_max_len
1024
'#--------------------FN_DYNVARS_034_02-------------------------#'
SET @@global.group_concat_max_len = DEFAULT;
SELECT @@global.group_concat_max_len = 1;
@@global.group_concat_max_len = 1
0
SET @@session.group_concat_max_len = DEFAULT;
SELECT @@session.group_concat_max_len = 1;
@@session.group_concat_max_len = 1
0
'#--------------------FN_DYNVARS_034_03-------------------------#'
SET @@global.group_concat_max_len = 1;
Warnings:
Warning 1292 Truncated incorrect group_concat_max_len value: '1'
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
4
SET @@global.group_concat_max_len = 60020;
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
60020
SET @@global.group_concat_max_len = 65535;
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
65535
'#--------------------FN_DYNVARS_034_04-------------------------#'
SET @@session.group_concat_max_len = 1;
Warnings:
Warning 1292 Truncated incorrect group_concat_max_len value: '1'
SELECT @@session.group_concat_max_len;
@@session.group_concat_max_len
4
SET @@session.group_concat_max_len = 50050;
SELECT @@session.group_concat_max_len;
@@session.group_concat_max_len
50050
SET @@session.group_concat_max_len = 65535;
SELECT @@session.group_concat_max_len;
@@session.group_concat_max_len
65535
'#------------------FN_DYNVARS_034_05-----------------------#'
SET @@global.group_concat_max_len = 0;
Warnings:
Warning 1292 Truncated incorrect group_concat_max_len value: '0'
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
4
SET @@global.group_concat_max_len = -1024;
Warnings:
Warning 1292 Truncated incorrect group_concat_max_len value: '0'
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
4
SET @@global.group_concat_max_len = 65536;
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
65536
SET @@global.group_concat_max_len = 65530.34.;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
65536
SET @@global.group_concat_max_len = test;
ERROR 42000: Incorrect argument type to variable 'group_concat_max_len'
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
65536
SET @@session.group_concat_max_len = 0;
Warnings:
Warning 1292 Truncated incorrect group_concat_max_len value: '0'
SELECT @@session.group_concat_max_len;
@@session.group_concat_max_len
4
SET @@session.group_concat_max_len = -2;
Warnings:
Warning 1292 Truncated incorrect group_concat_max_len value: '0'
SELECT @@session.group_concat_max_len;
@@session.group_concat_max_len
4
SET @@session.group_concat_max_len = 65530.34.;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
SET @@session.group_concat_max_len = 65550;
SELECT @@session.group_concat_max_len;
@@session.group_concat_max_len
65550
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@session.group_concat_max_len = test;
ERROR 42000: Incorrect argument type to variable 'group_concat_max_len'
SELECT @@session.group_concat_max_len;
@@session.group_concat_max_len
65550
'#------------------FN_DYNVARS_034_06-----------------------#'
SELECT @@global.group_concat_max_len = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='group_concat_max_len';
@@global.group_concat_max_len = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_034_07-----------------------#'
SELECT @@session.group_concat_max_len = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='group_concat_max_len';
@@session.group_concat_max_len = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_034_08-----------------------#'
SET @@global.group_concat_max_len = TRUE;
Warnings:
Warning 1292 Truncated incorrect group_concat_max_len value: '1'
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
4
SET @@global.group_concat_max_len = FALSE;
Warnings:
Warning 1292 Truncated incorrect group_concat_max_len value: '0'
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
4
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@global.group_concat_max_len = 10;
SELECT @@group_concat_max_len = @@global.group_concat_max_len;
@@group_concat_max_len = @@global.group_concat_max_len
0
'#---------------------FN_DYNVARS_001_10----------------------#'
SET @@group_concat_max_len = 100;
SELECT @@group_concat_max_len = @@local.group_concat_max_len;
@@group_concat_max_len = @@local.group_concat_max_len
1
SELECT @@local.group_concat_max_len = @@session.group_concat_max_len;
@@local.group_concat_max_len = @@session.group_concat_max_len
1
'#---------------------FN_DYNVARS_001_11----------------------#'
SET group_concat_max_len = 1;
Warnings:
Warning 1292 Truncated incorrect group_concat_max_len value: '1'
SELECT @@group_concat_max_len;
@@group_concat_max_len
4
SELECT local.group_concat_max_len;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.group_concat_max_len;
ERROR 42S02: Unknown table 'session' in field list
SELECT group_concat_max_len = @@session.group_concat_max_len;
ERROR 42S22: Unknown column 'group_concat_max_len' in 'field list'
SET @@global.group_concat_max_len = @start_global_value;
SELECT @@global.group_concat_max_len;
@@global.group_concat_max_len
1024
SET @@session.group_concat_max_len = @start_session_value;
SELECT @@session.group_concat_max_len;
@@session.group_concat_max_len
1024

View file

@ -0,0 +1,77 @@
drop table if exists t1;
## Creating new table t1 ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
rollno int NOT NULL,
name VARCHAR(30)
);
'#--------------------FN_DYNVARS_034_01-------------------------#'
## Setting initial value of variable to 4 ##
SET @@global.group_concat_max_len = 4;
## Inserting some rows in table ##
INSERT into t1(rollno, name) values(1, 'Record_1');
INSERT into t1(rollno, name) values(2, 'Record_2');
INSERT into t1(rollno, name) values(1, 'Record_3');
INSERT into t1(rollno, name) values(3, 'Record_4');
INSERT into t1(rollno, name) values(1, 'Record_5');
INSERT into t1(rollno, name) values(3, 'Record_6');
INSERT into t1(rollno, name) values(4, 'Record_7');
INSERT into t1(rollno, name) values(4, 'Record_8');
## Creating two new connections ##
'#--------------------FN_DYNVARS_034_02-------------------------#'
## Connecting with test_con1 ##
## Accessing data and using group_concat on column whose value is greater than 4 ##
SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno;
id rollno group_concat(name)
1 1 Reco
2 2 Reco
4 3 Reco
7 4 Reco
Warnings:
Warning 1260 4 line(s) were cut by GROUP_CONCAT()
## Changing session value of variable and verifying its behavior, ##
## warning should come here ##
SET @@session.group_concat_max_len = 10;
SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno;
id rollno group_concat(name)
1 1 Record_1,R
2 2 Record_2
4 3 Record_4,R
7 4 Record_7,R
Warnings:
Warning 1260 3 line(s) were cut by GROUP_CONCAT()
'#--------------------FN_DYNVARS_034_03-------------------------#'
## Connecting with new connection test_con2 ##
## Verifying initial value of variable. It should be 4 ##
SELECT @@session.group_concat_max_len = 4;
@@session.group_concat_max_len = 4
1
## Setting session value of variable to 20 and verifying variable is concating ##
## column's value to 20 or not ##
SET @@session.group_concat_max_len = 20;
## Verifying value of name column, it should not me more than 20 characters ##
## Warning should come here ##
SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno;
id rollno group_concat(name)
1 1 Record_1,Record_3,Re
2 2 Record_2
4 3 Record_4,Record_6
7 4 Record_7,Record_8
Warnings:
Warning 1260 1 line(s) were cut by GROUP_CONCAT()
'#--------------------FN_DYNVARS_034_04-------------------------#'
## Setting session value of variable to 26. No warning should appear here ##
## because the value after concatination is less than 30 ##
SET @@session.group_concat_max_len = 26;
## Verifying value of name column, it should not give warning now ##
SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno;
id rollno group_concat(name)
1 1 Record_1,Record_3,Record_5
2 2 Record_2
4 3 Record_4,Record_6
7 4 Record_7,Record_8
## Dropping table t1 ##
DROP table t1;
## Disconnecting both the connection ##

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_006_01----------------------#'
SELECT COUNT(@@GLOBAL.have_compress);
COUNT(@@GLOBAL.have_compress)
1
1 Expected
'#---------------------BS_STVARS_006_02----------------------#'
SET @@GLOBAL.have_compress=1;
ERROR HY000: Variable 'have_compress' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_compress);
COUNT(@@GLOBAL.have_compress)
1
1 Expected
'#---------------------BS_STVARS_006_03----------------------#'
SELECT @@GLOBAL.have_compress = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_compress';
@@GLOBAL.have_compress = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_compress);
COUNT(@@GLOBAL.have_compress)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_compress';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_006_04----------------------#'
SELECT @@have_compress = @@GLOBAL.have_compress;
@@have_compress = @@GLOBAL.have_compress
1
1 Expected
'#---------------------BS_STVARS_006_05----------------------#'
SELECT COUNT(@@have_compress);
COUNT(@@have_compress)
1
1 Expected
SELECT COUNT(@@local.have_compress);
ERROR HY000: Variable 'have_compress' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_compress);
ERROR HY000: Variable 'have_compress' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_compress);
COUNT(@@GLOBAL.have_compress)
1
1 Expected
SELECT have_compress = @@SESSION.have_compress;
ERROR 42S22: Unknown column 'have_compress' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_007_01----------------------#'
SELECT COUNT(@@GLOBAL.have_crypt);
COUNT(@@GLOBAL.have_crypt)
1
1 Expected
'#---------------------BS_STVARS_007_02----------------------#'
SET @@GLOBAL.have_crypt=1;
ERROR HY000: Variable 'have_crypt' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_crypt);
COUNT(@@GLOBAL.have_crypt)
1
1 Expected
'#---------------------BS_STVARS_007_03----------------------#'
SELECT @@GLOBAL.have_crypt = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_crypt';
@@GLOBAL.have_crypt = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_crypt);
COUNT(@@GLOBAL.have_crypt)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_crypt';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_007_04----------------------#'
SELECT @@have_crypt = @@GLOBAL.have_crypt;
@@have_crypt = @@GLOBAL.have_crypt
1
1 Expected
'#---------------------BS_STVARS_007_05----------------------#'
SELECT COUNT(@@have_crypt);
COUNT(@@have_crypt)
1
1 Expected
SELECT COUNT(@@local.have_crypt);
ERROR HY000: Variable 'have_crypt' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_crypt);
ERROR HY000: Variable 'have_crypt' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_crypt);
COUNT(@@GLOBAL.have_crypt)
1
1 Expected
SELECT have_crypt = @@SESSION.have_crypt;
ERROR 42S22: Unknown column 'have_crypt' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_008_01----------------------#'
SELECT COUNT(@@GLOBAL.have_csv);
COUNT(@@GLOBAL.have_csv)
1
1 Expected
'#---------------------BS_STVARS_008_02----------------------#'
SET @@GLOBAL.have_csv=1;
ERROR HY000: Variable 'have_csv' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_csv);
COUNT(@@GLOBAL.have_csv)
1
1 Expected
'#---------------------BS_STVARS_008_03----------------------#'
SELECT @@GLOBAL.have_csv = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_csv';
@@GLOBAL.have_csv = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_csv);
COUNT(@@GLOBAL.have_csv)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_csv';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_008_04----------------------#'
SELECT @@have_csv = @@GLOBAL.have_csv;
@@have_csv = @@GLOBAL.have_csv
1
1 Expected
'#---------------------BS_STVARS_008_05----------------------#'
SELECT COUNT(@@have_csv);
COUNT(@@have_csv)
1
1 Expected
SELECT COUNT(@@local.have_csv);
ERROR HY000: Variable 'have_csv' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_csv);
ERROR HY000: Variable 'have_csv' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_csv);
COUNT(@@GLOBAL.have_csv)
1
1 Expected
SELECT have_csv = @@SESSION.have_csv;
ERROR 42S22: Unknown column 'have_csv' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_009_01----------------------#'
SELECT COUNT(@@GLOBAL.have_dynamic_loading);
COUNT(@@GLOBAL.have_dynamic_loading)
1
1 Expected
'#---------------------BS_STVARS_009_02----------------------#'
SET @@GLOBAL.have_dynamic_loading=1;
ERROR HY000: Variable 'have_dynamic_loading' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_dynamic_loading);
COUNT(@@GLOBAL.have_dynamic_loading)
1
1 Expected
'#---------------------BS_STVARS_009_03----------------------#'
SELECT @@GLOBAL.have_dynamic_loading = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_dynamic_loading';
@@GLOBAL.have_dynamic_loading = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_dynamic_loading);
COUNT(@@GLOBAL.have_dynamic_loading)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_dynamic_loading';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_009_04----------------------#'
SELECT @@have_dynamic_loading = @@GLOBAL.have_dynamic_loading;
@@have_dynamic_loading = @@GLOBAL.have_dynamic_loading
1
1 Expected
'#---------------------BS_STVARS_009_05----------------------#'
SELECT COUNT(@@have_dynamic_loading);
COUNT(@@have_dynamic_loading)
1
1 Expected
SELECT COUNT(@@local.have_dynamic_loading);
ERROR HY000: Variable 'have_dynamic_loading' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_dynamic_loading);
ERROR HY000: Variable 'have_dynamic_loading' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_dynamic_loading);
COUNT(@@GLOBAL.have_dynamic_loading)
1
1 Expected
SELECT have_dynamic_loading = @@SESSION.have_dynamic_loading;
ERROR 42S22: Unknown column 'have_dynamic_loading' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_010_01----------------------#'
SELECT COUNT(@@GLOBAL.have_geometry);
COUNT(@@GLOBAL.have_geometry)
1
1 Expected
'#---------------------BS_STVARS_010_02----------------------#'
SET @@GLOBAL.have_geometry=1;
ERROR HY000: Variable 'have_geometry' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_geometry);
COUNT(@@GLOBAL.have_geometry)
1
1 Expected
'#---------------------BS_STVARS_010_03----------------------#'
SELECT @@GLOBAL.have_geometry = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_geometry';
@@GLOBAL.have_geometry = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_geometry);
COUNT(@@GLOBAL.have_geometry)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_geometry';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_010_04----------------------#'
SELECT @@have_geometry = @@GLOBAL.have_geometry;
@@have_geometry = @@GLOBAL.have_geometry
1
1 Expected
'#---------------------BS_STVARS_010_05----------------------#'
SELECT COUNT(@@have_geometry);
COUNT(@@have_geometry)
1
1 Expected
SELECT COUNT(@@local.have_geometry);
ERROR HY000: Variable 'have_geometry' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_geometry);
ERROR HY000: Variable 'have_geometry' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_geometry);
COUNT(@@GLOBAL.have_geometry)
1
1 Expected
SELECT have_geometry = @@SESSION.have_geometry;
ERROR 42S22: Unknown column 'have_geometry' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_011_01----------------------#'
SELECT COUNT(@@GLOBAL.have_innodb);
COUNT(@@GLOBAL.have_innodb)
1
1 Expected
'#---------------------BS_STVARS_011_02----------------------#'
SET @@GLOBAL.have_innodb=1;
ERROR HY000: Variable 'have_innodb' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_innodb);
COUNT(@@GLOBAL.have_innodb)
1
1 Expected
'#---------------------BS_STVARS_011_03----------------------#'
SELECT @@GLOBAL.have_innodb = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_innodb';
@@GLOBAL.have_innodb = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_innodb);
COUNT(@@GLOBAL.have_innodb)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_innodb';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_011_04----------------------#'
SELECT @@have_innodb = @@GLOBAL.have_innodb;
@@have_innodb = @@GLOBAL.have_innodb
1
1 Expected
'#---------------------BS_STVARS_011_05----------------------#'
SELECT COUNT(@@have_innodb);
COUNT(@@have_innodb)
1
1 Expected
SELECT COUNT(@@local.have_innodb);
ERROR HY000: Variable 'have_innodb' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_innodb);
ERROR HY000: Variable 'have_innodb' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_innodb);
COUNT(@@GLOBAL.have_innodb)
1
1 Expected
SELECT have_innodb = @@SESSION.have_innodb;
ERROR 42S22: Unknown column 'have_innodb' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_012_01----------------------#'
SELECT COUNT(@@GLOBAL.have_ndbcluster);
COUNT(@@GLOBAL.have_ndbcluster)
1
1 Expected
'#---------------------BS_STVARS_012_02----------------------#'
SET @@GLOBAL.have_ndbcluster=1;
ERROR HY000: Variable 'have_ndbcluster' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_ndbcluster);
COUNT(@@GLOBAL.have_ndbcluster)
1
1 Expected
'#---------------------BS_STVARS_012_03----------------------#'
SELECT @@GLOBAL.have_ndbcluster = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_ndbcluster';
@@GLOBAL.have_ndbcluster = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_ndbcluster);
COUNT(@@GLOBAL.have_ndbcluster)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_ndbcluster';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_012_04----------------------#'
SELECT @@have_ndbcluster = @@GLOBAL.have_ndbcluster;
@@have_ndbcluster = @@GLOBAL.have_ndbcluster
1
1 Expected
'#---------------------BS_STVARS_012_05----------------------#'
SELECT COUNT(@@have_ndbcluster);
COUNT(@@have_ndbcluster)
1
1 Expected
SELECT COUNT(@@local.have_ndbcluster);
ERROR HY000: Variable 'have_ndbcluster' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_ndbcluster);
ERROR HY000: Variable 'have_ndbcluster' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_ndbcluster);
COUNT(@@GLOBAL.have_ndbcluster)
1
1 Expected
SELECT have_ndbcluster = @@SESSION.have_ndbcluster;
ERROR 42S22: Unknown column 'have_ndbcluster' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_013_01----------------------#'
SELECT COUNT(@@GLOBAL.have_openssl);
COUNT(@@GLOBAL.have_openssl)
1
1 Expected
'#---------------------BS_STVARS_013_02----------------------#'
SET @@GLOBAL.have_openssl=1;
ERROR HY000: Variable 'have_openssl' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_openssl);
COUNT(@@GLOBAL.have_openssl)
1
1 Expected
'#---------------------BS_STVARS_013_03----------------------#'
SELECT @@GLOBAL.have_openssl = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_openssl';
@@GLOBAL.have_openssl = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_openssl);
COUNT(@@GLOBAL.have_openssl)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_openssl';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_013_04----------------------#'
SELECT @@have_openssl = @@GLOBAL.have_openssl;
@@have_openssl = @@GLOBAL.have_openssl
1
1 Expected
'#---------------------BS_STVARS_013_05----------------------#'
SELECT COUNT(@@have_openssl);
COUNT(@@have_openssl)
1
1 Expected
SELECT COUNT(@@local.have_openssl);
ERROR HY000: Variable 'have_openssl' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_openssl);
ERROR HY000: Variable 'have_openssl' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_openssl);
COUNT(@@GLOBAL.have_openssl)
1
1 Expected
SELECT have_openssl = @@SESSION.have_openssl;
ERROR 42S22: Unknown column 'have_openssl' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_014_01----------------------#'
SELECT COUNT(@@GLOBAL.have_partitioning);
COUNT(@@GLOBAL.have_partitioning)
1
1 Expected
'#---------------------BS_STVARS_014_02----------------------#'
SET @@GLOBAL.have_partitioning=1;
ERROR HY000: Variable 'have_partitioning' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_partitioning);
COUNT(@@GLOBAL.have_partitioning)
1
1 Expected
'#---------------------BS_STVARS_014_03----------------------#'
SELECT @@GLOBAL.have_partitioning = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_partitioning';
@@GLOBAL.have_partitioning = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_partitioning);
COUNT(@@GLOBAL.have_partitioning)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_partitioning';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_014_04----------------------#'
SELECT @@have_partitioning = @@GLOBAL.have_partitioning;
@@have_partitioning = @@GLOBAL.have_partitioning
1
1 Expected
'#---------------------BS_STVARS_014_05----------------------#'
SELECT COUNT(@@have_partitioning);
COUNT(@@have_partitioning)
1
1 Expected
SELECT COUNT(@@local.have_partitioning);
ERROR HY000: Variable 'have_partitioning' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_partitioning);
ERROR HY000: Variable 'have_partitioning' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_partitioning);
COUNT(@@GLOBAL.have_partitioning)
1
1 Expected
SELECT have_partitioning = @@SESSION.have_partitioning;
ERROR 42S22: Unknown column 'have_partitioning' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_015_01----------------------#'
SELECT COUNT(@@GLOBAL.have_query_cache);
COUNT(@@GLOBAL.have_query_cache)
1
1 Expected
'#---------------------BS_STVARS_015_02----------------------#'
SET @@GLOBAL.have_query_cache=1;
ERROR HY000: Variable 'have_query_cache' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_query_cache);
COUNT(@@GLOBAL.have_query_cache)
1
1 Expected
'#---------------------BS_STVARS_015_03----------------------#'
SELECT @@GLOBAL.have_query_cache = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_query_cache';
@@GLOBAL.have_query_cache = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_query_cache);
COUNT(@@GLOBAL.have_query_cache)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_query_cache';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_015_04----------------------#'
SELECT @@have_query_cache = @@GLOBAL.have_query_cache;
@@have_query_cache = @@GLOBAL.have_query_cache
1
1 Expected
'#---------------------BS_STVARS_015_05----------------------#'
SELECT COUNT(@@have_query_cache);
COUNT(@@have_query_cache)
1
1 Expected
SELECT COUNT(@@local.have_query_cache);
ERROR HY000: Variable 'have_query_cache' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_query_cache);
ERROR HY000: Variable 'have_query_cache' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_query_cache);
COUNT(@@GLOBAL.have_query_cache)
1
1 Expected
SELECT have_query_cache = @@SESSION.have_query_cache;
ERROR 42S22: Unknown column 'have_query_cache' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_016_01----------------------#'
SELECT COUNT(@@GLOBAL.have_rtree_keys);
COUNT(@@GLOBAL.have_rtree_keys)
1
1 Expected
'#---------------------BS_STVARS_016_02----------------------#'
SET @@GLOBAL.have_rtree_keys=1;
ERROR HY000: Variable 'have_rtree_keys' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_rtree_keys);
COUNT(@@GLOBAL.have_rtree_keys)
1
1 Expected
'#---------------------BS_STVARS_016_03----------------------#'
SELECT @@GLOBAL.have_rtree_keys = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_rtree_keys';
@@GLOBAL.have_rtree_keys = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_rtree_keys);
COUNT(@@GLOBAL.have_rtree_keys)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_rtree_keys';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_016_04----------------------#'
SELECT @@have_rtree_keys = @@GLOBAL.have_rtree_keys;
@@have_rtree_keys = @@GLOBAL.have_rtree_keys
1
1 Expected
'#---------------------BS_STVARS_016_05----------------------#'
SELECT COUNT(@@have_rtree_keys);
COUNT(@@have_rtree_keys)
1
1 Expected
SELECT COUNT(@@local.have_rtree_keys);
ERROR HY000: Variable 'have_rtree_keys' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_rtree_keys);
ERROR HY000: Variable 'have_rtree_keys' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_rtree_keys);
COUNT(@@GLOBAL.have_rtree_keys)
1
1 Expected
SELECT have_rtree_keys = @@SESSION.have_rtree_keys;
ERROR 42S22: Unknown column 'have_rtree_keys' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_017_01----------------------#'
SELECT COUNT(@@GLOBAL.have_ssl);
COUNT(@@GLOBAL.have_ssl)
1
1 Expected
'#---------------------BS_STVARS_017_02----------------------#'
SET @@GLOBAL.have_ssl=1;
ERROR HY000: Variable 'have_ssl' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_ssl);
COUNT(@@GLOBAL.have_ssl)
1
1 Expected
'#---------------------BS_STVARS_017_03----------------------#'
SELECT @@GLOBAL.have_ssl = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_ssl';
@@GLOBAL.have_ssl = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_ssl);
COUNT(@@GLOBAL.have_ssl)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_ssl';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_017_04----------------------#'
SELECT @@have_ssl = @@GLOBAL.have_ssl;
@@have_ssl = @@GLOBAL.have_ssl
1
1 Expected
'#---------------------BS_STVARS_017_05----------------------#'
SELECT COUNT(@@have_ssl);
COUNT(@@have_ssl)
1
1 Expected
SELECT COUNT(@@local.have_ssl);
ERROR HY000: Variable 'have_ssl' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_ssl);
ERROR HY000: Variable 'have_ssl' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_ssl);
COUNT(@@GLOBAL.have_ssl)
1
1 Expected
SELECT have_ssl = @@SESSION.have_ssl;
ERROR 42S22: Unknown column 'have_ssl' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_018_01----------------------#'
SELECT COUNT(@@GLOBAL.have_symlink);
COUNT(@@GLOBAL.have_symlink)
1
1 Expected
'#---------------------BS_STVARS_018_02----------------------#'
SET @@GLOBAL.have_symlink=1;
ERROR HY000: Variable 'have_symlink' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.have_symlink);
COUNT(@@GLOBAL.have_symlink)
1
1 Expected
'#---------------------BS_STVARS_018_03----------------------#'
SELECT @@GLOBAL.have_symlink = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_symlink';
@@GLOBAL.have_symlink = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.have_symlink);
COUNT(@@GLOBAL.have_symlink)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='have_symlink';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_018_04----------------------#'
SELECT @@have_symlink = @@GLOBAL.have_symlink;
@@have_symlink = @@GLOBAL.have_symlink
1
1 Expected
'#---------------------BS_STVARS_018_05----------------------#'
SELECT COUNT(@@have_symlink);
COUNT(@@have_symlink)
1
1 Expected
SELECT COUNT(@@local.have_symlink);
ERROR HY000: Variable 'have_symlink' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.have_symlink);
ERROR HY000: Variable 'have_symlink' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.have_symlink);
COUNT(@@GLOBAL.have_symlink)
1
1 Expected
SELECT have_symlink = @@SESSION.have_symlink;
ERROR 42S22: Unknown column 'have_symlink' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_019_01----------------------#'
SELECT COUNT(@@GLOBAL.hostname);
COUNT(@@GLOBAL.hostname)
1
1 Expected
'#---------------------BS_STVARS_019_02----------------------#'
SET @@GLOBAL.hostname=1;
ERROR HY000: Variable 'hostname' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.hostname);
COUNT(@@GLOBAL.hostname)
1
1 Expected
'#---------------------BS_STVARS_019_03----------------------#'
SELECT @@GLOBAL.hostname = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='hostname';
@@GLOBAL.hostname = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.hostname);
COUNT(@@GLOBAL.hostname)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='hostname';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_019_04----------------------#'
SELECT @@hostname = @@GLOBAL.hostname;
@@hostname = @@GLOBAL.hostname
1
1 Expected
'#---------------------BS_STVARS_019_05----------------------#'
SELECT COUNT(@@hostname);
COUNT(@@hostname)
1
1 Expected
SELECT COUNT(@@local.hostname);
ERROR HY000: Variable 'hostname' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.hostname);
ERROR HY000: Variable 'hostname' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.hostname);
COUNT(@@GLOBAL.hostname)
1
1 Expected
SELECT hostname = @@SESSION.hostname;
ERROR 42S22: Unknown column 'hostname' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,121 @@
SET @start_value = @@session.identity;
SELECT @start_value;
@start_value
0
'#--------------------FN_DYNVARS_035_01------------------------#'
SET @@session.identity = 99;
'Variable is giving error on assigning Default value';
SELECT @@session.identity;
@@session.identity
99
'#---------------------FN_DYNVARS_035_02-------------------------#'
SET @@session.identity = @start_value;
SELECT @@session.identity = 0;
@@session.identity = 0
1
'#--------------------FN_DYNVARS_035_03------------------------#'
SET @@session.identity = 0;
SELECT @@session.identity;
@@session.identity
0
SET @@session.identity = 1099;
SELECT @@session.identity;
@@session.identity
1099
SET @@session.identity = 1800;
SELECT @@session.identity;
@@session.identity
1800
SET @@session.identity = 65535;
SELECT @@session.identity;
@@session.identity
65535
'#--------------------FN_DYNVARS_035_04-------------------------#'
SET @@session.identity = -1;
SELECT @@session.identity;
@@session.identity
-1
SET @@session.identity = 100000000000;
SELECT @@session.identity;
@@session.identity
100000000000
SET @@session.identity = 10000.01;
ERROR 42000: Incorrect argument type to variable 'identity'
SELECT @@session.identity;
@@session.identity
100000000000
SET @@session.identity = -1024;
SELECT @@session.identity;
@@session.identity
-1024
SET @@session.identity = 42949672950;
SELECT @@session.identity;
@@session.identity
42949672950
'Bug # 34837: Errors are not coming on assigning invalid values to variable'
SET @@session.identity = ON;
ERROR 42000: Incorrect argument type to variable 'identity'
SELECT @@session.identity;
@@session.identity
42949672950
SET @@session.identity = 'test';
ERROR 42000: Incorrect argument type to variable 'identity'
SELECT @@session.identity;
@@session.identity
42949672950
'#-------------------FN_DYNVARS_035_05----------------------------#'
SET @@global.identity = 0;
ERROR HY000: Variable 'identity' is a SESSION variable and can't be used with SET GLOBAL
SELECT @@global.identity;
ERROR HY000: Variable 'identity' is a SESSION variable
'#----------------------FN_DYNVARS_035_06------------------------#'
SELECT @@global.identity = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='identity';
ERROR HY000: Variable 'identity' is a SESSION variable
SELECT @@session.identity = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='identity';
@@session.identity = VARIABLE_VALUE
1
'#-------------------FN_DYNVARS_035_07----------------------------#'
SET @@global.identity = 0;
ERROR HY000: Variable 'identity' is a SESSION variable and can't be used with SET GLOBAL
SELECT @@global.identity;
ERROR HY000: Variable 'identity' is a SESSION variable
'#---------------------FN_DYNVARS_035_08----------------------#'
SET @@session.identity = TRUE;
SELECT @@session.identity;
@@session.identity
1
SET @@session.identity = FALSE;
SELECT @@session.identity;
@@session.identity
0
'#---------------------FN_DYNVARS_035_09----------------------#'
SET @@session.identity = 1;
SELECT @@identity = @@session.identity;
@@identity = @@session.identity
1
SELECT @@session.identity = @@local.identity;
@@session.identity = @@local.identity
1
'#---------------------FN_DYNVARS_035_10----------------------#'
SET identity = 1;
SELECT @@identity;
@@identity
1
SET local.identity = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identity = 1' at line 1
SELECT local.identity;
ERROR 42S02: Unknown table 'local' in field list
SET session.identity = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identity = 1' at line 1
SELECT session.identity;
ERROR 42S02: Unknown table 'session' in field list
SELECT identity = @@session.identity;
ERROR 42S22: Unknown column 'identity' in 'field list'
SET @@session.identity = @start_value;
SELECT @@session.identity;
@@session.identity
0

View file

@ -0,0 +1,105 @@
drop table if exists t1;
drop table if exists t2;
## Creating new table t1 ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30)
) ENGINE = INNODB;
## Creating another new table t2 ##
CREATE TABLE t2
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
name VARCHAR(30)
) ENGINE = INNODB;
'#--------------------FN_DYNVARS_035_01-------------------------#'
## It should be zero ##
SELECT @@identity = 0;
@@identity = 0
1
## Creating and connecting with new connection test_con1 ##
SET @@autocommit = 0;
## Inserting rows in table t1 ##
INSERT into t1(name) values('Record_1');
INSERT into t1(name) values('Record_2');
INSERT into t1(name) values('Record_3');
## Verifying total values in t1 ##
SELECT @@identity from t1;
@@identity
3
3
3
## Now inserting some data in table t2 ##
INSERT into t2(name) values('Record_1');
## Verifying total values in t2 ##
SELECT @@identity from t2;
@@identity
1
'#--------------------FN_DYNVARS_035_02-------------------------#'
## Creating and connecting with new connection test_con2 ##
SELECT * from t1;
id name
## Verifying total values in t1 ##
SELECT @@identity from t1;
@@identity
## Verifying total values in t2 ##
SELECT @@identity from t2;
@@identity
## Inserting some more records in table t1 ##
INSERT into t1(name) values('Record_1_1');
INSERT into t1(name) values('Record_1_2');
## Verifying total values in t1 ##
SELECT @@identity from t1;
@@identity
5
5
## Inserting row in table t2 ##
INSERT into t2(name) values('Record_1_3');
## Verifying total values in t2 ##
SELECT @@identity from t2;
@@identity
2
'#--------------------FN_DYNVARS_035_03-------------------------#'
## Switching to connection test_con1 ##
## Commiting rows added in test_con1 ##
COMMIT;
## Verifying records in both tables ##
SELECT * from t1;
id name
1 Record_1
2 Record_2
3 Record_3
4 Record_1_1
5 Record_1_2
SELECT * from t2;
id name
1 Record_1
2 Record_1_3
## Verifying total values in t1 after commiting data ##
SELECT @@identity from t1;
@@identity
1
1
1
1
1
## Verifying total values in t2 after commiting data ##
SELECT @@identity from t2;
@@identity
1
1
INSERT into t1(name) values('Record_4');
## Now verifying value of variable after inserting 1 row in this connection ##
SELECT @@identity from t1;
@@identity
6
6
6
6
6
6
## Dropping tables t1 & t2 ##
drop table t1, t2;
## Disconnecting both the connections ##

View file

@ -0,0 +1,98 @@
SET @global_start_value = @@global.init_connect;
SELECT @global_start_value AS INIT_VALUE;
INIT_VALUE
'#--------------------FN_DYNVARS_036_01------------------#'
SELECT init_connect;
ERROR 42S22: Unknown column 'init_connect' in 'field list'
SELECT @@init_connect;
@@init_connect
SET @@global.init_connect='SET autocomit=0';
SELECT @@global.init_connect;
@@global.init_connect
SET autocomit=0
SET global init_connect='SET autocomit=0';
SELECT global init_connect;
ERROR 42S22: Unknown column 'global' in 'field list'
SELECT @@global init_connect;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'init_connect' at line 1
'#--------------------FN_DYNVARS_036_02-------------------------#'
SET @@global.init_connect = 'SET join_buffer_size=8200';
SET @@global.init_connect = DEFAULT;
SELECT @@global.init_connect;
@@global.init_connect
'#--------------------FN_DYNVARS_036_03-------------------------#'
SET @@session.init_connect = '';
ERROR HY000: Variable 'init_connect' is a GLOBAL variable and should be set with SET GLOBAL
SET @@init_connect = '';
ERROR HY000: Variable 'init_connect' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.init_connect;
ERROR HY000: Variable 'init_connect' is a GLOBAL variable
SELECT @@local.init_connect;
ERROR HY000: Variable 'init_connect' is a GLOBAL variable
'#--------------------FN_DYNVARS_036_04-------------------------#'
SET @@global.init_connect="";
SELECT @@global.init_connect;
@@global.init_connect
SET @@global.init_connect='SELECT 1,"abc"';
SELECT @@global.init_connect;
@@global.init_connect
SELECT 1,"abc"
SET @@global.init_connect='SET @yoursql="mysql"';
SELECT @@global.init_connect;
@@global.init_connect
SET @yoursql="mysql"
SET @@global.init_connect="SET autocomit=0;REVOKE ALL ON INFORMATION_SCHEMA.*";
SELECT @@global.init_connect;
@@global.init_connect
SET autocomit=0;REVOKE ALL ON INFORMATION_SCHEMA.*
SET @@global.init_connect='SHOW VARIABLES';
SELECT @@global.init_connect;
@@global.init_connect
SHOW VARIABLES
SET @@global.init_connect = NULL;
SELECT @@global.init_connect;
@@global.init_connect
SET @@global.init_connect='abc 123 +-*/';
SELECT @@global.init_connect;
@@global.init_connect
abc 123 +-*/
SET @@global.init_connect=this_will_give_syntax_error;
SELECT @@global.init_connect;
@@global.init_connect
this_will_give_syntax_error
SET @@global.init_connect = init_slave;
SELECT @@global.init_connect;
@@global.init_connect
init_slave
'#--------------------FN_DYNVARS_036_05-------------------------#'
SET @@global.init_connect = true;
ERROR 42000: Incorrect argument type to variable 'init_connect'
SET @@global.init_connect = false;
ERROR 42000: Incorrect argument type to variable 'init_connect'
SET @@global.init_connect = 1.1;
ERROR 42000: Incorrect argument type to variable 'init_connect'
SET @@global.init_connect = 0;
ERROR 42000: Incorrect argument type to variable 'init_connect'
SET @@global.init_connect = 1;
ERROR 42000: Incorrect argument type to variable 'init_connect'
SET @@global.init_connect = -1;
ERROR 42000: Incorrect argument type to variable 'init_connect'
SET @@global.init_connect = ON;
SELECT @@global.init_connect;
@@global.init_connect
ON
'#--------------------FN_DYNVARS_036_06-------------------------#'
SELECT @@global.init_connect = (SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='init_connect') AS res;
res
1
SET @@global.init_connect = @global_start_value;
SELECT @@global.init_connect;
@@global.init_connect

View file

@ -0,0 +1,98 @@
SET @global_start_value = @@global.init_slave;
SELECT @global_start_value AS INIT_VALUE;
INIT_VALUE
'#--------------------FN_DYNVARS_037_01------------------#'
SELECT init_slave;
ERROR 42S22: Unknown column 'init_slave' in 'field list'
SELECT @@init_slave;
@@init_slave
SET @@global.init_slave='SET autocomit=0';
SELECT @@global.init_slave;
@@global.init_slave
SET autocomit=0
SET global init_slave='SET autocomit=0';
SELECT global init_slave;
ERROR 42S22: Unknown column 'global' in 'field list'
SELECT @@global init_slave;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'init_slave' at line 1
'#--------------------FN_DYNVARS_037_02-------------------------#'
SET @@global.init_slave = 'SET join_buffer_size=8200';
SET @@global.init_slave = DEFAULT;
SELECT @@global.init_slave;
@@global.init_slave
'#--------------------FN_DYNVARS_037_03-------------------------#'
SET @@session.init_slave = '';
ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
SET @@init_slave = "";
ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.init_slave;
ERROR HY000: Variable 'init_slave' is a GLOBAL variable
SELECT @@local.init_slave;
ERROR HY000: Variable 'init_slave' is a GLOBAL variable
'#--------------------FN_DYNVARS_037_04-------------------------#'
SET @@global.init_slave="";
SELECT @@global.init_slave;
@@global.init_slave
SET @@global.init_slave='SELECT 1,"abc"';
SELECT @@global.init_slave;
@@global.init_slave
SELECT 1,"abc"
SET @@global.init_slave='SET @a="b"';
SELECT @@global.init_slave;
@@global.init_slave
SET @a="b"
SET @@global.init_slave="SET autocomit=1;REVOKE ALL ON INFORMATION_SCHEMA.*";
SELECT @@global.init_slave;
@@global.init_slave
SET autocomit=1;REVOKE ALL ON INFORMATION_SCHEMA.*
SET @@global.init_slave='SHOW VARIABLES';
SELECT @@global.init_slave;
@@global.init_slave
SHOW VARIABLES
SET @@global.init_slave = NULL;
SELECT @@global.init_slave;
@@global.init_slave
SET @@global.init_slave='abc 123 +-*/';
SELECT @@global.init_slave;
@@global.init_slave
abc 123 +-*/
SET @@global.init_slave=this_will_give_syntax_error;
SELECT @@global.init_slave;
@@global.init_slave
this_will_give_syntax_error
SET @@global.init_slave = init_slave;
SELECT @@global.init_slave;
@@global.init_slave
init_slave
'#--------------------FN_DYNVARS_037_05-------------------------#'
SET @@global.init_slave = true;
ERROR 42000: Incorrect argument type to variable 'init_slave'
SET @@global.init_slave = false;
ERROR 42000: Incorrect argument type to variable 'init_slave'
SET @@global.init_slave = 1.1;
ERROR 42000: Incorrect argument type to variable 'init_slave'
SET @@global.init_slave = 0;
ERROR 42000: Incorrect argument type to variable 'init_slave'
SET @@global.init_slave = 1;
ERROR 42000: Incorrect argument type to variable 'init_slave'
SET @@global.init_slave = -1;
ERROR 42000: Incorrect argument type to variable 'init_slave'
SET @@global.init_slave = ON;
SELECT @@global.init_slave;
@@global.init_slave
ON
'#--------------------FN_DYNVARS_037_06-------------------------#'
SELECT @@global.init_slave = (SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='init_slave') AS res;
res
1
SET @@global.init_slave = @global_start_value;
SELECT @@global.init_slave;
@@global.init_slave

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_020_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_additional_mem_pool_size);
COUNT(@@GLOBAL.innodb_additional_mem_pool_size)
1
1 Expected
'#---------------------BS_STVARS_020_02----------------------#'
SET @@GLOBAL.innodb_additional_mem_pool_size=1;
ERROR HY000: Variable 'innodb_additional_mem_pool_size' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_additional_mem_pool_size);
COUNT(@@GLOBAL.innodb_additional_mem_pool_size)
1
1 Expected
'#---------------------BS_STVARS_020_03----------------------#'
SELECT @@GLOBAL.innodb_additional_mem_pool_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_additional_mem_pool_size';
@@GLOBAL.innodb_additional_mem_pool_size = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_additional_mem_pool_size);
COUNT(@@GLOBAL.innodb_additional_mem_pool_size)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_additional_mem_pool_size';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_020_04----------------------#'
SELECT @@innodb_additional_mem_pool_size = @@GLOBAL.innodb_additional_mem_pool_size;
@@innodb_additional_mem_pool_size = @@GLOBAL.innodb_additional_mem_pool_size
1
1 Expected
'#---------------------BS_STVARS_020_05----------------------#'
SELECT COUNT(@@innodb_additional_mem_pool_size);
COUNT(@@innodb_additional_mem_pool_size)
1
1 Expected
SELECT COUNT(@@local.innodb_additional_mem_pool_size);
ERROR HY000: Variable 'innodb_additional_mem_pool_size' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_additional_mem_pool_size);
ERROR HY000: Variable 'innodb_additional_mem_pool_size' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_additional_mem_pool_size);
COUNT(@@GLOBAL.innodb_additional_mem_pool_size)
1
1 Expected
SELECT innodb_additional_mem_pool_size = @@SESSION.innodb_additional_mem_pool_size;
ERROR 42S22: Unknown column 'innodb_additional_mem_pool_size' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,94 @@
SET @global_start_value = @@global.innodb_autoextend_increment ;
SELECT @global_start_value;
@global_start_value
8
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_autoextend_increment = 0;
Warnings:
Warning 1292 Truncated incorrect autoextend_increment value: '0'
SET @@global.innodb_autoextend_increment = DEFAULT;
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
8
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_autoextend_increment = 1;
ERROR HY000: Variable 'innodb_autoextend_increment' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_autoextend_increment ;
@@innodb_autoextend_increment
8
SELECT local.innodb_autoextend_increment ;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_autoextend_increment = 0;
Warnings:
Warning 1292 Truncated incorrect autoextend_increment value: '0'
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
1
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_autoextend_increment = 1;
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
1
SET @@global.innodb_autoextend_increment = 1000;
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
1000
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_autoextend_increment = -1;
Warnings:
Warning 1292 Truncated incorrect autoextend_increment value: '18446744073709551615'
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
1000
SET @@global.innodb_autoextend_increment = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_autoextend_increment'
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
1000
SET @@global.innodb_autoextend_increment = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_autoextend_increment'
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
1000
SET @@global.innodb_autoextend_increment = 1001;
Warnings:
Warning 1292 Truncated incorrect autoextend_increment value: '1001'
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
1000
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_autoextend_increment = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_autoextend_increment ';
@@global.innodb_autoextend_increment = VARIABLE_VALUE
1
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
1000
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_autoextend_increment ';
VARIABLE_VALUE
1000
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_autoextend_increment = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_autoextend_increment'
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
1000
SET @@global.innodb_autoextend_increment = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_autoextend_increment'
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
1000
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_autoextend_increment = TRUE;
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
1
SET @@global.innodb_autoextend_increment = FALSE;
Warnings:
Warning 1292 Truncated incorrect autoextend_increment value: '0'
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
1

View file

@ -0,0 +1,35 @@
SET @global_start_value = @@global.innodb_autoinc_lock_mode;
SELECT @global_start_value;
@global_start_value
1
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_autoinc_lock_mode = 0;
ERROR HY000: Variable 'innodb_autoinc_lock_mode' is a read only variable
SET @@global.innodb_autoinc_lock_mode = DEFAULT;
ERROR HY000: Variable 'innodb_autoinc_lock_mode' is a read only variable
SELECT @@global.innodb_autoinc_lock_mode;
@@global.innodb_autoinc_lock_mode
1
'#---------------------FN_DYNVARS_046_02-------------------------#'
SELECT @@innodb_autoinc_lock_mode;
@@innodb_autoinc_lock_mode
1
SELECT local.innodb_autoinc_lock_mode;
ERROR 42S02: Unknown table 'local' in field list
SELECT @@global.innodb_autoinc_lock_mode;
@@global.innodb_autoinc_lock_mode
1
'#----------------------FN_DYNVARS_046_03------------------------#'
SELECT @@global.innodb_autoinc_lock_mode = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_autoinc_lock_mode';
@@global.innodb_autoinc_lock_mode = VARIABLE_VALUE
1
SELECT @@global.innodb_autoinc_lock_mode;
@@global.innodb_autoinc_lock_mode
1
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_autoinc_lock_mode';
VARIABLE_VALUE
1

View file

@ -0,0 +1,22 @@
'#--------------------FN_DYNVARS_039_01-------------------------#'
SET global innodb_autoinc_lock_mode = 1;
ERROR HY000: Variable 'innodb_autoinc_lock_mode' is a read only variable
'--innodb_autoinc_lock_mode is 1 (consecutive)--'
SELECT @@global.innodb_autoinc_lock_mode;
@@global.innodb_autoinc_lock_mode
1
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(
a INT AUTO_INCREMENT PRIMARY KEY,
b CHAR
)ENGINE=INNODB, AUTO_INCREMENT=100;
INSERT INTO t1 (a,b) VALUES (5,'a'), (NULL,'b'), (1,'c'), (NULL,'d');
INSERT INTO t1 (a,b) VALUES (NULL,'e');
'the new auto incremented value should be 104'
SELECT * from t1;
a b
1 c
5 a
100 b
101 d
104 e

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_022_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_size);
COUNT(@@GLOBAL.innodb_buffer_pool_size)
1
1 Expected
'#---------------------BS_STVARS_022_02----------------------#'
SET @@GLOBAL.innodb_buffer_pool_size=1;
ERROR HY000: Variable 'innodb_buffer_pool_size' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_size);
COUNT(@@GLOBAL.innodb_buffer_pool_size)
1
1 Expected
'#---------------------BS_STVARS_022_03----------------------#'
SELECT @@GLOBAL.innodb_buffer_pool_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_buffer_pool_size';
@@GLOBAL.innodb_buffer_pool_size = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_size);
COUNT(@@GLOBAL.innodb_buffer_pool_size)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_buffer_pool_size';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_022_04----------------------#'
SELECT @@innodb_buffer_pool_size = @@GLOBAL.innodb_buffer_pool_size;
@@innodb_buffer_pool_size = @@GLOBAL.innodb_buffer_pool_size
1
1 Expected
'#---------------------BS_STVARS_022_05----------------------#'
SELECT COUNT(@@innodb_buffer_pool_size);
COUNT(@@innodb_buffer_pool_size)
1
1 Expected
SELECT COUNT(@@local.innodb_buffer_pool_size);
ERROR HY000: Variable 'innodb_buffer_pool_size' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_buffer_pool_size);
ERROR HY000: Variable 'innodb_buffer_pool_size' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_size);
COUNT(@@GLOBAL.innodb_buffer_pool_size)
1
1 Expected
SELECT innodb_buffer_pool_size = @@SESSION.innodb_buffer_pool_size;
ERROR 42S22: Unknown column 'innodb_buffer_pool_size' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_023_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_checksums);
COUNT(@@GLOBAL.innodb_checksums)
1
1 Expected
'#---------------------BS_STVARS_023_02----------------------#'
SET @@GLOBAL.innodb_checksums=1;
ERROR HY000: Variable 'innodb_checksums' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_checksums);
COUNT(@@GLOBAL.innodb_checksums)
1
1 Expected
'#---------------------BS_STVARS_023_03----------------------#'
SELECT @@GLOBAL.innodb_checksums = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_checksums';
@@GLOBAL.innodb_checksums = VARIABLE_VALUE
0
1 Expected
SELECT COUNT(@@GLOBAL.innodb_checksums);
COUNT(@@GLOBAL.innodb_checksums)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_checksums';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_023_04----------------------#'
SELECT @@innodb_checksums = @@GLOBAL.innodb_checksums;
@@innodb_checksums = @@GLOBAL.innodb_checksums
1
1 Expected
'#---------------------BS_STVARS_023_05----------------------#'
SELECT COUNT(@@innodb_checksums);
COUNT(@@innodb_checksums)
1
1 Expected
SELECT COUNT(@@local.innodb_checksums);
ERROR HY000: Variable 'innodb_checksums' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_checksums);
ERROR HY000: Variable 'innodb_checksums' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_checksums);
COUNT(@@GLOBAL.innodb_checksums)
1
1 Expected
SELECT innodb_checksums = @@SESSION.innodb_checksums;
ERROR 42S22: Unknown column 'innodb_checksums' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,96 @@
SET @global_start_value = @@global.innodb_commit_concurrency;
SELECT @global_start_value;
@global_start_value
0
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_commit_concurrency = 0;
SET @@global.innodb_commit_concurrency = DEFAULT;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_commit_concurrency = 1;
ERROR HY000: Variable 'innodb_commit_concurrency' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
SELECT local.innodb_commit_concurrency;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_commit_concurrency = 0;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_commit_concurrency = 0;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
SET @@global.innodb_commit_concurrency = 1;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1
SET @@global.innodb_commit_concurrency = 1000;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_commit_concurrency = -1;
Warnings:
Warning 1292 Truncated incorrect commit_concurrency value: '18446744073709551615'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
SET @@global.innodb_commit_concurrency = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
SET @@global.innodb_commit_concurrency = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
SET @@global.innodb_commit_concurrency = 1001;
Warnings:
Warning 1292 Truncated incorrect commit_concurrency value: '1001'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_commit_concurrency =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_commit_concurrency';
@@global.innodb_commit_concurrency =
VARIABLE_VALUE
1
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_commit_concurrency';
VARIABLE_VALUE
1000
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_commit_concurrency = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
SET @@global.innodb_commit_concurrency = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1000
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_commit_concurrency = TRUE;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
1
SET @@global.innodb_commit_concurrency = FALSE;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0
SET @@global.innodb_commit_concurrency = @global_start_value;
SELECT @@global.innodb_commit_concurrency;
@@global.innodb_commit_concurrency
0

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_024_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_data_file_path);
COUNT(@@GLOBAL.innodb_data_file_path)
1
1 Expected
'#---------------------BS_STVARS_024_02----------------------#'
SET @@GLOBAL.innodb_data_file_path=1;
ERROR HY000: Variable 'innodb_data_file_path' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_data_file_path);
COUNT(@@GLOBAL.innodb_data_file_path)
1
1 Expected
'#---------------------BS_STVARS_024_03----------------------#'
SELECT @@GLOBAL.innodb_data_file_path = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_data_file_path';
@@GLOBAL.innodb_data_file_path = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_data_file_path);
COUNT(@@GLOBAL.innodb_data_file_path)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_data_file_path';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_024_04----------------------#'
SELECT @@innodb_data_file_path = @@GLOBAL.innodb_data_file_path;
@@innodb_data_file_path = @@GLOBAL.innodb_data_file_path
1
1 Expected
'#---------------------BS_STVARS_024_05----------------------#'
SELECT COUNT(@@innodb_data_file_path);
COUNT(@@innodb_data_file_path)
1
1 Expected
SELECT COUNT(@@local.innodb_data_file_path);
ERROR HY000: Variable 'innodb_data_file_path' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_data_file_path);
ERROR HY000: Variable 'innodb_data_file_path' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_data_file_path);
COUNT(@@GLOBAL.innodb_data_file_path)
1
1 Expected
SELECT innodb_data_file_path = @@SESSION.innodb_data_file_path;
ERROR 42S22: Unknown column 'innodb_data_file_path' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_025_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
COUNT(@@GLOBAL.innodb_data_home_dir)
0
1 Expected
'#---------------------BS_STVARS_025_02----------------------#'
SET @@GLOBAL.innodb_data_home_dir=1;
ERROR HY000: Variable 'innodb_data_home_dir' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
COUNT(@@GLOBAL.innodb_data_home_dir)
0
1 Expected
'#---------------------BS_STVARS_025_03----------------------#'
SELECT @@GLOBAL.innodb_data_home_dir = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_data_home_dir';
@@GLOBAL.innodb_data_home_dir = VARIABLE_VALUE
NULL
1 Expected
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
COUNT(@@GLOBAL.innodb_data_home_dir)
0
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_data_home_dir';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_025_04----------------------#'
SELECT @@innodb_data_home_dir = @@GLOBAL.innodb_data_home_dir;
@@innodb_data_home_dir = @@GLOBAL.innodb_data_home_dir
NULL
1 Expected
'#---------------------BS_STVARS_025_05----------------------#'
SELECT COUNT(@@innodb_data_home_dir);
COUNT(@@innodb_data_home_dir)
0
1 Expected
SELECT COUNT(@@local.innodb_data_home_dir);
ERROR HY000: Variable 'innodb_data_home_dir' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_data_home_dir);
ERROR HY000: Variable 'innodb_data_home_dir' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
COUNT(@@GLOBAL.innodb_data_home_dir)
0
1 Expected
SELECT innodb_data_home_dir = @@SESSION.innodb_data_home_dir;
ERROR 42S22: Unknown column 'innodb_data_home_dir' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_026_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_doublewrite);
COUNT(@@GLOBAL.innodb_doublewrite)
1
1 Expected
'#---------------------BS_STVARS_026_02----------------------#'
SET @@GLOBAL.innodb_doublewrite=1;
ERROR HY000: Variable 'innodb_doublewrite' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_doublewrite);
COUNT(@@GLOBAL.innodb_doublewrite)
1
1 Expected
'#---------------------BS_STVARS_026_03----------------------#'
SELECT @@GLOBAL.innodb_doublewrite = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_doublewrite';
@@GLOBAL.innodb_doublewrite = VARIABLE_VALUE
0
1 Expected
SELECT COUNT(@@GLOBAL.innodb_doublewrite);
COUNT(@@GLOBAL.innodb_doublewrite)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_doublewrite';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_026_04----------------------#'
SELECT @@innodb_doublewrite = @@GLOBAL.innodb_doublewrite;
@@innodb_doublewrite = @@GLOBAL.innodb_doublewrite
1
1 Expected
'#---------------------BS_STVARS_026_05----------------------#'
SELECT COUNT(@@innodb_doublewrite);
COUNT(@@innodb_doublewrite)
1
1 Expected
SELECT COUNT(@@local.innodb_doublewrite);
ERROR HY000: Variable 'innodb_doublewrite' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_doublewrite);
ERROR HY000: Variable 'innodb_doublewrite' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_doublewrite);
COUNT(@@GLOBAL.innodb_doublewrite)
1
1 Expected
SELECT innodb_doublewrite = @@SESSION.innodb_doublewrite;
ERROR 42S22: Unknown column 'innodb_doublewrite' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,127 @@
SET @global_start_value = @@global.innodb_fast_shutdown;
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
1
'#--------------------FN_DYNVARS_042_01------------------------#'
SET @@global.innodb_fast_shutdown = 0;
SET @@global.innodb_fast_shutdown = DEFAULT;
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
1
'#---------------------FN_DYNVARS_042_02-------------------------#'
SET innodb_fast_shutdown = 1;
ERROR HY000: Variable 'innodb_fast_shutdown' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_fast_shutdown;
@@innodb_fast_shutdown
1
SELECT global.innodb_fast_shutdown;
ERROR 42S02: Unknown table 'global' in field list
SET global innodb_fast_shutdown = 1;
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
1
'#--------------------FN_DYNVARS_042_03------------------------#'
SET @@global.innodb_fast_shutdown = 0;
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
0
SET @@global.innodb_fast_shutdown = 1;
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
1
SET @@global.innodb_fast_shutdown = 2;
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
'#--------------------FN_DYNVARS_042_04-------------------------#'
SET @@global.innodb_fast_shutdown = -1;
Warnings:
Warning 1292 Truncated incorrect fast_shutdown value: '18446744073709551615'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
SET @@global.innodb_fast_shutdown = TRU;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
SET @@global.innodb_fast_shutdown = TRUE_F;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
SET @@global.innodb_fast_shutdown = FALS;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
SET @@global.innodb_fast_shutdown = OON;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
SET @@global.innodb_fast_shutdown = ONN;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
SET @@global.innodb_fast_shutdown = OOFF;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
SET @@global.innodb_fast_shutdown = 0FF;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
SET @@global.innodb_fast_shutdown = '1';
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
SET @@global.innodb_fast_shutdown = "0";
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
'#-------------------FN_DYNVARS_042_05----------------------------#'
SET @@session.innodb_fast_shutdown = 0;
ERROR HY000: Variable 'innodb_fast_shutdown' is a GLOBAL variable and should be set with SET GLOBAL
SET @@innodb_fast_shutdown = 0;
ERROR HY000: Variable 'innodb_fast_shutdown' is a GLOBAL variable and should be set with SET GLOBAL
SET @@local.innodb_fast_shutdown = 0;
ERROR HY000: Variable 'innodb_fast_shutdown' is a GLOBAL variable and should be set with SET GLOBAL
'#----------------------FN_DYNVARS_042_06------------------------#'
SELECT count(VARIABLE_VALUE) AS res_is_0
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='innodb_fast_shutdown';
res_is_0
1
'#----------------------FN_DYNVARS_042_07------------------------#'
SELECT @@global.innodb_fast_shutdown =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_fast_shutdown';
@@global.innodb_fast_shutdown =
VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_042_08-------------------------#'
SET @@global.innodb_fast_shutdown = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
SET @@global.innodb_fast_shutdown = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
2
'#---------------------FN_DYNVARS_042_09----------------------#'
SET @@global.innodb_fast_shutdown = TRUE;
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
1
SET @@global.innodb_fast_shutdown = FALSE;
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
0

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_027_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_file_io_threads);
COUNT(@@GLOBAL.innodb_file_io_threads)
1
1 Expected
'#---------------------BS_STVARS_027_02----------------------#'
SET @@GLOBAL.innodb_file_io_threads=1;
ERROR HY000: Variable 'innodb_file_io_threads' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_file_io_threads);
COUNT(@@GLOBAL.innodb_file_io_threads)
1
1 Expected
'#---------------------BS_STVARS_027_03----------------------#'
SELECT @@GLOBAL.innodb_file_io_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_file_io_threads';
@@GLOBAL.innodb_file_io_threads = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_file_io_threads);
COUNT(@@GLOBAL.innodb_file_io_threads)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_file_io_threads';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_027_04----------------------#'
SELECT @@innodb_file_io_threads = @@GLOBAL.innodb_file_io_threads;
@@innodb_file_io_threads = @@GLOBAL.innodb_file_io_threads
1
1 Expected
'#---------------------BS_STVARS_027_05----------------------#'
SELECT COUNT(@@innodb_file_io_threads);
COUNT(@@innodb_file_io_threads)
1
1 Expected
SELECT COUNT(@@local.innodb_file_io_threads);
ERROR HY000: Variable 'innodb_file_io_threads' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_file_io_threads);
ERROR HY000: Variable 'innodb_file_io_threads' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_file_io_threads);
COUNT(@@GLOBAL.innodb_file_io_threads)
1
1 Expected
SELECT innodb_file_io_threads = @@SESSION.innodb_file_io_threads;
ERROR 42S22: Unknown column 'innodb_file_io_threads' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_028_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_file_per_table);
COUNT(@@GLOBAL.innodb_file_per_table)
1
1 Expected
'#---------------------BS_STVARS_028_02----------------------#'
SET @@GLOBAL.innodb_file_per_table=1;
ERROR HY000: Variable 'innodb_file_per_table' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_file_per_table);
COUNT(@@GLOBAL.innodb_file_per_table)
1
1 Expected
'#---------------------BS_STVARS_028_03----------------------#'
SELECT @@GLOBAL.innodb_file_per_table = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_file_per_table';
@@GLOBAL.innodb_file_per_table = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_file_per_table);
COUNT(@@GLOBAL.innodb_file_per_table)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_file_per_table';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_028_04----------------------#'
SELECT @@innodb_file_per_table = @@GLOBAL.innodb_file_per_table;
@@innodb_file_per_table = @@GLOBAL.innodb_file_per_table
1
1 Expected
'#---------------------BS_STVARS_028_05----------------------#'
SELECT COUNT(@@innodb_file_per_table);
COUNT(@@innodb_file_per_table)
1
1 Expected
SELECT COUNT(@@local.innodb_file_per_table);
ERROR HY000: Variable 'innodb_file_per_table' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_file_per_table);
ERROR HY000: Variable 'innodb_file_per_table' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_file_per_table);
COUNT(@@GLOBAL.innodb_file_per_table)
1
1 Expected
SELECT innodb_file_per_table = @@SESSION.innodb_file_per_table;
ERROR 42S22: Unknown column 'innodb_file_per_table' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,96 @@
SET @global_start_value = @@global.innodb_flush_log_at_trx_commit;
SELECT @global_start_value;
@global_start_value
1
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_flush_log_at_trx_commit = 0;
SET @@global.innodb_flush_log_at_trx_commit = DEFAULT;
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
1
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_flush_log_at_trx_commit = 1;
ERROR HY000: Variable 'innodb_flush_log_at_trx_commit' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_flush_log_at_trx_commit;
@@innodb_flush_log_at_trx_commit
1
SELECT local.innodb_flush_log_at_trx_commit;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_flush_log_at_trx_commit = 0;
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
0
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_flush_log_at_trx_commit = 0;
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
0
SET @@global.innodb_flush_log_at_trx_commit = 1;
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
1
SET @@global.innodb_flush_log_at_trx_commit = 2;
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
2
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_flush_log_at_trx_commit = -1;
Warnings:
Warning 1292 Truncated incorrect flush_log_at_trx_commit value: '18446744073709551615'
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
2
SET @@global.innodb_flush_log_at_trx_commit = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_trx_commit'
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
2
SET @@global.innodb_flush_log_at_trx_commit = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_trx_commit'
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
2
SET @@global.innodb_flush_log_at_trx_commit = 1001;
Warnings:
Warning 1292 Truncated incorrect flush_log_at_trx_commit value: '1001'
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
2
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_flush_log_at_trx_commit =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_log_at_trx_commit';
@@global.innodb_flush_log_at_trx_commit =
VARIABLE_VALUE
1
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
2
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_log_at_trx_commit';
VARIABLE_VALUE
2
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_flush_log_at_trx_commit = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_trx_commit'
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
2
SET @@global.innodb_flush_log_at_trx_commit = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_trx_commit'
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
2
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_flush_log_at_trx_commit = TRUE;
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
1
SET @@global.innodb_flush_log_at_trx_commit = FALSE;
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
0
SET @@global.innodb_flush_log_at_trx_commit = @global_start_value;
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
1

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_029_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_flush_method);
COUNT(@@GLOBAL.innodb_flush_method)
0
1 Expected
'#---------------------BS_STVARS_029_02----------------------#'
SET @@GLOBAL.innodb_flush_method=1;
ERROR HY000: Variable 'innodb_flush_method' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_flush_method);
COUNT(@@GLOBAL.innodb_flush_method)
0
1 Expected
'#---------------------BS_STVARS_029_03----------------------#'
SELECT @@GLOBAL.innodb_flush_method = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_method';
@@GLOBAL.innodb_flush_method = VARIABLE_VALUE
NULL
1 Expected
SELECT COUNT(@@GLOBAL.innodb_flush_method);
COUNT(@@GLOBAL.innodb_flush_method)
0
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_method';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_029_04----------------------#'
SELECT @@innodb_flush_method = @@GLOBAL.innodb_flush_method;
@@innodb_flush_method = @@GLOBAL.innodb_flush_method
NULL
1 Expected
'#---------------------BS_STVARS_029_05----------------------#'
SELECT COUNT(@@innodb_flush_method);
COUNT(@@innodb_flush_method)
0
1 Expected
SELECT COUNT(@@local.innodb_flush_method);
ERROR HY000: Variable 'innodb_flush_method' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_flush_method);
ERROR HY000: Variable 'innodb_flush_method' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_flush_method);
COUNT(@@GLOBAL.innodb_flush_method)
0
1 Expected
SELECT innodb_flush_method = @@SESSION.innodb_flush_method;
ERROR 42S22: Unknown column 'innodb_flush_method' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_030_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_force_recovery);
COUNT(@@GLOBAL.innodb_force_recovery)
1
1 Expected
'#---------------------BS_STVARS_030_02----------------------#'
SET @@GLOBAL.innodb_force_recovery=1;
ERROR HY000: Variable 'innodb_force_recovery' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_force_recovery);
COUNT(@@GLOBAL.innodb_force_recovery)
1
1 Expected
'#---------------------BS_STVARS_030_03----------------------#'
SELECT @@GLOBAL.innodb_force_recovery = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_force_recovery';
@@GLOBAL.innodb_force_recovery = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_force_recovery);
COUNT(@@GLOBAL.innodb_force_recovery)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_force_recovery';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_030_04----------------------#'
SELECT @@innodb_force_recovery = @@GLOBAL.innodb_force_recovery;
@@innodb_force_recovery = @@GLOBAL.innodb_force_recovery
1
1 Expected
'#---------------------BS_STVARS_030_05----------------------#'
SELECT COUNT(@@innodb_force_recovery);
COUNT(@@innodb_force_recovery)
1
1 Expected
SELECT COUNT(@@local.innodb_force_recovery);
ERROR HY000: Variable 'innodb_force_recovery' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_force_recovery);
ERROR HY000: Variable 'innodb_force_recovery' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_force_recovery);
COUNT(@@GLOBAL.innodb_force_recovery)
1
1 Expected
SELECT innodb_force_recovery = @@SESSION.innodb_force_recovery;
ERROR 42S22: Unknown column 'innodb_force_recovery' in 'field list'
Expected error 'Readonly variable'

View file

@ -0,0 +1,53 @@
'#---------------------BS_STVARS_032_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout);
COUNT(@@GLOBAL.innodb_lock_wait_timeout)
1
1 Expected
'#---------------------BS_STVARS_032_02----------------------#'
SET @@GLOBAL.innodb_lock_wait_timeout=1;
ERROR HY000: Variable 'innodb_lock_wait_timeout' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout);
COUNT(@@GLOBAL.innodb_lock_wait_timeout)
1
1 Expected
'#---------------------BS_STVARS_032_03----------------------#'
SELECT @@GLOBAL.innodb_lock_wait_timeout = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_lock_wait_timeout';
@@GLOBAL.innodb_lock_wait_timeout = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout);
COUNT(@@GLOBAL.innodb_lock_wait_timeout)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_lock_wait_timeout';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_032_04----------------------#'
SELECT @@innodb_lock_wait_timeout = @@GLOBAL.innodb_lock_wait_timeout;
@@innodb_lock_wait_timeout = @@GLOBAL.innodb_lock_wait_timeout
1
1 Expected
'#---------------------BS_STVARS_032_05----------------------#'
SELECT COUNT(@@innodb_lock_wait_timeout);
COUNT(@@innodb_lock_wait_timeout)
1
1 Expected
SELECT COUNT(@@local.innodb_lock_wait_timeout);
ERROR HY000: Variable 'innodb_lock_wait_timeout' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_lock_wait_timeout);
ERROR HY000: Variable 'innodb_lock_wait_timeout' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout);
COUNT(@@GLOBAL.innodb_lock_wait_timeout)
1
1 Expected
SELECT innodb_lock_wait_timeout = @@SESSION.innodb_lock_wait_timeout;
ERROR 42S22: Unknown column 'innodb_lock_wait_timeout' in 'field list'
Expected error 'Readonly variable'

Some files were not shown because too many files have changed in this diff Show more