Commit 315f2e8b authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: remove *slow*_basic tests

parent ba875e93
SET @start_global_value = @@global.log_slow_disabled_statements;
select @@global.log_slow_disabled_statements;
@@global.log_slow_disabled_statements
sp
select @@session.log_slow_disabled_statements;
@@session.log_slow_disabled_statements
sp
show global variables like 'log_slow_disabled_statements';
Variable_name Value
log_slow_disabled_statements sp
show session variables like 'log_slow_disabled_statements';
Variable_name Value
log_slow_disabled_statements sp
select * from information_schema.global_variables where variable_name='log_slow_disabled_statements';
VARIABLE_NAME VARIABLE_VALUE
LOG_SLOW_DISABLED_STATEMENTS sp
select * from information_schema.session_variables where variable_name='log_slow_disabled_statements';
VARIABLE_NAME VARIABLE_VALUE
LOG_SLOW_DISABLED_STATEMENTS sp
set global log_slow_disabled_statements=1;
select @@global.log_slow_disabled_statements;
@@global.log_slow_disabled_statements
admin
set session log_slow_disabled_statements=1;
select @@session.log_slow_disabled_statements;
@@session.log_slow_disabled_statements
admin
set session log_slow_disabled_statements=1;
select @@session.log_slow_disabled_statements;
@@session.log_slow_disabled_statements
admin
set session log_slow_disabled_statements=2;
select @@session.log_slow_disabled_statements;
@@session.log_slow_disabled_statements
call
set session log_slow_disabled_statements=5;
select @@session.log_slow_disabled_statements;
@@session.log_slow_disabled_statements
admin,slave
set session log_slow_disabled_statements='admin';
select @@session.log_slow_disabled_statements;
@@session.log_slow_disabled_statements
admin
set session log_slow_disabled_statements='slave';
select @@session.log_slow_disabled_statements;
@@session.log_slow_disabled_statements
slave
set session log_slow_disabled_statements='call';
select @@session.log_slow_disabled_statements;
@@session.log_slow_disabled_statements
call
set session log_slow_disabled_statements='sp';
select @@session.log_slow_disabled_statements;
@@session.log_slow_disabled_statements
sp
set session log_slow_disabled_statements='admin,sp,call,slave';
select @@session.log_slow_disabled_statements;
@@session.log_slow_disabled_statements
admin,call,slave,sp
set session log_slow_disabled_statements='';
select @@session.log_slow_disabled_statements;
@@session.log_slow_disabled_statements
set session log_slow_disabled_statements=1.1;
ERROR 42000: Incorrect argument type to variable 'log_slow_disabled_statements'
set session log_slow_disabled_statements=1e1;
ERROR 42000: Incorrect argument type to variable 'log_slow_disabled_statements'
set session log_slow_disabled_statements="foo";
ERROR 42000: Variable 'log_slow_disabled_statements' can't be set to the value of 'foo'
set session log_slow_disabled_statements=1024;
ERROR 42000: Variable 'log_slow_disabled_statements' can't be set to the value of '1024'
SET @@global.log_slow_disabled_statements = @start_global_value;
SET @start_global_value = @@global.log_slow_filter;
select @@global.log_slow_filter;
@@global.log_slow_filter
admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
select @@session.log_slow_filter;
@@session.log_slow_filter
admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
show global variables like 'log_slow_filter';
Variable_name Value
log_slow_filter admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
show session variables like 'log_slow_filter';
Variable_name Value
log_slow_filter admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
select * from information_schema.global_variables where variable_name='log_slow_filter';
VARIABLE_NAME VARIABLE_VALUE
LOG_SLOW_FILTER admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
select * from information_schema.session_variables where variable_name='log_slow_filter';
VARIABLE_NAME VARIABLE_VALUE
LOG_SLOW_FILTER admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
set global log_slow_filter=1;
select @@global.log_slow_filter;
@@global.log_slow_filter
admin
set session log_slow_filter=1;
select @@session.log_slow_filter;
@@session.log_slow_filter
admin
set session log_slow_filter=1;
select @@session.log_slow_filter;
@@session.log_slow_filter
admin
set session log_slow_filter=2;
select @@session.log_slow_filter;
@@session.log_slow_filter
filesort
set session log_slow_filter=5;
select @@session.log_slow_filter;
@@session.log_slow_filter
admin,filesort_on_disk
set session log_slow_filter='admin';
select @@session.log_slow_filter;
@@session.log_slow_filter
admin
set session log_slow_filter='filesort';
select @@session.log_slow_filter;
@@session.log_slow_filter
filesort
set session log_slow_filter='filesort_on_disk';
select @@session.log_slow_filter;
@@session.log_slow_filter
filesort_on_disk
set session log_slow_filter='full_join';
select @@session.log_slow_filter;
@@session.log_slow_filter
full_join
set session log_slow_filter='full_scan';
select @@session.log_slow_filter;
@@session.log_slow_filter
full_scan
set session log_slow_filter='not_using_index';
select @@session.log_slow_filter;
@@session.log_slow_filter
not_using_index
set session log_slow_filter='query_cache';
select @@session.log_slow_filter;
@@session.log_slow_filter
query_cache
set session log_slow_filter='query_cache_miss';
select @@session.log_slow_filter;
@@session.log_slow_filter
query_cache_miss
set session log_slow_filter='tmp_table';
select @@session.log_slow_filter;
@@session.log_slow_filter
tmp_table
set session log_slow_filter='tmp_table_on_disk';
select @@session.log_slow_filter;
@@session.log_slow_filter
tmp_table_on_disk
set session log_slow_filter='filesort,query_cache';
select @@session.log_slow_filter;
@@session.log_slow_filter
filesort,query_cache
set session log_slow_filter='admin,not_using_index,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk';
select @@session.log_slow_filter;
@@session.log_slow_filter
admin,filesort,filesort_on_disk,full_join,full_scan,not_using_index,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
set session log_slow_filter='';
select @@session.log_slow_filter;
@@session.log_slow_filter
set session log_slow_filter=1.1;
ERROR 42000: Incorrect argument type to variable 'log_slow_filter'
set session log_slow_filter=1e1;
ERROR 42000: Incorrect argument type to variable 'log_slow_filter'
set session log_slow_filter="foo";
ERROR 42000: Variable 'log_slow_filter' can't be set to the value of 'foo'
set session log_slow_filter=16384;
ERROR 42000: Variable 'log_slow_filter' can't be set to the value of '16384'
SET @@global.log_slow_filter = @start_global_value;
SET @start_value = @@global.log_slow_queries;
SELECT @start_value;
@start_value
1
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.log_slow_queries = DEFAULT;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries = 0;
@@global.log_slow_queries = 0
1
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.log_slow_queries = ON;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
SET @@global.log_slow_queries = OFF;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
0
'#--------------------FN_DYNVARS_004_03-------------------------#'
SET @@global.log_slow_queries = 2;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of '2'
SET @@global.log_slow_queries = -1;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of '-1'
SET @@global.log_slow_queries = TRUEF;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'TRUEF'
SET @@global.log_slow_queries = TRUE_F;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'TRUE_F'
SET @@global.log_slow_queries = FALSE0;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'FALSE0'
SET @@global.log_slow_queries = OON;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'OON'
SET @@global.log_slow_queries = ONN;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'ONN'
SET @@global.log_slow_queries = OOFF;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of 'OOFF'
SET @@global.log_slow_queries = 0FF;
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of '0FF'
SET @@global.log_slow_queries = ' ';
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of ' '
SET @@global.log_slow_queries = " ";
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of ' '
SET @@global.log_slow_queries = '';
ERROR 42000: Variable 'log_slow_queries' can't be set to the value of ''
'#-------------------FN_DYNVARS_004_04----------------------------#'
SET @@session.log_slow_queries = OFF;
ERROR HY000: Variable 'log_slow_queries' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@session.log_slow_queries;
ERROR HY000: Variable 'log_slow_queries' is a GLOBAL variable
'#----------------------FN_DYNVARS_004_05------------------------#'
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_004_06----------------------#'
SET @@global.log_slow_queries = 0;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
0
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
SET @@global.log_slow_queries = 1;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_004_07----------------------#'
SET @@global.log_slow_queries = TRUE;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
SET @@global.log_slow_queries = FALSE;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
0
SELECT IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='log_slow_queries';
IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_004_08----------------------#'
SET @@global.log_slow_queries = ON;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@log_slow_queries = @@global.log_slow_queries;
@@log_slow_queries = @@global.log_slow_queries
1
'#---------------------FN_DYNVARS_004_09----------------------#'
SET log_slow_queries = ON;
ERROR HY000: Variable 'log_slow_queries' is a GLOBAL variable and should be set with SET GLOBAL
SET local.log_slow_queries = OFF;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'log_slow_queries = OFF' at line 1
SELECT local.log_slow_queries;
ERROR 42S02: Unknown table 'local' in field list
SET global.log_slow_queries = ON;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'log_slow_queries = ON' at line 1
SELECT global.log_slow_queries;
ERROR 42S02: Unknown table 'global' in field list
SELECT log_slow_queries = @@session.log_slow_queries;
ERROR 42S22: Unknown column 'log_slow_queries' in 'field list'
SET @@global.log_slow_queries = @start_value;
Warnings:
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
SET @start_global_value = @@global.log_slow_rate_limit;
select @@global.log_slow_rate_limit;
@@global.log_slow_rate_limit
1
select @@session.log_slow_rate_limit;
@@session.log_slow_rate_limit
1
show global variables like 'log_slow_rate_limit';
Variable_name Value
log_slow_rate_limit 1
show session variables like 'log_slow_rate_limit';
Variable_name Value
log_slow_rate_limit 1
select * from information_schema.global_variables where variable_name='log_slow_rate_limit';
VARIABLE_NAME VARIABLE_VALUE
LOG_SLOW_RATE_LIMIT 1
select * from information_schema.session_variables where variable_name='log_slow_rate_limit';
VARIABLE_NAME VARIABLE_VALUE
LOG_SLOW_RATE_LIMIT 1
set global log_slow_rate_limit=10;
select @@global.log_slow_rate_limit;
@@global.log_slow_rate_limit
10
set session log_slow_rate_limit=10;
select @@session.log_slow_rate_limit;
@@session.log_slow_rate_limit
10
set global log_slow_rate_limit=1.1;
ERROR 42000: Incorrect argument type to variable 'log_slow_rate_limit'
set session log_slow_rate_limit=1e1;
ERROR 42000: Incorrect argument type to variable 'log_slow_rate_limit'
set global log_slow_rate_limit="foo";
ERROR 42000: Incorrect argument type to variable 'log_slow_rate_limit'
set global log_slow_rate_limit=0;
Warnings:
Warning 1292 Truncated incorrect log_slow_rate_limit value: '0'
select @@global.log_slow_rate_limit;
@@global.log_slow_rate_limit
1
set session log_slow_rate_limit=cast(-1 as unsigned int);
Warnings:
Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warning 1292 Truncated incorrect log_slow_rate_limit value: '18446744073709551615'
select @@session.log_slow_rate_limit;
@@session.log_slow_rate_limit
4294967295
SET @@global.log_slow_rate_limit = @start_global_value;
SET @start_global_value = @@global.log_slow_verbosity;
select @@global.log_slow_verbosity = @@session.log_slow_verbosity;
@@global.log_slow_verbosity = @@session.log_slow_verbosity
1
SET @@global.log_slow_verbosity="",@@session.log_slow_verbosity="";
show global variables like 'log_slow_verbosity';
Variable_name Value
log_slow_verbosity
show session variables like 'log_slow_verbosity';
Variable_name Value
log_slow_verbosity
select * from information_schema.global_variables where variable_name='log_slow_verbosity';
VARIABLE_NAME VARIABLE_VALUE
LOG_SLOW_VERBOSITY
select * from information_schema.session_variables where variable_name='log_slow_verbosity';
VARIABLE_NAME VARIABLE_VALUE
LOG_SLOW_VERBOSITY
set global log_slow_verbosity=1;
select @@global.log_slow_verbosity;
@@global.log_slow_verbosity
innodb
set session log_slow_verbosity=1;
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
innodb
set session log_slow_verbosity=1;
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
innodb
set session log_slow_verbosity=2;
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
query_plan
set session log_slow_verbosity=3;
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
innodb,query_plan
set session log_slow_verbosity=4;
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
explain
set session log_slow_verbosity=5;
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
innodb,explain
set session log_slow_verbosity=6;
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
query_plan,explain
set session log_slow_verbosity=7;
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
innodb,query_plan,explain
set session log_slow_verbosity='innodb';
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
innodb
set session log_slow_verbosity='query_plan';
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
query_plan
set session log_slow_verbosity='innodb,query_plan';
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
innodb,query_plan
set session log_slow_verbosity='explain';
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
explain
set session log_slow_verbosity='innodb,query_plan,explain';
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
innodb,query_plan,explain
set session log_slow_verbosity='';
select @@session.log_slow_verbosity;
@@session.log_slow_verbosity
set session log_slow_verbosity=1.1;
ERROR 42000: Incorrect argument type to variable 'log_slow_verbosity'
set session log_slow_verbosity=1e1;
ERROR 42000: Incorrect argument type to variable 'log_slow_verbosity'
set session log_slow_verbosity="foo";
ERROR 42000: Variable 'log_slow_verbosity' can't be set to the value of 'foo'
set session log_slow_verbosity=8;
ERROR 42000: Variable 'log_slow_verbosity' can't be set to the value of '8'
SET @@global.log_slow_verbosity = @start_global_value;
SET @start_value = @@global.slow_launch_time;
SELECT @start_value;
@start_value
2
'#--------------------FN_DYNVARS_150_01------------------------#'
SET @@global.slow_launch_time = 99;
SET @@global.slow_launch_time = DEFAULT;
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
2
'#---------------------FN_DYNVARS_150_02-------------------------#'
SET @@global.slow_launch_time = @start_value;
SELECT @@global.slow_launch_time = 2;
@@global.slow_launch_time = 2
1
'#--------------------FN_DYNVARS_150_03------------------------#'
SET @@global.slow_launch_time = 0;
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
0
SET @@global.slow_launch_time = 1;
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
1
SET @@global.slow_launch_time = 31536000;
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
31536000
SET @@global.slow_launch_time = 31535999;
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
31535999
SET @@global.slow_launch_time = 65536;
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
65536
'#--------------------FN_DYNVARS_150_04-------------------------#'
SET @@global.slow_launch_time = -1;
Warnings:
Warning 1292 Truncated incorrect slow_launch_time value: '-1'
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
0
SET @@global.slow_launch_time = 31536001;
Warnings:
Warning 1292 Truncated incorrect slow_launch_time value: '31536001'
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
31536000
SET @@global.slow_launch_time = 10240022115;
Warnings:
Warning 1292 Truncated incorrect slow_launch_time value: '10240022115'
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
31536000
SET @@global.slow_launch_time = 10000.01;
ERROR 42000: Incorrect argument type to variable 'slow_launch_time'
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
31536000
SET @@global.slow_launch_time = -1024;
Warnings:
Warning 1292 Truncated incorrect slow_launch_time value: '-1024'
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
0
SET @@global.slow_launch_time = 42949672950;
Warnings:
Warning 1292 Truncated incorrect slow_launch_time value: '42949672950'
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
31536000
SET @@global.slow_launch_time = ON;
ERROR 42000: Incorrect argument type to variable 'slow_launch_time'
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
31536000
SET @@global.slow_launch_time = 'test';
ERROR 42000: Incorrect argument type to variable 'slow_launch_time'
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
31536000
'#-------------------FN_DYNVARS_150_05----------------------------#'
SET @@session.slow_launch_time = 0;
ERROR HY000: Variable 'slow_launch_time' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@slow_launch_time;
@@slow_launch_time
31536000
'#----------------------FN_DYNVARS_150_06------------------------#'
SELECT @@global.slow_launch_time = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='slow_launch_time';
@@global.slow_launch_time = VARIABLE_VALUE
1
SELECT @@slow_launch_time = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='slow_launch_time';
@@slow_launch_time = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_150_07----------------------#'
SET @@global.slow_launch_time = TRUE;
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
1
SET @@global.slow_launch_time = FALSE;
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
0
'#---------------------FN_DYNVARS_150_08----------------------#'
SET @@global.slow_launch_time = 1;
SELECT @@slow_launch_time = @@global.slow_launch_time;
@@slow_launch_time = @@global.slow_launch_time
1
'#---------------------FN_DYNVARS_150_09----------------------#'
SET slow_launch_time = 1;
ERROR HY000: Variable 'slow_launch_time' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@slow_launch_time;
@@slow_launch_time
1
SELECT local.slow_launch_time;
ERROR 42S02: Unknown table 'local' in field list
SELECT global.slow_launch_time;
ERROR 42S02: Unknown table 'global' in field list
SELECT slow_launch_time = @@session.slow_launch_time;
ERROR 42S22: Unknown column 'slow_launch_time' in 'field list'
SET @@global.slow_launch_time = @start_value;
SELECT @@global.slow_launch_time;
@@global.slow_launch_time
2
SET @start_value = @@global.slow_query_log;
SELECT @start_value;
@start_value
1
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.slow_query_log = DEFAULT;
SELECT @@global.slow_query_log = 0;
@@global.slow_query_log = 0
1
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.slow_query_log = ON;
SELECT @@global.slow_query_log;
@@global.slow_query_log
1
SET @@global.slow_query_log = OFF;
SELECT @@global.slow_query_log;
@@global.slow_query_log
0
'#--------------------FN_DYNVARS_004_03-------------------------#'
SET @@global.slow_query_log = 2;
ERROR 42000: Variable 'slow_query_log' can't be set to the value of '2'
SET @@global.slow_query_log = -1;
ERROR 42000: Variable 'slow_query_log' can't be set to the value of '-1'
SET @@global.slow_query_log = TRUEF;
ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'TRUEF'
SET @@global.slow_query_log = TRUE_F;
ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'TRUE_F'
SET @@global.slow_query_log = FALSE0;
ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'FALSE0'
SET @@global.slow_query_log = OON;
ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'OON'
SET @@global.slow_query_log = ONN;
ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'ONN'
SET @@global.slow_query_log = OOFF;
ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'OOFF'
SET @@global.slow_query_log = 0FF;
ERROR 42000: Variable 'slow_query_log' can't be set to the value of '0FF'
SET @@global.slow_query_log = ' ';
ERROR 42000: Variable 'slow_query_log' can't be set to the value of ' '
SET @@global.slow_query_log = " ";
ERROR 42000: Variable 'slow_query_log' can't be set to the value of ' '
SET @@global.slow_query_log = '';
ERROR 42000: Variable 'slow_query_log' can't be set to the value of ''
'#-------------------FN_DYNVARS_004_04----------------------------#'
SET @@global.slow_query_log = ON;
SET @@session.slow_query_log = ON;
SELECT @@session.slow_query_log;
@@session.slow_query_log
1
SET @@session.slow_query_log = OFF;
SELECT @@session.slow_query_log;
@@session.slow_query_log
0
SET @@global.slow_query_log = OFF;
SET @@session.slow_query_log = ON;
'#----------------------FN_DYNVARS_004_05------------------------#'
SELECT IF(@@global.slow_query_log, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='slow_query_log';
IF(@@global.slow_query_log, "ON", "OFF") = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_004_06----------------------#'
SET @@global.slow_query_log = 0;
SELECT @@global.slow_query_log;
@@global.slow_query_log
0
SET @@global.slow_query_log = 1;
SELECT @@global.slow_query_log;
@@global.slow_query_log
1
'#---------------------FN_DYNVARS_004_07----------------------#'
SET @@global.slow_query_log = TRUE;
SELECT @@global.slow_query_log;
@@global.slow_query_log
1
SET @@global.slow_query_log = FALSE;
SELECT @@global.slow_query_log;
@@global.slow_query_log
0
'#---------------------FN_DYNVARS_004_08----------------------#'
SET @@global.slow_query_log = ON;
SET @@local.slow_query_log = OFF;
SELECT @@slow_query_log = @@global.slow_query_log;
@@slow_query_log = @@global.slow_query_log
0
'#---------------------FN_DYNVARS_004_09----------------------#'
SELECT local.slow_query_log;
ERROR 42S02: Unknown table 'local' in field list
SELECT global.slow_query_log;
ERROR 42S02: Unknown table 'global' in field list
SELECT slow_query_log = @@session.slow_query_log;
ERROR 42S22: Unknown column 'slow_query_log' in 'field list'
SET @@global.slow_query_log = @start_value;
SELECT @@global.slow_query_log;
@@global.slow_query_log
1
SET @start_value = @@global.slow_query_log_file;
'#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.slow_query_log_file = DEFAULT;
SELECT length(@@global.slow_query_log_file) > 0;
length(@@global.slow_query_log_file) > 0
1
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.slow_query_log_file = mytest.log;
ERROR 42000: Incorrect argument type to variable 'slow_query_log_file'
SET @@global.slow_query_log_file = 12;
ERROR 42000: Incorrect argument type to variable 'slow_query_log_file'
SET @@global.slow_query_log_file = 'my.cnf';
ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'my.cnf'
SET @@global.slow_query_log_file = '/tmp/my.cnf';
ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/tmp/my.cnf'
SET @@global.general_log_file = '.my.cnf';
ERROR 42000: Variable 'general_log_file' can't be set to the value of '.my.cnf'
SET @@global.general_log_file = 'my.cnf\0foo';
ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf\0000foo'
SET @@global.general_log_file = 'my.ini';
ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.ini'
'#----------------------FN_DYNVARS_004_03------------------------#'
SELECT @@global.slow_query_log_file = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='slow_query_log_file';
@@global.slow_query_log_file = VARIABLE_VALUE
1
SET @@global.slow_query_log_file= @start_value;
# set session
SET @start_global_value = @@global.log_slow_disabled_statements;
#
# exists as global only
#
select @@global.log_slow_disabled_statements;
select @@session.log_slow_disabled_statements;
show global variables like 'log_slow_disabled_statements';
show session variables like 'log_slow_disabled_statements';
select * from information_schema.global_variables where variable_name='log_slow_disabled_statements';
select * from information_schema.session_variables where variable_name='log_slow_disabled_statements';
#
# show that it's writable
#
set global log_slow_disabled_statements=1;
select @@global.log_slow_disabled_statements;
set session log_slow_disabled_statements=1;
select @@session.log_slow_disabled_statements;
#
# all valid values
#
set session log_slow_disabled_statements=1;
select @@session.log_slow_disabled_statements;
set session log_slow_disabled_statements=2;
select @@session.log_slow_disabled_statements;
set session log_slow_disabled_statements=5;
select @@session.log_slow_disabled_statements;
set session log_slow_disabled_statements='admin';
select @@session.log_slow_disabled_statements;
set session log_slow_disabled_statements='slave';
select @@session.log_slow_disabled_statements;
set session log_slow_disabled_statements='call';
select @@session.log_slow_disabled_statements;
set session log_slow_disabled_statements='sp';
select @@session.log_slow_disabled_statements;
set session log_slow_disabled_statements='admin,sp,call,slave';
select @@session.log_slow_disabled_statements;
set session log_slow_disabled_statements='';
select @@session.log_slow_disabled_statements;
#
# incorrect types/values
#
--error ER_WRONG_TYPE_FOR_VAR
set session log_slow_disabled_statements=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set session log_slow_disabled_statements=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set session log_slow_disabled_statements="foo";
--error ER_WRONG_VALUE_FOR_VAR
set session log_slow_disabled_statements=1024;
SET @@global.log_slow_disabled_statements = @start_global_value;
# set session
SET @start_global_value = @@global.log_slow_filter;
#
# exists as global only
#
select @@global.log_slow_filter;
select @@session.log_slow_filter;
show global variables like 'log_slow_filter';
show session variables like 'log_slow_filter';
select * from information_schema.global_variables where variable_name='log_slow_filter';
select * from information_schema.session_variables where variable_name='log_slow_filter';
#
# show that it's writable
#
set global log_slow_filter=1;
select @@global.log_slow_filter;
set session log_slow_filter=1;
select @@session.log_slow_filter;
#
# all valid values
#
set session log_slow_filter=1;
select @@session.log_slow_filter;
set session log_slow_filter=2;
select @@session.log_slow_filter;
set session log_slow_filter=5;
select @@session.log_slow_filter;
set session log_slow_filter='admin';
select @@session.log_slow_filter;
set session log_slow_filter='filesort';
select @@session.log_slow_filter;
set session log_slow_filter='filesort_on_disk';
select @@session.log_slow_filter;
set session log_slow_filter='full_join';
select @@session.log_slow_filter;
set session log_slow_filter='full_scan';
select @@session.log_slow_filter;
set session log_slow_filter='not_using_index';
select @@session.log_slow_filter;
set session log_slow_filter='query_cache';
select @@session.log_slow_filter;
set session log_slow_filter='query_cache_miss';
select @@session.log_slow_filter;
set session log_slow_filter='tmp_table';
select @@session.log_slow_filter;
set session log_slow_filter='tmp_table_on_disk';
select @@session.log_slow_filter;
set session log_slow_filter='filesort,query_cache';
select @@session.log_slow_filter;
set session log_slow_filter='admin,not_using_index,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk';
select @@session.log_slow_filter;
set session log_slow_filter='';
select @@session.log_slow_filter;
#
# incorrect types/values
#
--error ER_WRONG_TYPE_FOR_VAR
set session log_slow_filter=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set session log_slow_filter=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set session log_slow_filter="foo";
--error ER_WRONG_VALUE_FOR_VAR
set session log_slow_filter=16384;
SET @@global.log_slow_filter = @start_global_value;
# ulong session
SET @start_global_value = @@global.log_slow_rate_limit;
#
# exists as global only
#
select @@global.log_slow_rate_limit;
select @@session.log_slow_rate_limit;
show global variables like 'log_slow_rate_limit';
show session variables like 'log_slow_rate_limit';
select * from information_schema.global_variables where variable_name='log_slow_rate_limit';
select * from information_schema.session_variables where variable_name='log_slow_rate_limit';
#
# show that it's writable
#
set global log_slow_rate_limit=10;
select @@global.log_slow_rate_limit;
set session log_slow_rate_limit=10;
select @@session.log_slow_rate_limit;
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
set global log_slow_rate_limit=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set session log_slow_rate_limit=1e1;
--error ER_WRONG_TYPE_FOR_VAR
set global log_slow_rate_limit="foo";
#
# min/max values, block size
#
set global log_slow_rate_limit=0;
select @@global.log_slow_rate_limit;
set session log_slow_rate_limit=cast(-1 as unsigned int);
select @@session.log_slow_rate_limit;
SET @@global.log_slow_rate_limit = @start_global_value;
# set session
SET @start_global_value = @@global.log_slow_verbosity;
select @@global.log_slow_verbosity = @@session.log_slow_verbosity;
SET @@global.log_slow_verbosity="",@@session.log_slow_verbosity="";
#
# exists as global only
#
show global variables like 'log_slow_verbosity';
show session variables like 'log_slow_verbosity';
select * from information_schema.global_variables where variable_name='log_slow_verbosity';
select * from information_schema.session_variables where variable_name='log_slow_verbosity';
#
# show that it's writable
#
set global log_slow_verbosity=1;
select @@global.log_slow_verbosity;
set session log_slow_verbosity=1;
select @@session.log_slow_verbosity;
#
# all valid values
#
set session log_slow_verbosity=1;
select @@session.log_slow_verbosity;
set session log_slow_verbosity=2;
select @@session.log_slow_verbosity;
set session log_slow_verbosity=3;
select @@session.log_slow_verbosity;
set session log_slow_verbosity=4;
select @@session.log_slow_verbosity;
set session log_slow_verbosity=5;
select @@session.log_slow_verbosity;
set session log_slow_verbosity=6;
select @@session.log_slow_verbosity;
set session log_slow_verbosity=7;
select @@session.log_slow_verbosity;
set session log_slow_verbosity='innodb';
select @@session.log_slow_verbosity;
set session log_slow_verbosity='query_plan';
select @@session.log_slow_verbosity;
set session log_slow_verbosity='innodb,query_plan';
select @@session.log_slow_verbosity;
set session log_slow_verbosity='explain';
select @@session.log_slow_verbosity;
set session log_slow_verbosity='innodb,query_plan,explain';
select @@session.log_slow_verbosity;
set session log_slow_verbosity='';
select @@session.log_slow_verbosity;
#
# incorrect types/values
#
--error ER_WRONG_TYPE_FOR_VAR
set session log_slow_verbosity=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set session log_slow_verbosity=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set session log_slow_verbosity="foo";
--error ER_WRONG_VALUE_FOR_VAR
set session log_slow_verbosity=8;
SET @@global.log_slow_verbosity = @start_global_value;
############## mysql-test\t\slow_launch_time_basic.test ###############
# #
# Variable Name: slow_launch_time #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: numeric #
# Default Value: 2 #
# Range: - #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Salman #
# #
# Description: Test Cases of Dynamic System Variable slow_launch_time #
# that checks the behavior of this variable in the following ways#
# * Default Value #
# * Valid & Invalid values #
# * Scope & Access method #
# * Data Integrity #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--source include/load_sysvars.inc
########################################################################
# START OF slow_launch_time TESTS #
########################################################################
########################################################################
# Saving initial value of slow_launch_time in a temporary variable #
########################################################################
SET @start_value = @@global.slow_launch_time;
SELECT @start_value;
--echo '#--------------------FN_DYNVARS_150_01------------------------#'
########################################################################
# Display the DEFAULT value of slow_launch_time #
########################################################################
SET @@global.slow_launch_time = 99;
SET @@global.slow_launch_time = DEFAULT;
SELECT @@global.slow_launch_time;
--echo '#---------------------FN_DYNVARS_150_02-------------------------#'
###############################################
# Verify default value of variable #
###############################################
SET @@global.slow_launch_time = @start_value;
SELECT @@global.slow_launch_time = 2;
--echo '#--------------------FN_DYNVARS_150_03------------------------#'
########################################################################
# Change the value of slow_launch_time to a valid value #
########################################################################
SET @@global.slow_launch_time = 0;
SELECT @@global.slow_launch_time;
SET @@global.slow_launch_time = 1;
SELECT @@global.slow_launch_time;
SET @@global.slow_launch_time = 31536000;
SELECT @@global.slow_launch_time;
SET @@global.slow_launch_time = 31535999;
SELECT @@global.slow_launch_time;
SET @@global.slow_launch_time = 65536;
SELECT @@global.slow_launch_time;
--echo '#--------------------FN_DYNVARS_150_04-------------------------#'
###########################################################################
# Change the value of slow_launch_time to invalid value #
###########################################################################
SET @@global.slow_launch_time = -1;
SELECT @@global.slow_launch_time;
SET @@global.slow_launch_time = 31536001;
SELECT @@global.slow_launch_time;
SET @@global.slow_launch_time = 10240022115;
SELECT @@global.slow_launch_time;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.slow_launch_time = 10000.01;
SELECT @@global.slow_launch_time;
SET @@global.slow_launch_time = -1024;
SELECT @@global.slow_launch_time;
SET @@global.slow_launch_time = 42949672950;
SELECT @@global.slow_launch_time;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.slow_launch_time = ON;
SELECT @@global.slow_launch_time;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.slow_launch_time = 'test';
SELECT @@global.slow_launch_time;
--echo '#-------------------FN_DYNVARS_150_05----------------------------#'
###########################################################################
# Test if accessing session slow_launch_time gives error #
###########################################################################
--Error ER_GLOBAL_VARIABLE
SET @@session.slow_launch_time = 0;
SELECT @@slow_launch_time;
--echo '#----------------------FN_DYNVARS_150_06------------------------#'
##############################################################################
# Check if the value in GLOBAL & SESSION Tables matches values in variable #
##############################################################################
SELECT @@global.slow_launch_time = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='slow_launch_time';
SELECT @@slow_launch_time = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='slow_launch_time';
--echo '#---------------------FN_DYNVARS_150_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.slow_launch_time = TRUE;
SELECT @@global.slow_launch_time;
SET @@global.slow_launch_time = FALSE;
SELECT @@global.slow_launch_time;
--echo '#---------------------FN_DYNVARS_150_08----------------------#'
########################################################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points to same session variable #
########################################################################################################
SET @@global.slow_launch_time = 1;
SELECT @@slow_launch_time = @@global.slow_launch_time;
--echo '#---------------------FN_DYNVARS_150_09----------------------#'
##########################################################################
# Check if slow_launch_time can be accessed with and without @@ sign #
##########################################################################
--Error ER_GLOBAL_VARIABLE
SET slow_launch_time = 1;
SELECT @@slow_launch_time;
--Error ER_UNKNOWN_TABLE
SELECT local.slow_launch_time;
--Error ER_UNKNOWN_TABLE
SELECT global.slow_launch_time;
--Error ER_BAD_FIELD_ERROR
SELECT slow_launch_time = @@session.slow_launch_time;
##############################
# Restore initial value #
##############################
SET @@global.slow_launch_time = @start_value;
SELECT @@global.slow_launch_time;
########################################################################
# END OF slow_launch_time TESTS #
########################################################################
##################### mysql-test\t\slow_query_log_basic.test ###################
# #
# Variable Name: slow_query_log #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: BOOLEAN #
# Default Value: OFF #
# Valid Values: ON, OFF #
# #
# #
# Creation Date: 2008-03-16 #
# Author: Salman Rawala #
# #
# Description: Test Cases of Dynamic System Variable "slow_query_log" #
# that checks behavior of this variable in the following ways #
# * Default Value #
# * Valid & Invalid values #
# * Scope & Access method #
# * Data Integrity #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-options.html#option_mysqld_event-scheduler #
# #
################################################################################
--source include/load_sysvars.inc
###########################################################
# START OF slow_query_log TESTS #
###########################################################
######################################################################
# Saving initial value of slow_query_log in a temporary variable #
######################################################################
SET @start_value = @@global.slow_query_log;
SELECT @start_value;
--echo '#---------------------FN_DYNVARS_004_01-------------------------#'
###############################################
# Verify default value of variable #
###############################################
SET @@global.slow_query_log = DEFAULT;
SELECT @@global.slow_query_log = 0;
--echo '#--------------------FN_DYNVARS_004_02------------------------#'
######################################################################
# Change the value of slow_query_log to a valid value #
######################################################################
SET @@global.slow_query_log = ON;
SELECT @@global.slow_query_log;
SET @@global.slow_query_log = OFF;
SELECT @@global.slow_query_log;
--echo '#--------------------FN_DYNVARS_004_03-------------------------#'
######################################################################
# Change the value of slow_query_log to invalid value #
######################################################################
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log = 2;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log = -1;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log = TRUEF;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log = TRUE_F;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log = FALSE0;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log = OON;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log = ONN;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log = OOFF;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log = 0FF;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log = ' ';
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log = " ";
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log = '';
--echo '#-------------------FN_DYNVARS_004_04----------------------------#'
##################################################################
# Test that accessing session slow_query_log dows not give #
##################################################################
SET @@global.slow_query_log = ON;
SET @@session.slow_query_log = ON;
SELECT @@session.slow_query_log;
SET @@session.slow_query_log = OFF;
SELECT @@session.slow_query_log;
SET @@global.slow_query_log = OFF;
SET @@session.slow_query_log = ON;
--echo '#----------------------FN_DYNVARS_004_05------------------------#'
##############################################################################
# Check if the value in GLOBAL Tables matches values in variable #
##############################################################################
SELECT IF(@@global.slow_query_log, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='slow_query_log';
--echo '#---------------------FN_DYNVARS_004_06----------------------#'
################################################################
# Check if 0 and 1 values can be used on variable #
################################################################
SET @@global.slow_query_log = 0;
SELECT @@global.slow_query_log;
SET @@global.slow_query_log = 1;
SELECT @@global.slow_query_log;
--echo '#---------------------FN_DYNVARS_004_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.slow_query_log = TRUE;
SELECT @@global.slow_query_log;
SET @@global.slow_query_log = FALSE;
SELECT @@global.slow_query_log;
--echo '#---------------------FN_DYNVARS_004_08----------------------#'
##############################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points #
# to same session variable (doesn't) #
##############################################################################
SET @@global.slow_query_log = ON;
SET @@local.slow_query_log = OFF;
SELECT @@slow_query_log = @@global.slow_query_log;
--echo '#---------------------FN_DYNVARS_004_09----------------------#'
######################################################################
# Check if slow_query_log can be accessed with and without @@ sign #
######################################################################
--Error ER_UNKNOWN_TABLE
SELECT local.slow_query_log;
--Error ER_UNKNOWN_TABLE
SELECT global.slow_query_log;
--Error ER_BAD_FIELD_ERROR
SELECT slow_query_log = @@session.slow_query_log;
##############################
# Restore initial value #
##############################
SET @@global.slow_query_log = @start_value;
SELECT @@global.slow_query_log;
####################################################
# END OF slow_query_log TESTS #
####################################################
--slow-query-log --slow-query-log-file=slowtest.log
################### mysql-test\t\slow_query_log_file_basic.test ################
# #
# Variable Name: slow_query_log_file #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Filename #
# Default Value: host_name-slow.log #
# Valid Values: #
# #
# #
# Creation Date: 2008-03-16 #
# Author: Salman Rawala #
# Modified: HHunger 2008-09-11 set system var back to start value #
# #
# Description: Test Cases of Dynamic System Variable "slow_query_log_file" #
# that checks behavior of this variable in the following ways #
# * Default Value #
# * Valid & Invalid values #
# * Scope & Access method #
# * Data Integrity #
# #
# Reference: #
# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html
# #
################################################################################
--source include/load_sysvars.inc
###########################################################
# START OF slow_query_log_file TESTS #
###########################################################
###########################################################################
# Saving initial value of slow_query_log_file in a temporary variable #
###########################################################################
SET @start_value = @@global.slow_query_log_file;
--echo '#---------------------FN_DYNVARS_004_01-------------------------#'
###############################################
# Verify default value of variable #
###############################################
SET @@global.slow_query_log_file = DEFAULT;
SELECT length(@@global.slow_query_log_file) > 0;
--echo '#--------------------FN_DYNVARS_004_02------------------------#'
#######################################################################
# Change the value of slow_query_log_file to a invalid value #
#######################################################################
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.slow_query_log_file = mytest.log;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.slow_query_log_file = 12;
#
# MDEV-10465
#
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log_file = 'my.cnf';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.slow_query_log_file = '/tmp/my.cnf';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.general_log_file = '.my.cnf';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.general_log_file = 'my.cnf\0foo';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.general_log_file = 'my.ini';
--echo '#----------------------FN_DYNVARS_004_03------------------------#'
##############################################################################
# Check if the value in GLOBAL Tables matches values in variable #
##############################################################################
SELECT @@global.slow_query_log_file = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='slow_query_log_file';
SET @@global.slow_query_log_file= @start_value;
#####################################################
# END OF slow_query_log_file TESTS #
#####################################################
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment