Commit 243371f4 authored by Sergei Golubchik's avatar Sergei Golubchik

sys_var suite passes

parent 7da16844
...@@ -47,6 +47,7 @@ loose-innodb_read_io_threads= 2 ...@@ -47,6 +47,7 @@ loose-innodb_read_io_threads= 2
loose-innodb_log_buffer_size= 1M loose-innodb_log_buffer_size= 1M
loose-innodb_log_file_size= 5M loose-innodb_log_file_size= 5M
loose-innodb_log_files_in_group= 2 loose-innodb_log_files_in_group= 2
loose-innodb-stats-persistent= OFF
slave-net-timeout=120 slave-net-timeout=120
......
...@@ -5306,8 +5306,6 @@ sub mysqld_arguments ($$$) { ...@@ -5306,8 +5306,6 @@ sub mysqld_arguments ($$$) {
mtr_add_arg($args, "--loose-debug-sync-timeout=%s", mtr_add_arg($args, "--loose-debug-sync-timeout=%s",
$opt_debug_sync_timeout) unless $opt_user_args; $opt_debug_sync_timeout) unless $opt_user_args;
# MariaDB 10.0: disable innodb persistent statistics
mtr_add_arg($args, "--loose-skip-innodb-stats-persistent");
return $args; return $args;
} }
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
source include/not_embedded.inc; source include/not_embedded.inc;
--disable_query_log --disable_query_log
call mtr.add_suppression("InnoDB: New log files created");
call mtr.add_suppression("InnoDB: Creating foreign key constraint system tables");
let $innodb_index_stats = query_get_value(show create table mysql.innodb_index_stats, Create Table, 1); let $innodb_index_stats = query_get_value(show create table mysql.innodb_index_stats, Create Table, 1);
let $innodb_table_stats = query_get_value(show create table mysql.innodb_table_stats, Create Table, 1); let $innodb_table_stats = query_get_value(show create table mysql.innodb_table_stats, Create Table, 1);
let $database=`select database()`; let $database=`select database()`;
......
select @@global.host_cache_size;
@@global.host_cache_size
123
select @@session.host_cache_size;
ERROR HY000: Variable 'host_cache_size' is a GLOBAL variable
show global variables like 'host_cache_size';
Variable_name Value
host_cache_size 123
show session variables like 'host_cache_size';
Variable_name Value
host_cache_size 123
select * from information_schema.global_variables
where variable_name='host_cache_size';
VARIABLE_NAME VARIABLE_VALUE
HOST_CACHE_SIZE 123
select * from information_schema.session_variables
where variable_name='host_cache_size';
VARIABLE_NAME VARIABLE_VALUE
HOST_CACHE_SIZE 123
set global host_cache_size=1;
select @@global.host_cache_size;
@@global.host_cache_size
1
set global host_cache_size=12;
select @@global.host_cache_size;
@@global.host_cache_size
12
set global host_cache_size=0;
select @@global.host_cache_size;
@@global.host_cache_size
0
set session host_cache_size=1;
ERROR HY000: Variable 'host_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
set global host_cache_size=123;
select @@global.host_cache_size;
@@global.host_cache_size
123
SET @global_start_value = @@global.innodb_adaptive_flushing_lwm;
SELECT @global_start_value;
@global_start_value
10
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_adaptive_flushing_lwm = 1;
SET @@global.innodb_adaptive_flushing_lwm = DEFAULT;
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
10
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_adaptive_flushing_lwm = 1;
ERROR HY000: Variable 'innodb_adaptive_flushing_lwm' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_adaptive_flushing_lwm;
@@innodb_adaptive_flushing_lwm
10
SELECT local.innodb_adaptive_flushing_lwm;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_adaptive_flushing_lwm = 1;
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
1
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_adaptive_flushing_lwm = 1;
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
1
SET @@global.innodb_adaptive_flushing_lwm = 60;
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
60
SET @@global.innodb_adaptive_flushing_lwm = 70;
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
70
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_adaptive_flushing_lwm = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_adaptive_flushing_lwm value: '-1'
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
0
SET @@global.innodb_adaptive_flushing_lwm = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_flushing_lwm'
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
0
SET @@global.innodb_adaptive_flushing_lwm = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_flushing_lwm'
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
0
SET @@global.innodb_adaptive_flushing_lwm = 71;
Warnings:
Warning 1292 Truncated incorrect innodb_adaptive_flushing_lwm value: '71'
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
70
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_adaptive_flushing_lwm =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_adaptive_flushing_lwm';
@@global.innodb_adaptive_flushing_lwm =
VARIABLE_VALUE
1
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
70
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_adaptive_flushing_lwm';
VARIABLE_VALUE
70
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_adaptive_flushing_lwm = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_flushing_lwm'
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
70
SET @@global.innodb_adaptive_flushing_lwm = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_flushing_lwm'
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
70
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_adaptive_flushing_lwm = TRUE;
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
1
SET @@global.innodb_adaptive_flushing_lwm = FALSE;
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
0
SET @@global.innodb_adaptive_flushing_lwm = @global_start_value;
SELECT @@global.innodb_adaptive_flushing_lwm;
@@global.innodb_adaptive_flushing_lwm
10
SET @start_global_value = @@global.innodb_analyze_is_persistent;
SELECT @start_global_value;
@start_global_value
0
Valid values are 'ON' and 'OFF'
SELECT @@global.innodb_analyze_is_persistent in (0, 1);
@@global.innodb_analyze_is_persistent in (0, 1)
1
SELECT @@global.innodb_analyze_is_persistent;
@@global.innodb_analyze_is_persistent
0
SELECT @@session.innodb_analyze_is_persistent;
@@session.innodb_analyze_is_persistent
0
SHOW global variables LIKE 'innodb_analyze_is_persistent';
Variable_name Value
innodb_analyze_is_persistent OFF
SHOW session variables LIKE 'innodb_analyze_is_persistent';
Variable_name Value
innodb_analyze_is_persistent OFF
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_analyze_is_persistent';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ANALYZE_IS_PERSISTENT OFF
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_analyze_is_persistent';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ANALYZE_IS_PERSISTENT OFF
SET global innodb_analyze_is_persistent='OFF';
SELECT @@global.innodb_analyze_is_persistent;
@@global.innodb_analyze_is_persistent
0
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_analyze_is_persistent';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ANALYZE_IS_PERSISTENT OFF
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_analyze_is_persistent';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ANALYZE_IS_PERSISTENT OFF
SET @@global.innodb_analyze_is_persistent=1;
SELECT @@global.innodb_analyze_is_persistent;
@@global.innodb_analyze_is_persistent
1
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_analyze_is_persistent';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ANALYZE_IS_PERSISTENT ON
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_analyze_is_persistent';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ANALYZE_IS_PERSISTENT OFF
SET global innodb_analyze_is_persistent=0;
SELECT @@global.innodb_analyze_is_persistent;
@@global.innodb_analyze_is_persistent
0
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_analyze_is_persistent';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ANALYZE_IS_PERSISTENT OFF
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_analyze_is_persistent';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ANALYZE_IS_PERSISTENT OFF
SET @@global.innodb_analyze_is_persistent='ON';
SELECT @@global.innodb_analyze_is_persistent;
@@global.innodb_analyze_is_persistent
1
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_analyze_is_persistent';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ANALYZE_IS_PERSISTENT ON
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_analyze_is_persistent';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ANALYZE_IS_PERSISTENT OFF
SET session innodb_analyze_is_persistent='OFF';
SET @@session.innodb_analyze_is_persistent='ON';
SET global innodb_analyze_is_persistent=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_analyze_is_persistent'
SET global innodb_analyze_is_persistent=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_analyze_is_persistent'
SET global innodb_analyze_is_persistent=2;
ERROR 42000: Variable 'innodb_analyze_is_persistent' can't be set to the value of '2'
SET global innodb_analyze_is_persistent=-3;
ERROR 42000: Variable 'innodb_analyze_is_persistent' can't be set to the value of '-3'
SELECT @@global.innodb_analyze_is_persistent;
@@global.innodb_analyze_is_persistent
1
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_analyze_is_persistent';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ANALYZE_IS_PERSISTENT ON
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_analyze_is_persistent';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ANALYZE_IS_PERSISTENT ON
SET global innodb_analyze_is_persistent='AUTO';
ERROR 42000: Variable 'innodb_analyze_is_persistent' can't be set to the value of 'AUTO'
SET @@global.innodb_analyze_is_persistent = @start_global_value;
SELECT @@global.innodb_analyze_is_persistent;
@@global.innodb_analyze_is_persistent
0
SET @start_global_value = @@global.innodb_api_bk_commit_interval;
SELECT @start_global_value;
@start_global_value
5
Valid values are positive number
SELECT @@global.innodb_api_bk_commit_interval > 0;
@@global.innodb_api_bk_commit_interval > 0
1
SELECT @@global.innodb_api_bk_commit_interval <= 1024*1024*1024;
@@global.innodb_api_bk_commit_interval <= 1024*1024*1024
1
SELECT @@global.innodb_api_bk_commit_interval;
@@global.innodb_api_bk_commit_interval
5
SELECT @@session.innodb_api_bk_commit_interval;
ERROR HY000: Variable 'innodb_api_bk_commit_interval' is a GLOBAL variable
SHOW global variables LIKE 'innodb_api_bk_commit_interval';
Variable_name Value
innodb_api_bk_commit_interval 5
SHOW session variables LIKE 'innodb_api_bk_commit_interval';
Variable_name Value
innodb_api_bk_commit_interval 5
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_bk_commit_interval';
VARIABLE_NAME VARIABLE_VALUE
INNODB_API_BK_COMMIT_INTERVAL 5
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_api_bk_commit_interval';
VARIABLE_NAME VARIABLE_VALUE
INNODB_API_BK_COMMIT_INTERVAL 5
SET global innodb_api_bk_commit_interval=100;
SELECT @@global.innodb_api_bk_commit_interval;
@@global.innodb_api_bk_commit_interval
100
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_bk_commit_interval';
VARIABLE_NAME VARIABLE_VALUE
INNODB_API_BK_COMMIT_INTERVAL 100
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_api_bk_commit_interval';
VARIABLE_NAME VARIABLE_VALUE
INNODB_API_BK_COMMIT_INTERVAL 100
SET session innodb_api_bk_commit_interval=1;
ERROR HY000: Variable 'innodb_api_bk_commit_interval' is a GLOBAL variable and should be set with SET GLOBAL
SET global innodb_api_bk_commit_interval=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_api_bk_commit_interval'
SET global innodb_api_bk_commit_interval=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_api_bk_commit_interval'
SET global innodb_api_bk_commit_interval="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_api_bk_commit_interval'
SET global innodb_api_bk_commit_interval=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_api_bk_commit_interval value: '-7'
SELECT @@global.innodb_api_bk_commit_interval;
@@global.innodb_api_bk_commit_interval
1
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_bk_commit_interval';
VARIABLE_NAME VARIABLE_VALUE
INNODB_API_BK_COMMIT_INTERVAL 1
SET @@global.innodb_api_bk_commit_interval = @start_global_value;
SELECT @@global.innodb_api_bk_commit_interval;
@@global.innodb_api_bk_commit_interval
5
'#---------------------BS_STVARS_035_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
COUNT(@@GLOBAL.innodb_api_disable_rowlock)
1
1 Expected
'#---------------------BS_STVARS_035_02----------------------#'
SET @@GLOBAL.innodb_api_disable_rowlock=1;
ERROR HY000: Variable 'innodb_api_disable_rowlock' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
COUNT(@@GLOBAL.innodb_api_disable_rowlock)
1
1 Expected
'#---------------------BS_STVARS_035_03----------------------#'
SELECT IF(@@GLOBAL.innodb_api_disable_rowlock, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_disable_rowlock';
IF(@@GLOBAL.innodb_api_disable_rowlock, 'ON', 'OFF') = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
COUNT(@@GLOBAL.innodb_api_disable_rowlock)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_disable_rowlock';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_035_04----------------------#'
SELECT @@innodb_api_disable_rowlock = @@GLOBAL.innodb_api_enable_binlog;
@@innodb_api_disable_rowlock = @@GLOBAL.innodb_api_enable_binlog
1
1 Expected
'#---------------------BS_STVARS_035_05----------------------#'
SELECT COUNT(@@innodb_api_disable_rowlock);
COUNT(@@innodb_api_disable_rowlock)
1
1 Expected
SELECT COUNT(@@local.innodb_api_disable_rowlock);
ERROR HY000: Variable 'innodb_api_disable_rowlock' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_api_disable_rowlock);
ERROR HY000: Variable 'innodb_api_disable_rowlock' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
COUNT(@@GLOBAL.innodb_api_disable_rowlock)
1
1 Expected
SELECT innodb_api_disable_rowlock = @@SESSION.innodb_api_enable_binlog;
ERROR 42S22: Unknown column 'innodb_api_disable_rowlock' in 'field list'
Expected error 'Readonly variable'
'#---------------------BS_STVARS_035_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
COUNT(@@GLOBAL.innodb_api_enable_binlog)
1
1 Expected
'#---------------------BS_STVARS_035_02----------------------#'
SET @@GLOBAL.innodb_api_enable_binlog=1;
ERROR HY000: Variable 'innodb_api_enable_binlog' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
COUNT(@@GLOBAL.innodb_api_enable_binlog)
1
1 Expected
'#---------------------BS_STVARS_035_03----------------------#'
SELECT IF(@@GLOBAL.innodb_api_enable_binlog, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_enable_binlog';
IF(@@GLOBAL.innodb_api_enable_binlog, 'ON', 'OFF') = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
COUNT(@@GLOBAL.innodb_api_enable_binlog)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_enable_binlog';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_035_04----------------------#'
SELECT @@innodb_api_enable_binlog = @@GLOBAL.innodb_api_enable_binlog;
@@innodb_api_enable_binlog = @@GLOBAL.innodb_api_enable_binlog
1
1 Expected
'#---------------------BS_STVARS_035_05----------------------#'
SELECT COUNT(@@innodb_api_enable_binlog);
COUNT(@@innodb_api_enable_binlog)
1
1 Expected
SELECT COUNT(@@local.innodb_api_enable_binlog);
ERROR HY000: Variable 'innodb_api_enable_binlog' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_api_enable_binlog);
ERROR HY000: Variable 'innodb_api_enable_binlog' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
COUNT(@@GLOBAL.innodb_api_enable_binlog)
1
1 Expected
SELECT innodb_api_enable_binlog = @@SESSION.innodb_api_enable_binlog;
ERROR 42S22: Unknown column 'innodb_api_enable_binlog' in 'field list'
Expected error 'Readonly variable'
'#---------------------BS_STVARS_035_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
COUNT(@@GLOBAL.innodb_api_enable_mdl)
1
1 Expected
'#---------------------BS_STVARS_035_02----------------------#'
SET @@GLOBAL.innodb_api_enable_mdl=1;
ERROR HY000: Variable 'innodb_api_enable_mdl' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
COUNT(@@GLOBAL.innodb_api_enable_mdl)
1
1 Expected
'#---------------------BS_STVARS_035_03----------------------#'
SELECT IF(@@GLOBAL.innodb_api_enable_mdl, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_enable_mdl';
IF(@@GLOBAL.innodb_api_enable_mdl, 'ON', 'OFF') = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
COUNT(@@GLOBAL.innodb_api_enable_mdl)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_enable_mdl';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_035_04----------------------#'
SELECT @@innodb_api_enable_mdl = @@GLOBAL.innodb_api_enable_mdl;
@@innodb_api_enable_mdl = @@GLOBAL.innodb_api_enable_mdl
1
1 Expected
'#---------------------BS_STVARS_035_05----------------------#'
SELECT COUNT(@@innodb_api_enable_mdl);
COUNT(@@innodb_api_enable_mdl)
1
1 Expected
SELECT COUNT(@@local.innodb_api_enable_mdl);
ERROR HY000: Variable 'innodb_api_enable_mdl' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_api_enable_mdl);
ERROR HY000: Variable 'innodb_api_enable_mdl' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
COUNT(@@GLOBAL.innodb_api_enable_mdl)
1
1 Expected
SELECT innodb_api_enable_mdl = @@SESSION.innodb_api_enable_mdl;
ERROR 42S22: Unknown column 'innodb_api_enable_mdl' in 'field list'
Expected error 'Readonly variable'
SET @start_global_value = @@global.innodb_api_trx_level;
SELECT @start_global_value;
@start_global_value
0
Valid values are zero or above
SELECT @@global.innodb_api_trx_level >=0;
@@global.innodb_api_trx_level >=0
1
SELECT @@global.innodb_api_trx_level <=3;
@@global.innodb_api_trx_level <=3
1
SELECT @@global.innodb_api_trx_level;
@@global.innodb_api_trx_level
0
SELECT @@session.innodb_api_trx_level;
ERROR HY000: Variable 'innodb_api_trx_level' is a GLOBAL variable
SHOW global variables LIKE 'innodb_api_trx_level';
Variable_name Value
innodb_api_trx_level 0
SHOW session variables LIKE 'innodb_api_trx_level';
Variable_name Value
innodb_api_trx_level 0
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_trx_level';
VARIABLE_NAME VARIABLE_VALUE
INNODB_API_TRX_LEVEL 0
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_api_trx_level';
VARIABLE_NAME VARIABLE_VALUE
INNODB_API_TRX_LEVEL 0
SET global innodb_api_trx_level=100;
Warnings:
Warning 1292 Truncated incorrect innodb_api_trx_level value: '100'
SELECT @@global.innodb_api_trx_level;
@@global.innodb_api_trx_level
3
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_trx_level';
VARIABLE_NAME VARIABLE_VALUE
INNODB_API_TRX_LEVEL 3
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_api_trx_level';
VARIABLE_NAME VARIABLE_VALUE
INNODB_API_TRX_LEVEL 3
SET session innodb_api_trx_level=1;
ERROR HY000: Variable 'innodb_api_trx_level' is a GLOBAL variable and should be set with SET GLOBAL
SET global innodb_api_trx_level=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_api_trx_level'
SET global innodb_api_trx_level=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_api_trx_level'
SET global innodb_api_trx_level="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_api_trx_level'
SET global innodb_api_trx_level=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_api_trx_level value: '-7'
SELECT @@global.innodb_api_trx_level;
@@global.innodb_api_trx_level
0
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_trx_level';
VARIABLE_NAME VARIABLE_VALUE
INNODB_API_TRX_LEVEL 0
SET @@global.innodb_api_trx_level = @start_global_value;
SELECT @@global.innodb_api_trx_level;
@@global.innodb_api_trx_level
0
...@@ -6,13 +6,13 @@ Warning 1292 Truncated incorrect innodb_autoextend_increment value: '0' ...@@ -6,13 +6,13 @@ Warning 1292 Truncated incorrect innodb_autoextend_increment value: '0'
SET @@global.innodb_autoextend_increment = DEFAULT; SET @@global.innodb_autoextend_increment = DEFAULT;
SELECT @@global.innodb_autoextend_increment ; SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment @@global.innodb_autoextend_increment
8 64
'#---------------------FN_DYNVARS_046_02-------------------------#' '#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_autoextend_increment = 1; SET innodb_autoextend_increment = 1;
ERROR HY000: Variable 'innodb_autoextend_increment' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'innodb_autoextend_increment' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_autoextend_increment ; SELECT @@innodb_autoextend_increment ;
@@innodb_autoextend_increment @@innodb_autoextend_increment
8 64
SELECT local.innodb_autoextend_increment ; SELECT local.innodb_autoextend_increment ;
ERROR 42S02: Unknown table 'local' in field list ERROR 42S02: Unknown table 'local' in field list
SET global innodb_autoextend_increment = 0; SET global innodb_autoextend_increment = 0;
......
SELECT @@global.innodb_cmp_per_index_enabled;
@@global.innodb_cmp_per_index_enabled
0
SET GLOBAL innodb_stats_persistent=123;
ERROR 42000: Variable 'innodb_stats_persistent' can't be set to the value of '123'
SET GLOBAL innodb_stats_persistent='foo';
ERROR 42000: Variable 'innodb_stats_persistent' can't be set to the value of 'foo'
SET GLOBAL innodb_cmp_per_index_enabled=ON;
SELECT @@global.innodb_cmp_per_index_enabled;
@@global.innodb_cmp_per_index_enabled
1
SET GLOBAL innodb_cmp_per_index_enabled=ON;
SELECT @@global.innodb_cmp_per_index_enabled;
@@global.innodb_cmp_per_index_enabled
1
SET GLOBAL innodb_cmp_per_index_enabled=OFF;
SELECT @@global.innodb_cmp_per_index_enabled;
@@global.innodb_cmp_per_index_enabled
0
SET GLOBAL innodb_cmp_per_index_enabled=OFF;
SELECT @@global.innodb_cmp_per_index_enabled;
@@global.innodb_cmp_per_index_enabled
0
SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_cmp_per_index_enabled=ON;
CREATE TABLE t (a INT) ENGINE=INNODB KEY_BLOCK_SIZE=8;
INSERT INTO t VALUES (1);
SELECT * FROM information_schema.innodb_cmp_per_index;
database_name test
table_name t
index_name GEN_CLUST_INDEX
compress_ops 1
compress_ops_ok 1
compress_time 0
uncompress_ops 0
uncompress_time 0
SET GLOBAL innodb_cmp_per_index_enabled=OFF;
SET GLOBAL innodb_cmp_per_index_enabled=ON;
SELECT * FROM information_schema.innodb_cmp_per_index;
DROP TABLE t;
SET GLOBAL innodb_cmp_per_index_enabled=ON;
CREATE TABLE t (a INT) ENGINE=INNODB KEY_BLOCK_SIZE=8;
INSERT INTO t VALUES (1);
SELECT * FROM information_schema.innodb_cmp_per_index;
database_name test
table_name t
index_name GEN_CLUST_INDEX
compress_ops 1
compress_ops_ok 1
compress_time 0
uncompress_ops 0
uncompress_time 0
SET GLOBAL innodb_cmp_per_index_enabled=ON;
SELECT * FROM information_schema.innodb_cmp_per_index;
database_name test
table_name t
index_name GEN_CLUST_INDEX
compress_ops 1
compress_ops_ok 1
compress_time 0
uncompress_ops 0
uncompress_time 0
DROP TABLE t;
SET GLOBAL innodb_file_format=default;
SET GLOBAL innodb_cmp_per_index_enabled=default;
SET @global_start_value = @@global.innodb_compression_failure_threshold_pct;
SELECT @global_start_value;
@global_start_value
5
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_compression_failure_threshold_pct = 0;
SET @@global.innodb_compression_failure_threshold_pct = DEFAULT;
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
5
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_compression_failure_threshold_pct = 1;
ERROR HY000: Variable 'innodb_compression_failure_threshold_pct' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_compression_failure_threshold_pct;
@@innodb_compression_failure_threshold_pct
5
SELECT local.innodb_compression_failure_threshold_pct;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_compression_failure_threshold_pct = 0;
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
0
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_compression_failure_threshold_pct = 0;
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
0
SET @@global.innodb_compression_failure_threshold_pct = 1;
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
1
SET @@global.innodb_compression_failure_threshold_pct = 100;
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
100
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_compression_failure_threshold_pct = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_compression_failure_thres value: '-1'
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
0
SET @@global.innodb_compression_failure_threshold_pct = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_compression_failure_threshold_pct'
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
0
SET @@global.innodb_compression_failure_threshold_pct = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_compression_failure_threshold_pct'
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
0
SET @@global.innodb_compression_failure_threshold_pct = 101;
Warnings:
Warning 1292 Truncated incorrect innodb_compression_failure_thres value: '101'
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
100
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_compression_failure_threshold_pct =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_compression_failure_threshold_pct';
@@global.innodb_compression_failure_threshold_pct =
VARIABLE_VALUE
1
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
100
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_compression_failure_threshold_pct';
VARIABLE_VALUE
100
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_compression_failure_threshold_pct = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_compression_failure_threshold_pct'
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
100
SET @@global.innodb_compression_failure_threshold_pct = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_compression_failure_threshold_pct'
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
100
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_compression_failure_threshold_pct = TRUE;
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
1
SET @@global.innodb_compression_failure_threshold_pct = FALSE;
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
0
SET @@global.innodb_compression_failure_threshold_pct = @global_start_value;
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
5
SET @start_global_value = @@global.innodb_compression_level;
SELECT @start_global_value;
@start_global_value
6
Valid value 0-9
select @@global.innodb_compression_level <= 9;
@@global.innodb_compression_level <= 9
1
select @@global.innodb_compression_level;
@@global.innodb_compression_level
6
select @@session.innodb_compression_level;
ERROR HY000: Variable 'innodb_compression_level' is a GLOBAL variable
show global variables like 'innodb_compression_level';
Variable_name Value
innodb_compression_level 6
show session variables like 'innodb_compression_level';
Variable_name Value
innodb_compression_level 6
select * from information_schema.global_variables where variable_name='innodb_compression_level';
VARIABLE_NAME VARIABLE_VALUE
INNODB_COMPRESSION_LEVEL 6
select * from information_schema.session_variables where variable_name='innodb_compression_level';
VARIABLE_NAME VARIABLE_VALUE
INNODB_COMPRESSION_LEVEL 6
set global innodb_compression_level=2;
select @@global.innodb_compression_level;
@@global.innodb_compression_level
2
select * from information_schema.global_variables where variable_name='innodb_compression_level';
VARIABLE_NAME VARIABLE_VALUE
INNODB_COMPRESSION_LEVEL 2
select * from information_schema.session_variables where variable_name='innodb_compression_level';
VARIABLE_NAME VARIABLE_VALUE
INNODB_COMPRESSION_LEVEL 2
set session innodb_compression_level=4;
ERROR HY000: Variable 'innodb_compression_level' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_compression_level=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_compression_level'
set global innodb_compression_level=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_compression_level'
set global innodb_compression_level="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_compression_level'
set global innodb_compression_level=10;
Warnings:
Warning 1292 Truncated incorrect innodb_compression_level value: '10'
select @@global.innodb_compression_level;
@@global.innodb_compression_level
9
select * from information_schema.global_variables where variable_name='innodb_compression_level';
VARIABLE_NAME VARIABLE_VALUE
INNODB_COMPRESSION_LEVEL 9
set global innodb_compression_level=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_compression_level value: '-7'
select @@global.innodb_compression_level;
@@global.innodb_compression_level
0
select * from information_schema.global_variables where variable_name='innodb_compression_level';
VARIABLE_NAME VARIABLE_VALUE
INNODB_COMPRESSION_LEVEL 0
set global innodb_compression_level=0;
select @@global.innodb_compression_level;
@@global.innodb_compression_level
0
set global innodb_compression_level=9;
select @@global.innodb_compression_level;
@@global.innodb_compression_level
9
SET @@global.innodb_compression_level = @start_global_value;
SELECT @@global.innodb_compression_level;
@@global.innodb_compression_level
6
SET @global_start_value = @@global.innodb_compression_pad_pct_max;
SELECT @global_start_value;
@global_start_value
50
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_compression_pad_pct_max = DEFAULT;
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
50
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_compression_pad_pct_max = 1;
ERROR HY000: Variable 'innodb_compression_pad_pct_max' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_compression_pad_pct_max;
@@innodb_compression_pad_pct_max
50
SELECT local.innodb_compression_pad_pct_max;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_compression_pad_pct_max = 0;
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
0
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_compression_pad_pct_max = 0;
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
0
SET @@global.innodb_compression_pad_pct_max = 75;
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
75
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_compression_pad_pct_max = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_compression_pad_pct_max value: '-1'
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
0
SET @@global.innodb_compression_pad_pct_max = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_compression_pad_pct_max'
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
0
SET @@global.innodb_compression_pad_pct_max = 76;
Warnings:
Warning 1292 Truncated incorrect innodb_compression_pad_pct_max value: '76'
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
75
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_compression_pad_pct_max =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_compression_pad_pct_max';
@@global.innodb_compression_pad_pct_max =
VARIABLE_VALUE
1
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
75
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_compression_pad_pct_max';
VARIABLE_VALUE
75
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_compression_pad_pct_max = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_compression_pad_pct_max'
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
75
SET @@global.innodb_compression_pad_pct_max = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_compression_pad_pct_max'
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
75
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_compression_pad_pct_max = TRUE;
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
1
SET @@global.innodb_compression_pad_pct_max = FALSE;
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
0
SET @@global.innodb_compression_pad_pct_max = @global_start_value;
SELECT @@global.innodb_compression_pad_pct_max;
@@global.innodb_compression_pad_pct_max
50
SET @global_start_value = @@global.innodb_concurrency_tickets; SET @global_start_value = @@global.innodb_concurrency_tickets;
SELECT @global_start_value; SELECT @global_start_value;
@global_start_value @global_start_value
500 5000
'#--------------------FN_DYNVARS_046_01------------------------#' '#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_concurrency_tickets = 0; SET @@global.innodb_concurrency_tickets = 0;
Warnings: Warnings:
...@@ -9,13 +9,13 @@ Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0' ...@@ -9,13 +9,13 @@ Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0'
SET @@global.innodb_concurrency_tickets = DEFAULT; SET @@global.innodb_concurrency_tickets = DEFAULT;
SELECT @@global.innodb_concurrency_tickets; SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets @@global.innodb_concurrency_tickets
500 5000
'#---------------------FN_DYNVARS_046_02-------------------------#' '#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_concurrency_tickets = 1; SET innodb_concurrency_tickets = 1;
ERROR HY000: Variable 'innodb_concurrency_tickets' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'innodb_concurrency_tickets' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_concurrency_tickets; SELECT @@innodb_concurrency_tickets;
@@innodb_concurrency_tickets @@innodb_concurrency_tickets
500 5000
SELECT local.innodb_concurrency_tickets; SELECT local.innodb_concurrency_tickets;
ERROR 42S02: Unknown table 'local' in field list ERROR 42S02: Unknown table 'local' in field list
SET global innodb_concurrency_tickets = 0; SET global innodb_concurrency_tickets = 0;
...@@ -97,4 +97,4 @@ SELECT @@global.innodb_concurrency_tickets; ...@@ -97,4 +97,4 @@ SELECT @@global.innodb_concurrency_tickets;
SET @@global.innodb_concurrency_tickets = @global_start_value; SET @@global.innodb_concurrency_tickets = @global_start_value;
SELECT @@global.innodb_concurrency_tickets; SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets @@global.innodb_concurrency_tickets
500 5000
SET @orig = @@global.innodb_disable_background_merge;
SELECT @orig;
@orig
0
SET @start_global_value = @@global.innodb_file_per_table; SET @start_global_value = @@global.innodb_file_per_table;
SELECT @start_global_value; SELECT @start_global_value;
@start_global_value @start_global_value
0 1
'#---------------------BS_STVARS_028_01----------------------#' '#---------------------BS_STVARS_028_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_file_per_table); SELECT COUNT(@@GLOBAL.innodb_file_per_table);
COUNT(@@GLOBAL.innodb_file_per_table) COUNT(@@GLOBAL.innodb_file_per_table)
...@@ -66,4 +66,4 @@ ERROR 42S22: Unknown column 'innodb_file_per_table' in 'field list' ...@@ -66,4 +66,4 @@ ERROR 42S22: Unknown column 'innodb_file_per_table' in 'field list'
SET @@global.innodb_file_per_table = @start_global_value; SET @@global.innodb_file_per_table = @start_global_value;
SELECT @@global.innodb_file_per_table; SELECT @@global.innodb_file_per_table;
@@global.innodb_file_per_table @@global.innodb_file_per_table
0 1
SET @global_start_value = @@global.innodb_flush_log_at_timeout;
SELECT @global_start_value;
@global_start_value
1
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_flush_log_at_timeout = 0;
SET @@global.innodb_flush_log_at_timeout = DEFAULT;
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
1
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_flush_log_at_timeout = 1;
ERROR HY000: Variable 'innodb_flush_log_at_timeout' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_flush_log_at_timeout;
@@innodb_flush_log_at_timeout
1
SELECT local.innodb_flush_log_at_timeout;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_flush_log_at_timeout = 0;
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
0
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_flush_log_at_timeout = 0;
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
0
SET @@global.innodb_flush_log_at_timeout = 10;
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
10
SET @@global.innodb_flush_log_at_timeout = 2700;
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
2700
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_flush_log_at_timeout = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_flush_log_at_timeout value: '-1'
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
0
SET @@global.innodb_flush_log_at_timeout = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_timeout'
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
0
SET @@global.innodb_flush_log_at_timeout = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_timeout'
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
0
SET @@global.innodb_flush_log_at_timeout = 2701;
Warnings:
Warning 1292 Truncated incorrect innodb_flush_log_at_timeout value: '2701'
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
2700
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_flush_log_at_timeout =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_log_at_timeout';
@@global.innodb_flush_log_at_timeout =
VARIABLE_VALUE
1
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
2700
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_log_at_timeout';
VARIABLE_VALUE
2700
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_flush_log_at_timeout = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_timeout'
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
2700
SET @@global.innodb_flush_log_at_timeout = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_timeout'
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
2700
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_flush_log_at_timeout = TRUE;
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
1
SET @@global.innodb_flush_log_at_timeout = FALSE;
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
0
SET @@global.innodb_flush_log_at_timeout = @global_start_value;
SELECT @@global.innodb_flush_log_at_timeout;
@@global.innodb_flush_log_at_timeout
1
...@@ -2,10 +2,6 @@ SET @start_global_value = @@global.innodb_flush_neighbors; ...@@ -2,10 +2,6 @@ SET @start_global_value = @@global.innodb_flush_neighbors;
SELECT @start_global_value; SELECT @start_global_value;
@start_global_value @start_global_value
1 1
Valid values are 'ON' and 'OFF'
select @@global.innodb_flush_neighbors in (0, 1);
@@global.innodb_flush_neighbors in (0, 1)
1
select @@global.innodb_flush_neighbors; select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors @@global.innodb_flush_neighbors
1 1
...@@ -13,79 +9,92 @@ select @@session.innodb_flush_neighbors; ...@@ -13,79 +9,92 @@ select @@session.innodb_flush_neighbors;
ERROR HY000: Variable 'innodb_flush_neighbors' is a GLOBAL variable ERROR HY000: Variable 'innodb_flush_neighbors' is a GLOBAL variable
show global variables like 'innodb_flush_neighbors'; show global variables like 'innodb_flush_neighbors';
Variable_name Value Variable_name Value
innodb_flush_neighbors ON innodb_flush_neighbors 1
show session variables like 'innodb_flush_neighbors'; show session variables like 'innodb_flush_neighbors';
Variable_name Value Variable_name Value
innodb_flush_neighbors ON innodb_flush_neighbors 1
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors'; select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS ON INNODB_FLUSH_NEIGHBORS 1
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors'; select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS ON INNODB_FLUSH_NEIGHBORS 1
set global innodb_flush_neighbors='OFF'; set global innodb_flush_neighbors=0;
select @@global.innodb_flush_neighbors; select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors @@global.innodb_flush_neighbors
0 0
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors'; select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS OFF INNODB_FLUSH_NEIGHBORS 0
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors'; select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS OFF INNODB_FLUSH_NEIGHBORS 0
set @@global.innodb_flush_neighbors=1; set @@global.innodb_flush_neighbors=TRUE;
select @@global.innodb_flush_neighbors; select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors @@global.innodb_flush_neighbors
1 1
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors'; select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS ON INNODB_FLUSH_NEIGHBORS 1
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors'; select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS ON INNODB_FLUSH_NEIGHBORS 1
set global innodb_flush_neighbors=0; set global innodb_flush_neighbors=0;
select @@global.innodb_flush_neighbors; select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors @@global.innodb_flush_neighbors
0 0
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors'; select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS OFF INNODB_FLUSH_NEIGHBORS 0
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors'; select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS OFF INNODB_FLUSH_NEIGHBORS 0
set @@global.innodb_flush_neighbors='ON'; set @@global.innodb_flush_neighbors=2;
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
2
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS 2
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS 2
set @@global.innodb_flush_neighbors=DEFAULT;
select @@global.innodb_flush_neighbors; select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors @@global.innodb_flush_neighbors
1 1
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors'; select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS ON INNODB_FLUSH_NEIGHBORS 1
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors'; select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS ON INNODB_FLUSH_NEIGHBORS 1
set session innodb_flush_neighbors='OFF'; set session innodb_flush_neighbors=0;
ERROR HY000: Variable 'innodb_flush_neighbors' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'innodb_flush_neighbors' is a GLOBAL variable and should be set with SET GLOBAL
set @@session.innodb_flush_neighbors='ON'; set @@session.innodb_flush_neighbors=1;
ERROR HY000: Variable 'innodb_flush_neighbors' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'innodb_flush_neighbors' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_flush_neighbors='OFF';
ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors'
set global innodb_flush_neighbors='ON';
ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors'
set global innodb_flush_neighbors=1.1; set global innodb_flush_neighbors=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors' ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors'
set global innodb_flush_neighbors=1e1; set global innodb_flush_neighbors=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors' ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors'
set global innodb_flush_neighbors=2; set global innodb_flush_neighbors=3;
ERROR 42000: Variable 'innodb_flush_neighbors' can't be set to the value of '2' Warnings:
Warning 1292 Truncated incorrect innodb_flush_neighbors value: '3'
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
2
set global innodb_flush_neighbors=-3; set global innodb_flush_neighbors=-3;
ERROR 42000: Variable 'innodb_flush_neighbors' can't be set to the value of '-3' Warnings:
Warning 1292 Truncated incorrect innodb_flush_neighbors value: '-3'
select @@global.innodb_flush_neighbors; select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors @@global.innodb_flush_neighbors
1 0
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS ON
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS ON
set global innodb_flush_neighbors='AUTO'; set global innodb_flush_neighbors='AUTO';
ERROR 42000: Variable 'innodb_flush_neighbors' can't be set to the value of 'AUTO' ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors'
SET @@global.innodb_flush_neighbors = @start_global_value; SET @@global.innodb_flush_neighbors = @start_global_value;
SELECT @@global.innodb_flush_neighbors; SELECT @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors @@global.innodb_flush_neighbors
......
SET @global_start_value = @@global.innodb_flushing_avg_loops;
SELECT @global_start_value;
@global_start_value
30
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_flushing_avg_loops = 1;
SET @@global.innodb_flushing_avg_loops = DEFAULT;
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
30
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_flushing_avg_loops = 1;
ERROR HY000: Variable 'innodb_flushing_avg_loops' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_flushing_avg_loops;
@@innodb_flushing_avg_loops
30
SELECT local.innodb_flushing_avg_loops;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_flushing_avg_loops = 1;
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_flushing_avg_loops = 1;
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1
SET @@global.innodb_flushing_avg_loops = 60;
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
60
SET @@global.innodb_flushing_avg_loops = 1000;
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1000
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_flushing_avg_loops = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_flushing_avg_loops value: '-1'
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1
SET @@global.innodb_flushing_avg_loops = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_flushing_avg_loops'
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1
SET @@global.innodb_flushing_avg_loops = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_flushing_avg_loops'
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1
SET @@global.innodb_flushing_avg_loops = 1001;
Warnings:
Warning 1292 Truncated incorrect innodb_flushing_avg_loops value: '1001'
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1000
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_flushing_avg_loops =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flushing_avg_loops';
@@global.innodb_flushing_avg_loops =
VARIABLE_VALUE
1
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1000
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flushing_avg_loops';
VARIABLE_VALUE
1000
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_flushing_avg_loops = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_flushing_avg_loops'
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1000
SET @@global.innodb_flushing_avg_loops = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_flushing_avg_loops'
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1000
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_flushing_avg_loops = TRUE;
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1
SET @@global.innodb_flushing_avg_loops = FALSE;
Warnings:
Warning 1292 Truncated incorrect innodb_flushing_avg_loops value: '0'
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1
SET @@global.innodb_flushing_avg_loops = @global_start_value;
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
30
select @@global.innodb_force_recovery_crash in (0, 1);
@@global.innodb_force_recovery_crash in (0, 1)
1
select @@global.innodb_force_recovery_crash;
@@global.innodb_force_recovery_crash
0
select @@session.innodb_force_recovery_crash;
ERROR HY000: Variable 'innodb_force_recovery_crash' is a GLOBAL variable
show global variables like 'innodb_force_recovery_crash';
Variable_name Value
innodb_force_recovery_crash 0
show session variables like 'innodb_force_recovery_crash';
Variable_name Value
innodb_force_recovery_crash 0
select * from information_schema.global_variables where variable_name='innodb_force_recovery_crash';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FORCE_RECOVERY_CRASH 0
select * from information_schema.session_variables where variable_name='innodb_force_recovery_crash';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FORCE_RECOVERY_CRASH 0
set global innodb_force_recovery_crash=1;
ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
set global innodb_force_recovery_crash=0;
ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
select @@global.innodb_force_recovery_crash;
@@global.innodb_force_recovery_crash
0
set session innodb_force_recovery_crash='some';
ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
set @@session.innodb_force_recovery_crash='some';
ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
set global innodb_force_recovery_crash='some';
ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
select @@global.innodb_ft_cache_size; select @@global.innodb_ft_cache_size;
@@global.innodb_ft_cache_size @@global.innodb_ft_cache_size
32000000 8000000
select @@session.innodb_ft_cache_size; select @@session.innodb_ft_cache_size;
ERROR HY000: Variable 'innodb_ft_cache_size' is a GLOBAL variable ERROR HY000: Variable 'innodb_ft_cache_size' is a GLOBAL variable
show global variables like 'innodb_ft_cache_size'; show global variables like 'innodb_ft_cache_size';
Variable_name Value Variable_name Value
innodb_ft_cache_size 32000000 innodb_ft_cache_size 8000000
show session variables like 'innodb_ft_cache_size'; show session variables like 'innodb_ft_cache_size';
Variable_name Value Variable_name Value
innodb_ft_cache_size 32000000 innodb_ft_cache_size 8000000
select * from information_schema.global_variables where variable_name='innodb_ft_cache_size'; select * from information_schema.global_variables where variable_name='innodb_ft_cache_size';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FT_CACHE_SIZE 32000000 INNODB_FT_CACHE_SIZE 8000000
select * from information_schema.session_variables where variable_name='innodb_ft_cache_size'; select * from information_schema.session_variables where variable_name='innodb_ft_cache_size';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FT_CACHE_SIZE 32000000 INNODB_FT_CACHE_SIZE 8000000
set global innodb_ft_cache_size=1; set global innodb_ft_cache_size=1;
ERROR HY000: Variable 'innodb_ft_cache_size' is a read only variable ERROR HY000: Variable 'innodb_ft_cache_size' is a read only variable
set session innodb_ft_cache_size=1; set session innodb_ft_cache_size=1;
......
SET @start_global_value = @@global.innodb_ft_enable_diag_print; SET @start_global_value = @@global.innodb_ft_enable_diag_print;
SELECT @start_global_value; SELECT @start_global_value;
@start_global_value @start_global_value
1 0
Valid values are 'ON' and 'OFF' Valid values are 'ON' and 'OFF'
select @@global.innodb_ft_enable_diag_print in (0, 1); select @@global.innodb_ft_enable_diag_print in (0, 1);
@@global.innodb_ft_enable_diag_print in (0, 1) @@global.innodb_ft_enable_diag_print in (0, 1)
1 1
select @@global.innodb_ft_enable_diag_print; select @@global.innodb_ft_enable_diag_print;
@@global.innodb_ft_enable_diag_print @@global.innodb_ft_enable_diag_print
1 0
select @@session.innodb_ft_enable_diag_print; select @@session.innodb_ft_enable_diag_print;
ERROR HY000: Variable 'innodb_ft_enable_diag_print' is a GLOBAL variable ERROR HY000: Variable 'innodb_ft_enable_diag_print' is a GLOBAL variable
show global variables like 'innodb_ft_enable_diag_print'; show global variables like 'innodb_ft_enable_diag_print';
Variable_name Value Variable_name Value
innodb_ft_enable_diag_print ON innodb_ft_enable_diag_print OFF
show session variables like 'innodb_ft_enable_diag_print'; show session variables like 'innodb_ft_enable_diag_print';
Variable_name Value Variable_name Value
innodb_ft_enable_diag_print ON innodb_ft_enable_diag_print OFF
select * from information_schema.global_variables where variable_name='innodb_ft_enable_diag_print'; select * from information_schema.global_variables where variable_name='innodb_ft_enable_diag_print';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FT_ENABLE_DIAG_PRINT ON INNODB_FT_ENABLE_DIAG_PRINT OFF
select * from information_schema.session_variables where variable_name='innodb_ft_enable_diag_print'; select * from information_schema.session_variables where variable_name='innodb_ft_enable_diag_print';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_FT_ENABLE_DIAG_PRINT ON INNODB_FT_ENABLE_DIAG_PRINT OFF
set global innodb_ft_enable_diag_print='OFF'; set global innodb_ft_enable_diag_print='OFF';
select @@global.innodb_ft_enable_diag_print; select @@global.innodb_ft_enable_diag_print;
@@global.innodb_ft_enable_diag_print @@global.innodb_ft_enable_diag_print
...@@ -89,4 +89,4 @@ ERROR 42000: Variable 'innodb_ft_enable_diag_print' can't be set to the value of ...@@ -89,4 +89,4 @@ ERROR 42000: Variable 'innodb_ft_enable_diag_print' can't be set to the value of
SET @@global.innodb_ft_enable_diag_print = @start_global_value; SET @@global.innodb_ft_enable_diag_print = @start_global_value;
SELECT @@global.innodb_ft_enable_diag_print; SELECT @@global.innodb_ft_enable_diag_print;
@@global.innodb_ft_enable_diag_print @@global.innodb_ft_enable_diag_print
1 0
SET @start_innodb_max_capacity = @@global.innodb_io_capacity_max;
SELECT @start_innodb_max_capacity;
@start_innodb_max_capacity
2000
SET @start_innodb_capacity = @@global.innodb_io_capacity;
SELECT @start_innodb_capacity;
@start_innodb_capacity
200
Valid value 100 or more
select @@global.innodb_io_capacity_max > 99;
@@global.innodb_io_capacity_max > 99
1
select @@global.innodb_io_capacity_max;
@@global.innodb_io_capacity_max
2000
select @@session.innodb_io_capacity_max;
ERROR HY000: Variable 'innodb_io_capacity_max' is a GLOBAL variable
show global variables like 'innodb_io_capacity_max';
Variable_name Value
innodb_io_capacity_max 2000
show session variables like 'innodb_io_capacity_max';
Variable_name Value
innodb_io_capacity_max 2000
select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_IO_CAPACITY_MAX 2000
select * from information_schema.session_variables where variable_name='innodb_io_capacity_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_IO_CAPACITY_MAX 2000
set global innodb_io_capacity_max=@start_innodb_capacity + 1;
select @@global.innodb_io_capacity_max;
@@global.innodb_io_capacity_max
201
select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_IO_CAPACITY_MAX 201
select * from information_schema.session_variables where variable_name='innodb_io_capacity_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_IO_CAPACITY_MAX 201
set session innodb_io_capacity_max=444;
ERROR HY000: Variable 'innodb_io_capacity_max' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_io_capacity_max=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_io_capacity_max'
set global innodb_io_capacity_max=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_io_capacity_max'
set global innodb_io_capacity_max="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_io_capacity_max'
set global innodb_io_capacity_max=@start_innodb_capacity - 1;
Warnings:
Warning 1210 innodb_io_capacity_max cannot be set lower than innodb_io_capacity.
Warning 1210 Setting innodb_io_capacity_max to 200
select @@global.innodb_io_capacity_max;
@@global.innodb_io_capacity_max
200
select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_IO_CAPACITY_MAX 200
set global innodb_io_capacity_max=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_io_capacity_max value: '-7'
Warning 1210 innodb_io_capacity_max cannot be set lower than innodb_io_capacity.
Warning 1210 Setting innodb_io_capacity_max to 200
select @@global.innodb_io_capacity_max;
@@global.innodb_io_capacity_max
200
select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_IO_CAPACITY_MAX 200
set global innodb_io_capacity=100;
set global innodb_io_capacity_max=100;
select @@global.innodb_io_capacity_max;
@@global.innodb_io_capacity_max
100
SET @@global.innodb_io_capacity_max = @start_innodb_max_capacity;
SELECT @@global.innodb_io_capacity_max;
@@global.innodb_io_capacity_max
2000
SET @@global.innodb_io_capacity = @start_innodb_capacity;
SELECT @@global.innodb_io_capacity;
@@global.innodb_io_capacity
200
SET @pct_lwm_start_value = @@global.innodb_max_dirty_pages_pct_lwm;
SELECT @pct_lwm_start_value;
@pct_lwm_start_value
0
SET @pct_start_value = @@global.innodb_max_dirty_pages_pct;
SELECT @pct_start_value;
@pct_start_value
75
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
SET @@global.innodb_max_dirty_pages_pct_lwm = DEFAULT;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
0
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_max_dirty_pages_pct_lwm = 1;
ERROR HY000: Variable 'innodb_max_dirty_pages_pct_lwm' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_max_dirty_pages_pct_lwm;
@@innodb_max_dirty_pages_pct_lwm
0
SELECT local.innodb_max_dirty_pages_pct_lwm;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_max_dirty_pages_pct_lwm = 0;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
0
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
0
SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_start_value;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
75
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_max_dirty_pages_pct_lwm = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct_lwm value: '-1'
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
0
SET @@global.innodb_max_dirty_pages_pct_lwm = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct_lwm'
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
0
SET @@global.innodb_max_dirty_pages_pct_lwm = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct_lwm'
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
0
SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_start_value + 1;
Warnings:
Warning 1210 innodb_max_dirty_pages_pct_lwm cannot be set higher than innodb_max_dirty_pages_pct.
Warning 1210 Setting innodb_max_dirty_page_pct_lwm to 75
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
75
SET @@global.innodb_max_dirty_pages_pct_lwm = 100;
Warnings:
Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct_lwm value: '100'
Warning 1210 innodb_max_dirty_pages_pct_lwm cannot be set higher than innodb_max_dirty_pages_pct.
Warning 1210 Setting innodb_max_dirty_page_pct_lwm to 75
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
75
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_max_dirty_pages_pct_lwm =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct_lwm';
@@global.innodb_max_dirty_pages_pct_lwm =
VARIABLE_VALUE
1
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
75
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct_lwm';
VARIABLE_VALUE
75
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_max_dirty_pages_pct_lwm = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct_lwm'
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
75
SET @@global.innodb_max_dirty_pages_pct_lwm = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct_lwm'
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
75
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_max_dirty_pages_pct_lwm = TRUE;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
1
SET @@global.innodb_max_dirty_pages_pct_lwm = FALSE;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
0
SET @@global.innodb_max_dirty_pages_pct = @pct_start_value;
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
75
SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_lwm_start_value;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
0
SET @start_global_value = @@global.innodb_old_blocks_time; SET @start_global_value = @@global.innodb_old_blocks_time;
SELECT @start_global_value; SELECT @start_global_value;
@start_global_value @start_global_value
0 1000
Valid values are zero or above Valid values are zero or above
select @@global.innodb_old_blocks_time >=0; select @@global.innodb_old_blocks_time >=0;
@@global.innodb_old_blocks_time >=0 @@global.innodb_old_blocks_time >=0
1 1
select @@global.innodb_old_blocks_time; select @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time @@global.innodb_old_blocks_time
0 1000
select @@session.innodb_old_blocks_time; select @@session.innodb_old_blocks_time;
ERROR HY000: Variable 'innodb_old_blocks_time' is a GLOBAL variable ERROR HY000: Variable 'innodb_old_blocks_time' is a GLOBAL variable
show global variables like 'innodb_old_blocks_time'; show global variables like 'innodb_old_blocks_time';
Variable_name Value Variable_name Value
innodb_old_blocks_time 0 innodb_old_blocks_time 1000
show session variables like 'innodb_old_blocks_time'; show session variables like 'innodb_old_blocks_time';
Variable_name Value Variable_name Value
innodb_old_blocks_time 0 innodb_old_blocks_time 1000
select * from information_schema.global_variables where variable_name='innodb_old_blocks_time'; select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_TIME 0 INNODB_OLD_BLOCKS_TIME 1000
select * from information_schema.session_variables where variable_name='innodb_old_blocks_time'; select * from information_schema.session_variables where variable_name='innodb_old_blocks_time';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_TIME 0 INNODB_OLD_BLOCKS_TIME 1000
set global innodb_old_blocks_time=10; set global innodb_old_blocks_time=10;
select @@global.innodb_old_blocks_time; select @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time @@global.innodb_old_blocks_time
...@@ -53,4 +53,4 @@ INNODB_OLD_BLOCKS_TIME 0 ...@@ -53,4 +53,4 @@ INNODB_OLD_BLOCKS_TIME 0
SET @@global.innodb_old_blocks_time = @start_global_value; SET @@global.innodb_old_blocks_time = @start_global_value;
SELECT @@global.innodb_old_blocks_time; SELECT @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time @@global.innodb_old_blocks_time
0 1000
SET @start_global_value = @@global.innodb_online_alter_log_max_size;
SELECT @start_global_value;
@start_global_value
134217728
select @@global.innodb_online_alter_log_max_size >= 524288;
@@global.innodb_online_alter_log_max_size >= 524288
1
select @@global.innodb_online_alter_log_max_size;
@@global.innodb_online_alter_log_max_size
134217728
select @@session.innodb_online_alter_log_max_size;
ERROR HY000: Variable 'innodb_online_alter_log_max_size' is a GLOBAL variable
show global variables like 'innodb_online_alter_log_max_size';
Variable_name Value
innodb_online_alter_log_max_size 134217728
show session variables like 'innodb_online_alter_log_max_size';
Variable_name Value
innodb_online_alter_log_max_size 134217728
select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ONLINE_ALTER_LOG_MAX_SIZE 134217728
select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ONLINE_ALTER_LOG_MAX_SIZE 134217728
set global innodb_online_alter_log_max_size=1048576;
select @@global.innodb_online_alter_log_max_size;
@@global.innodb_online_alter_log_max_size
1048576
select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ONLINE_ALTER_LOG_MAX_SIZE 1048576
select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ONLINE_ALTER_LOG_MAX_SIZE 1048576
set @@global.innodb_online_alter_log_max_size=524288;
select @@global.innodb_online_alter_log_max_size;
@@global.innodb_online_alter_log_max_size
524288
select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ONLINE_ALTER_LOG_MAX_SIZE 524288
select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
VARIABLE_NAME VARIABLE_VALUE
INNODB_ONLINE_ALTER_LOG_MAX_SIZE 524288
set session innodb_online_alter_log_max_size='some';
ERROR HY000: Variable 'innodb_online_alter_log_max_size' is a GLOBAL variable and should be set with SET GLOBAL
set @@session.innodb_online_alter_log_max_size='some';
ERROR HY000: Variable 'innodb_online_alter_log_max_size' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_online_alter_log_max_size=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_online_alter_log_max_size'
set global innodb_online_alter_log_max_size='foo';
ERROR 42000: Incorrect argument type to variable 'innodb_online_alter_log_max_size'
set global innodb_online_alter_log_max_size=-2;
Warnings:
Warning 1292 Truncated incorrect innodb_online_alter_log_max_size value: '-2'
set global innodb_online_alter_log_max_size=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_online_alter_log_max_size'
set global innodb_online_alter_log_max_size=2;
Warnings:
Warning 1292 Truncated incorrect innodb_online_alter_log_max_size value: '2'
SET @@global.innodb_online_alter_log_max_size = @start_global_value;
SELECT @@global.innodb_online_alter_log_max_size;
@@global.innodb_online_alter_log_max_size
134217728
SELECT name, count
FROM information_schema.innodb_metrics
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
name count
purge_stop_count 0
purge_resume_count 0
SET @orig = @@global.innodb_purge_run_now;
SELECT @orig;
@orig
0
SET GLOBAL innodb_purge_stop_now = ON;
SELECT name, count
FROM information_schema.innodb_metrics
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
name count
purge_stop_count 1
purge_resume_count 0
SET GLOBAL innodb_purge_run_now = ON;
SELECT @@global.innodb_purge_run_now;
@@global.innodb_purge_run_now
0
SELECT name, count
FROM information_schema.innodb_metrics
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
name count
purge_stop_count 1
purge_resume_count 1
SELECT name, count
FROM information_schema.innodb_metrics
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
name count
purge_stop_count 0
purge_resume_count 0
SET @orig = @@global.innodb_purge_run_now;
SELECT @orig;
@orig
0
SET GLOBAL innodb_purge_stop_now = ON;
SELECT name, count
FROM information_schema.innodb_metrics
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
name count
purge_stop_count 1
purge_resume_count 0
SET GLOBAL innodb_purge_run_now = ON;
SELECT @@global.innodb_purge_run_now;
@@global.innodb_purge_run_now
0
SELECT name, count
FROM information_schema.innodb_metrics
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
name count
purge_stop_count 1
purge_resume_count 1
Valid values are 'ON' and 'OFF'
select @@global.innodb_read_only;
@@global.innodb_read_only
0
select @@session.innodb_read_only;
ERROR HY000: Variable 'innodb_read_only' is a GLOBAL variable
show global variables like 'innodb_read_only';
Variable_name Value
innodb_read_only OFF
show session variables like 'innodb_read_only';
Variable_name Value
innodb_read_only OFF
select * from information_schema.global_variables where variable_name='innodb_read_only';
VARIABLE_NAME VARIABLE_VALUE
INNODB_READ_ONLY OFF
select * from information_schema.session_variables where variable_name='innodb_read_only';
VARIABLE_NAME VARIABLE_VALUE
INNODB_READ_ONLY OFF
set global innodb_read_only=1;
ERROR HY000: Variable 'innodb_read_only' is a read only variable
set session innodb_read_only=1;
ERROR HY000: Variable 'innodb_read_only' is a read only variable
SELECT @@innodb_stats_auto_recalc;
@@innodb_stats_auto_recalc
1
SET GLOBAL innodb_stats_auto_recalc=ON;
SELECT @@innodb_stats_auto_recalc;
@@innodb_stats_auto_recalc
1
SET GLOBAL innodb_stats_auto_recalc=OFF;
SELECT @@innodb_stats_auto_recalc;
@@innodb_stats_auto_recalc
0
SET GLOBAL innodb_stats_auto_recalc=1;
SELECT @@innodb_stats_auto_recalc;
@@innodb_stats_auto_recalc
1
SET GLOBAL innodb_stats_auto_recalc=0;
SELECT @@innodb_stats_auto_recalc;
@@innodb_stats_auto_recalc
0
SET GLOBAL innodb_stats_auto_recalc=123;
ERROR 42000: Variable 'innodb_stats_auto_recalc' can't be set to the value of '123'
SET GLOBAL innodb_stats_auto_recalc='foo';
ERROR 42000: Variable 'innodb_stats_auto_recalc' can't be set to the value of 'foo'
SET GLOBAL innodb_stats_auto_recalc=default;
SET @start_global_value = @@global.innodb_stats_on_metadata; SET @start_global_value = @@global.innodb_stats_on_metadata;
SELECT @start_global_value; SELECT @start_global_value;
@start_global_value @start_global_value
1 0
Valid values are 'ON' and 'OFF' Valid values are 'ON' and 'OFF'
select @@global.innodb_stats_on_metadata in (0, 1); select @@global.innodb_stats_on_metadata in (0, 1);
@@global.innodb_stats_on_metadata in (0, 1) @@global.innodb_stats_on_metadata in (0, 1)
1 1
select @@global.innodb_stats_on_metadata; select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata @@global.innodb_stats_on_metadata
1 0
select @@session.innodb_stats_on_metadata; select @@session.innodb_stats_on_metadata;
ERROR HY000: Variable 'innodb_stats_on_metadata' is a GLOBAL variable ERROR HY000: Variable 'innodb_stats_on_metadata' is a GLOBAL variable
show global variables like 'innodb_stats_on_metadata'; show global variables like 'innodb_stats_on_metadata';
Variable_name Value Variable_name Value
innodb_stats_on_metadata ON innodb_stats_on_metadata OFF
show session variables like 'innodb_stats_on_metadata'; show session variables like 'innodb_stats_on_metadata';
Variable_name Value Variable_name Value
innodb_stats_on_metadata ON innodb_stats_on_metadata OFF
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata'; select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA ON INNODB_STATS_ON_METADATA OFF
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata'; select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA ON INNODB_STATS_ON_METADATA OFF
set global innodb_stats_on_metadata='OFF'; set global innodb_stats_on_metadata='OFF';
select @@global.innodb_stats_on_metadata; select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata @@global.innodb_stats_on_metadata
...@@ -89,4 +89,4 @@ ERROR 42000: Variable 'innodb_stats_on_metadata' can't be set to the value of 'A ...@@ -89,4 +89,4 @@ ERROR 42000: Variable 'innodb_stats_on_metadata' can't be set to the value of 'A
SET @@global.innodb_stats_on_metadata = @start_global_value; SET @@global.innodb_stats_on_metadata = @start_global_value;
SELECT @@global.innodb_stats_on_metadata; SELECT @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata @@global.innodb_stats_on_metadata
1 0
SELECT @@innodb_stats_persistent;
@@innodb_stats_persistent
0
SET GLOBAL innodb_stats_persistent=ON;
SELECT @@innodb_stats_persistent;
@@innodb_stats_persistent
1
SET GLOBAL innodb_stats_persistent=OFF;
SELECT @@innodb_stats_persistent;
@@innodb_stats_persistent
0
SET GLOBAL innodb_stats_persistent=1;
SELECT @@innodb_stats_persistent;
@@innodb_stats_persistent
1
SET GLOBAL innodb_stats_persistent=0;
SELECT @@innodb_stats_persistent;
@@innodb_stats_persistent
0
SET GLOBAL innodb_stats_persistent=123;
ERROR 42000: Variable 'innodb_stats_persistent' can't be set to the value of '123'
SET GLOBAL innodb_stats_persistent='foo';
ERROR 42000: Variable 'innodb_stats_persistent' can't be set to the value of 'foo'
SET GLOBAL innodb_stats_persistent=off;
SET @start_value = @@global.max_connect_errors; SET @start_value = @@global.max_connect_errors;
SELECT @start_value; SELECT @start_value;
@start_value @start_value
10 100
'#--------------------FN_DYNVARS_073_01------------------------#' '#--------------------FN_DYNVARS_073_01------------------------#'
SET @@global.max_connect_errors = 5000; SET @@global.max_connect_errors = 5000;
SET @@global.max_connect_errors = DEFAULT; SET @@global.max_connect_errors = DEFAULT;
SELECT @@global.max_connect_errors; SELECT @@global.max_connect_errors;
@@global.max_connect_errors @@global.max_connect_errors
10 100
'#---------------------FN_DYNVARS_073_02-------------------------#' '#---------------------FN_DYNVARS_073_02-------------------------#'
SET @@global.max_connect_errors = @start_value; SET @@global.max_connect_errors = @start_value;
SELECT @@global.max_connect_errors = 10; SELECT @@global.max_connect_errors = 10;
@@global.max_connect_errors = 10 @@global.max_connect_errors = 10
1 0
'#--------------------FN_DYNVARS_073_03------------------------#' '#--------------------FN_DYNVARS_073_03------------------------#'
SET @@global.max_connect_errors = 4096; SET @@global.max_connect_errors = 4096;
SELECT @@global.max_connect_errors; SELECT @@global.max_connect_errors;
...@@ -131,4 +131,4 @@ ERROR 42S22: Unknown column 'max_connect_errors' in 'field list' ...@@ -131,4 +131,4 @@ ERROR 42S22: Unknown column 'max_connect_errors' in 'field list'
SET @@global.max_connect_errors = @start_value; SET @@global.max_connect_errors = @start_value;
SELECT @@global.max_connect_errors; SELECT @@global.max_connect_errors;
@@global.max_connect_errors @@global.max_connect_errors
10 100
####################################################################
# Displaying default value #
####################################################################
SELECT @@GLOBAL.metadata_locks_hash_instances;
@@GLOBAL.metadata_locks_hash_instances
8
####################################################################
# Check that value cannot be set (this variable is settable only #
# at start-up). #
####################################################################
SET @@GLOBAL.metadata_locks_hash_instances=1;
ERROR HY000: Variable 'metadata_locks_hash_instances' is a read only variable
SELECT @@GLOBAL.metadata_locks_hash_instances;
@@GLOBAL.metadata_locks_hash_instances
8
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
SELECT @@GLOBAL.metadata_locks_hash_instances = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='metadata_locks_hash_instances';
@@GLOBAL.metadata_locks_hash_instances = VARIABLE_VALUE
1
SELECT @@GLOBAL.metadata_locks_hash_instances;
@@GLOBAL.metadata_locks_hash_instances
8
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='metadata_locks_hash_instances';
VARIABLE_VALUE
8
######################################################################
# Check if accessing variable with and without GLOBAL point to same #
# variable #
######################################################################
SELECT @@metadata_locks_hash_instances = @@GLOBAL.metadata_locks_hash_instances;
@@metadata_locks_hash_instances = @@GLOBAL.metadata_locks_hash_instances
1
######################################################################
# Check if variable has only the GLOBAL scope #
######################################################################
SELECT @@metadata_locks_hash_instances;
@@metadata_locks_hash_instances
8
SELECT @@GLOBAL.metadata_locks_hash_instances;
@@GLOBAL.metadata_locks_hash_instances
8
SELECT @@local.metadata_locks_hash_instances;
ERROR HY000: Variable 'metadata_locks_hash_instances' is a GLOBAL variable
SELECT @@SESSION.metadata_locks_hash_instances;
ERROR HY000: Variable 'metadata_locks_hash_instances' is a GLOBAL variable
select @@global.performance_schema_session_connect_attrs_size;
@@global.performance_schema_session_connect_attrs_size
2048
select @@session.performance_schema_session_connect_attrs_size;
ERROR HY000: Variable 'performance_schema_session_connect_attrs_size' is a GLOBAL variable
show global variables like 'performance_schema_session_connect_attrs_size';
Variable_name Value
performance_schema_session_connect_attrs_size 2048
show session variables like 'performance_schema_session_connect_attrs_size';
Variable_name Value
performance_schema_session_connect_attrs_size 2048
select * from information_schema.global_variables
where variable_name='performance_schema_session_connect_attrs_size';
VARIABLE_NAME VARIABLE_VALUE
PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE 2048
select * from information_schema.session_variables
where variable_name='performance_schema_session_connect_attrs_size';
VARIABLE_NAME VARIABLE_VALUE
PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE 2048
set global performance_schema_session_connect_attrs_size=1;
ERROR HY000: Variable 'performance_schema_session_connect_attrs_size' is a read only variable
set session performance_schema_session_connect_attrs_size=1;
ERROR HY000: Variable 'performance_schema_session_connect_attrs_size' is a read only variable
--source include/not_embedded.inc
#
# Only global
#
select @@global.host_cache_size;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.host_cache_size;
show global variables like 'host_cache_size';
show session variables like 'host_cache_size';
select * from information_schema.global_variables
where variable_name='host_cache_size';
select * from information_schema.session_variables
where variable_name='host_cache_size';
#
# Read-Write
#
set global host_cache_size=1;
select @@global.host_cache_size;
set global host_cache_size=12;
select @@global.host_cache_size;
set global host_cache_size=0;
select @@global.host_cache_size;
--error ER_GLOBAL_VARIABLE
set session host_cache_size=1;
# Restore default
set global host_cache_size=123;
select @@global.host_cache_size;
############ mysql-test\t\innodb_adaptive_flushing_lwm_basic.test #############
# #
# Variable Name: innodb_adaptive_flushing_lwm #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 10 #
# Range: 0-70 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Rizwan #
# #
#Description:Test Cases of Dynamic System Variable innodb_adaptive_flushing_lwm #
# that checks the behavior of this variable in the following ways #
# * Default Value #
# * Valid & Invalid values #
# * Scope & Access method #
# * Data Integrity #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--source include/have_innodb.inc
--source include/load_sysvars.inc
########################################################################
# START OF innodb_adaptive_flushing_lwm TESTS #
########################################################################
###############################################################################
#Saving initial value of innodb_adaptive_flushing_lwm in a temporary variable #
###############################################################################
SET @global_start_value = @@global.innodb_adaptive_flushing_lwm;
SELECT @global_start_value;
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
########################################################################
# Display the DEFAULT value of innodb_adaptive_flushing_lwm #
########################################################################
SET @@global.innodb_adaptive_flushing_lwm = 1;
SET @@global.innodb_adaptive_flushing_lwm = DEFAULT;
SELECT @@global.innodb_adaptive_flushing_lwm;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
###################################################################################
# Check if innodb_adaptive_flushing_lwm can be accessed with and without @@ sign #
###################################################################################
--Error ER_GLOBAL_VARIABLE
SET innodb_adaptive_flushing_lwm = 1;
SELECT @@innodb_adaptive_flushing_lwm;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_adaptive_flushing_lwm;
SET global innodb_adaptive_flushing_lwm = 1;
SELECT @@global.innodb_adaptive_flushing_lwm;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
###############################################################################
# change the value of innodb_adaptive_flushing_lwm to a valid value #
###############################################################################
SET @@global.innodb_adaptive_flushing_lwm = 1;
SELECT @@global.innodb_adaptive_flushing_lwm;
SET @@global.innodb_adaptive_flushing_lwm = 60;
SELECT @@global.innodb_adaptive_flushing_lwm;
SET @@global.innodb_adaptive_flushing_lwm = 70;
SELECT @@global.innodb_adaptive_flushing_lwm;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
###########################################################################
# Change the value of innodb_adaptive_flushing_lwm to invalid value #
###########################################################################
SET @@global.innodb_adaptive_flushing_lwm = -1;
SELECT @@global.innodb_adaptive_flushing_lwm;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_adaptive_flushing_lwm = "T";
SELECT @@global.innodb_adaptive_flushing_lwm;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_adaptive_flushing_lwm = "Y";
SELECT @@global.innodb_adaptive_flushing_lwm;
SET @@global.innodb_adaptive_flushing_lwm = 71;
SELECT @@global.innodb_adaptive_flushing_lwm;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
SELECT @@global.innodb_adaptive_flushing_lwm =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_adaptive_flushing_lwm';
SELECT @@global.innodb_adaptive_flushing_lwm;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_adaptive_flushing_lwm';
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_adaptive_flushing_lwm = OFF;
SELECT @@global.innodb_adaptive_flushing_lwm;
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_adaptive_flushing_lwm = ON;
SELECT @@global.innodb_adaptive_flushing_lwm;
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.innodb_adaptive_flushing_lwm = TRUE;
SELECT @@global.innodb_adaptive_flushing_lwm;
SET @@global.innodb_adaptive_flushing_lwm = FALSE;
SELECT @@global.innodb_adaptive_flushing_lwm;
##############################
# Restore initial value #
##############################
SET @@global.innodb_adaptive_flushing_lwm = @global_start_value;
SELECT @@global.innodb_adaptive_flushing_lwm;
###############################################################
# END OF innodb_adaptive_flushing_lwm TESTS #
###############################################################
# 2010-01-25 - Added
#
--source include/have_innodb.inc
SET @start_global_value = @@global.innodb_analyze_is_persistent;
SELECT @start_global_value;
#
# exists as global only
#
--echo Valid values are 'ON' and 'OFF'
SELECT @@global.innodb_analyze_is_persistent in (0, 1);
SELECT @@global.innodb_analyze_is_persistent;
#--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.innodb_analyze_is_persistent;
SHOW global variables LIKE 'innodb_analyze_is_persistent';
SHOW session variables LIKE 'innodb_analyze_is_persistent';
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_analyze_is_persistent';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_analyze_is_persistent';
#
# SHOW that it's writable
#
SET global innodb_analyze_is_persistent='OFF';
SELECT @@global.innodb_analyze_is_persistent;
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_analyze_is_persistent';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_analyze_is_persistent';
SET @@global.innodb_analyze_is_persistent=1;
SELECT @@global.innodb_analyze_is_persistent;
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_analyze_is_persistent';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_analyze_is_persistent';
SET global innodb_analyze_is_persistent=0;
SELECT @@global.innodb_analyze_is_persistent;
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_analyze_is_persistent';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_analyze_is_persistent';
SET @@global.innodb_analyze_is_persistent='ON';
SELECT @@global.innodb_analyze_is_persistent;
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_analyze_is_persistent';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_analyze_is_persistent';
#--error ER_GLOBAL_VARIABLE
SET session innodb_analyze_is_persistent='OFF';
#--error ER_GLOBAL_VARIABLE
SET @@session.innodb_analyze_is_persistent='ON';
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
SET global innodb_analyze_is_persistent=1.1;
--error ER_WRONG_TYPE_FOR_VAR
SET global innodb_analyze_is_persistent=1e1;
--error ER_WRONG_VALUE_FOR_VAR
SET global innodb_analyze_is_persistent=2;
--error ER_WRONG_VALUE_FOR_VAR
SET global innodb_analyze_is_persistent=-3;
SELECT @@global.innodb_analyze_is_persistent;
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_analyze_is_persistent';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_analyze_is_persistent';
--error ER_WRONG_VALUE_FOR_VAR
SET global innodb_analyze_is_persistent='AUTO';
#
# Cleanup
#
SET @@global.innodb_analyze_is_persistent = @start_global_value;
SELECT @@global.innodb_analyze_is_persistent;
#
# 2012-08-01 Added
#
--source include/have_innodb.inc
SET @start_global_value = @@global.innodb_api_bk_commit_interval;
SELECT @start_global_value;
#
# exists as global only
#
--echo Valid values are positive number
SELECT @@global.innodb_api_bk_commit_interval > 0;
SELECT @@global.innodb_api_bk_commit_interval <= 1024*1024*1024;
SELECT @@global.innodb_api_bk_commit_interval;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.innodb_api_bk_commit_interval;
SHOW global variables LIKE 'innodb_api_bk_commit_interval';
SHOW session variables LIKE 'innodb_api_bk_commit_interval';
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_bk_commit_interval';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_api_bk_commit_interval';
#
# show that it's writable
#
SET global innodb_api_bk_commit_interval=100;
SELECT @@global.innodb_api_bk_commit_interval;
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_bk_commit_interval';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_api_bk_commit_interval';
--error ER_GLOBAL_VARIABLE
SET session innodb_api_bk_commit_interval=1;
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
SET global innodb_api_bk_commit_interval=1.1;
--error ER_WRONG_TYPE_FOR_VAR
SET global innodb_api_bk_commit_interval=1e1;
--error ER_WRONG_TYPE_FOR_VAR
SET global innodb_api_bk_commit_interval="foo";
SET global innodb_api_bk_commit_interval=-7;
SELECT @@global.innodb_api_bk_commit_interval;
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_bk_commit_interval';
#
# cleanup
#
SET @@global.innodb_api_bk_commit_interval = @start_global_value;
SELECT @@global.innodb_api_bk_commit_interval;
################## mysql-test\t\innodb_api_disable_rowlock_basic.test ##############
# #
# Variable Name: innodb_api_disable_rowlock #
# Scope: Global #
# Access Type: Static #
# Data Type: numeric #
# #
# #
# Creation Date: 2008-02-07 #
# Author : Sharique Abdullah #
# #
# #
# Description:Test Cases of Dynamic System Variable innodb_api_disable_rowlock #
# that checks the behavior of this variable in the following ways #
# * Value Check #
# * Scope Check #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--source include/have_innodb.inc
--echo '#---------------------BS_STVARS_035_01----------------------#'
####################################################################
# Displaying default value #
####################################################################
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_02----------------------#'
####################################################################
# Check if Value can set #
####################################################################
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.innodb_api_disable_rowlock=1;
--echo Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_03----------------------#'
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
SELECT IF(@@GLOBAL.innodb_api_disable_rowlock, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_disable_rowlock';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_disable_rowlock';
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_04----------------------#'
################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
################################################################################
SELECT @@innodb_api_disable_rowlock = @@GLOBAL.innodb_api_enable_binlog;
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_05----------------------#'
################################################################################
# Check if innodb_log_file_size can be accessed with and without @@ sign #
################################################################################
SELECT COUNT(@@innodb_api_disable_rowlock);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.innodb_api_disable_rowlock);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.innodb_api_disable_rowlock);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
--echo 1 Expected
--Error ER_BAD_FIELD_ERROR
SELECT innodb_api_disable_rowlock = @@SESSION.innodb_api_enable_binlog;
--echo Expected error 'Readonly variable'
################## mysql-test\t\innodb_api_enable_binlog_basic.test ##############
# #
# Variable Name: innodb_api_enable_binlog #
# Scope: Global #
# Access Type: Static #
# Data Type: numeric #
# #
# #
# Creation Date: 2008-02-07 #
# Author : Sharique Abdullah #
# #
# #
# Description:Test Cases of Dynamic System Variable innodb_api_enable_binlog #
# that checks the behavior of this variable in the following ways #
# * Value Check #
# * Scope Check #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--source include/have_innodb.inc
--echo '#---------------------BS_STVARS_035_01----------------------#'
####################################################################
# Displaying default value #
####################################################################
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_02----------------------#'
####################################################################
# Check if Value can set #
####################################################################
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.innodb_api_enable_binlog=1;
--echo Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_03----------------------#'
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
SELECT IF(@@GLOBAL.innodb_api_enable_binlog, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_enable_binlog';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_enable_binlog';
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_04----------------------#'
################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
################################################################################
SELECT @@innodb_api_enable_binlog = @@GLOBAL.innodb_api_enable_binlog;
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_05----------------------#'
################################################################################
# Check if innodb_log_file_size can be accessed with and without @@ sign #
################################################################################
SELECT COUNT(@@innodb_api_enable_binlog);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.innodb_api_enable_binlog);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.innodb_api_enable_binlog);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
--echo 1 Expected
--Error ER_BAD_FIELD_ERROR
SELECT innodb_api_enable_binlog = @@SESSION.innodb_api_enable_binlog;
--echo Expected error 'Readonly variable'
################## mysql-test\t\innodb_api_enable_mdl_basic.test ##############
# #
# Variable Name: innodb_api_enable_mdl #
# Scope: Global #
# Access Type: Static #
# Data Type: numeric #
# #
# #
# Creation Date: 2008-02-07 #
# Author : Sharique Abdullah #
# #
# #
# Description:Test Cases of Dynamic System Variable innodb_api_enable_mdl #
# that checks the behavior of this variable in the following ways #
# * Value Check #
# * Scope Check #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--source include/have_innodb.inc
--echo '#---------------------BS_STVARS_035_01----------------------#'
####################################################################
# Displaying default value #
####################################################################
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_02----------------------#'
####################################################################
# Check if Value can set #
####################################################################
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.innodb_api_enable_mdl=1;
--echo Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_03----------------------#'
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
SELECT IF(@@GLOBAL.innodb_api_enable_mdl, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_enable_mdl';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_enable_mdl';
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_04----------------------#'
################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
################################################################################
SELECT @@innodb_api_enable_mdl = @@GLOBAL.innodb_api_enable_mdl;
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_05----------------------#'
################################################################################
# Check if innodb_log_file_size can be accessed with and without @@ sign #
################################################################################
SELECT COUNT(@@innodb_api_enable_mdl);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.innodb_api_enable_mdl);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.innodb_api_enable_mdl);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
--echo 1 Expected
--Error ER_BAD_FIELD_ERROR
SELECT innodb_api_enable_mdl = @@SESSION.innodb_api_enable_mdl;
--echo Expected error 'Readonly variable'
#
# 2011-08-01 Added
#
--source include/have_innodb.inc
SET @start_global_value = @@global.innodb_api_trx_level;
SELECT @start_global_value;
#
# exists as global only
#
--echo Valid values are zero or above
SELECT @@global.innodb_api_trx_level >=0;
SELECT @@global.innodb_api_trx_level <=3;
SELECT @@global.innodb_api_trx_level;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.innodb_api_trx_level;
SHOW global variables LIKE 'innodb_api_trx_level';
SHOW session variables LIKE 'innodb_api_trx_level';
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_trx_level';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_api_trx_level';
#
# show that it's writable
#
SET global innodb_api_trx_level=100;
SELECT @@global.innodb_api_trx_level;
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_trx_level';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_api_trx_level';
--error ER_GLOBAL_VARIABLE
SET session innodb_api_trx_level=1;
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
SET global innodb_api_trx_level=1.1;
--error ER_WRONG_TYPE_FOR_VAR
SET global innodb_api_trx_level=1e1;
--error ER_WRONG_TYPE_FOR_VAR
SET global innodb_api_trx_level="foo";
SET global innodb_api_trx_level=-7;
SELECT @@global.innodb_api_trx_level;
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_trx_level';
#
# cleanup
#
SET @@global.innodb_api_trx_level = @start_global_value;
SELECT @@global.innodb_api_trx_level;
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Scope: GLOBAL # # Scope: GLOBAL #
# Access Type: Dynamic # # Access Type: Dynamic #
# Data Type: Numeric # # Data Type: Numeric #
# Default Value: 8 # # Default Value: 64 #
# Range: 0,1 # # Range: 0,1 #
# # # #
# # # #
......
-- source include/have_innodb.inc
# CREATE TABLE ... KEY_BLOCK_SIZE=8; does not work with page size = 4k
-- source include/have_innodb_16k.inc
# Check the default value
SELECT @@global.innodb_cmp_per_index_enabled;
# should be a boolean
-- error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL innodb_stats_persistent=123;
-- error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL innodb_stats_persistent='foo';
# Check that changing value works and that setting the same value again
# is as expected
SET GLOBAL innodb_cmp_per_index_enabled=ON;
SELECT @@global.innodb_cmp_per_index_enabled;
SET GLOBAL innodb_cmp_per_index_enabled=ON;
SELECT @@global.innodb_cmp_per_index_enabled;
SET GLOBAL innodb_cmp_per_index_enabled=OFF;
SELECT @@global.innodb_cmp_per_index_enabled;
SET GLOBAL innodb_cmp_per_index_enabled=OFF;
SELECT @@global.innodb_cmp_per_index_enabled;
SET GLOBAL innodb_file_format=Barracuda;
-- vertical_results
# Check that enabling after being disabled resets the stats
SET GLOBAL innodb_cmp_per_index_enabled=ON;
CREATE TABLE t (a INT) ENGINE=INNODB KEY_BLOCK_SIZE=8;
INSERT INTO t VALUES (1);
SELECT * FROM information_schema.innodb_cmp_per_index;
SET GLOBAL innodb_cmp_per_index_enabled=OFF;
SET GLOBAL innodb_cmp_per_index_enabled=ON;
SELECT * FROM information_schema.innodb_cmp_per_index;
DROP TABLE t;
# Check that enabling after being enabled does not reset the stats
SET GLOBAL innodb_cmp_per_index_enabled=ON;
CREATE TABLE t (a INT) ENGINE=INNODB KEY_BLOCK_SIZE=8;
INSERT INTO t VALUES (1);
SELECT * FROM information_schema.innodb_cmp_per_index;
SET GLOBAL innodb_cmp_per_index_enabled=ON;
SELECT * FROM information_schema.innodb_cmp_per_index;
DROP TABLE t;
#
SET GLOBAL innodb_file_format=default;
SET GLOBAL innodb_cmp_per_index_enabled=default;
##### mysql-test\t\innodb_compression_failure_threshold_pct_basic.test ########
# #
# Variable Name: innodb_compression_failure_threshold_pct #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 5 #
# Range: 0-100 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Rizwan #
# #
#Description: Test Cases of Dynamic System Variable #
# innodb_compression_failure_threshold_pct #
# that checks the behavior of #
# this variable in the following ways #
# * Default Value #
# * Valid & Invalid values #
# * Scope & Access method #
# * Data Integrity #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--source include/have_innodb.inc
--source include/load_sysvars.inc
######################################################################
# START OF innodb_compression_failure_threshold_pct TESTS #
######################################################################
############################################################################################
# Saving initial value of innodb_compression_failure_threshold_pct in a temporary variable #
############################################################################################
SET @global_start_value = @@global.innodb_compression_failure_threshold_pct;
SELECT @global_start_value;
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
########################################################################
# Display the DEFAULT value of innodb_compression_failure_threshold_pct#
########################################################################
SET @@global.innodb_compression_failure_threshold_pct = 0;
SET @@global.innodb_compression_failure_threshold_pct = DEFAULT;
SELECT @@global.innodb_compression_failure_threshold_pct;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
##############################################################################################
# check if innodb_compression_failure_threshold_pct can be accessed with and without @@ sign #
##############################################################################################
--Error ER_GLOBAL_VARIABLE
SET innodb_compression_failure_threshold_pct = 1;
SELECT @@innodb_compression_failure_threshold_pct;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_compression_failure_threshold_pct;
SET global innodb_compression_failure_threshold_pct = 0;
SELECT @@global.innodb_compression_failure_threshold_pct;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
#################################################################################
# change the value of innodb_compression_failure_threshold_pct to a valid value #
#################################################################################
SET @@global.innodb_compression_failure_threshold_pct = 0;
SELECT @@global.innodb_compression_failure_threshold_pct;
SET @@global.innodb_compression_failure_threshold_pct = 1;
SELECT @@global.innodb_compression_failure_threshold_pct;
SET @@global.innodb_compression_failure_threshold_pct = 100;
SELECT @@global.innodb_compression_failure_threshold_pct;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
################################################################################
# Cange the value of innodb_compression_failure_threshold_pct to invalid value #
################################################################################
SET @@global.innodb_compression_failure_threshold_pct = -1;
SELECT @@global.innodb_compression_failure_threshold_pct;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_compression_failure_threshold_pct = "T";
SELECT @@global.innodb_compression_failure_threshold_pct;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_compression_failure_threshold_pct = "Y";
SELECT @@global.innodb_compression_failure_threshold_pct;
SET @@global.innodb_compression_failure_threshold_pct = 101;
SELECT @@global.innodb_compression_failure_threshold_pct;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
SELECT @@global.innodb_compression_failure_threshold_pct =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_compression_failure_threshold_pct';
SELECT @@global.innodb_compression_failure_threshold_pct;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_compression_failure_threshold_pct';
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_compression_failure_threshold_pct = OFF;
SELECT @@global.innodb_compression_failure_threshold_pct;
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_compression_failure_threshold_pct = ON;
SELECT @@global.innodb_compression_failure_threshold_pct;
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.innodb_compression_failure_threshold_pct = TRUE;
SELECT @@global.innodb_compression_failure_threshold_pct;
SET @@global.innodb_compression_failure_threshold_pct = FALSE;
SELECT @@global.innodb_compression_failure_threshold_pct;
##############################
# Restore initial value #
##############################
SET @@global.innodb_compression_failure_threshold_pct = @global_start_value;
SELECT @@global.innodb_compression_failure_threshold_pct;
###############################################################
# END OF innodb_compression_failure_threshold_pct TESTS #
###############################################################
# 2012-05-29 - Added
#
--source include/have_innodb.inc
SET @start_global_value = @@global.innodb_compression_level;
SELECT @start_global_value;
#
# exists as global only
#
--echo Valid value 0-9
select @@global.innodb_compression_level <= 9;
select @@global.innodb_compression_level;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_compression_level;
show global variables like 'innodb_compression_level';
show session variables like 'innodb_compression_level';
select * from information_schema.global_variables where variable_name='innodb_compression_level';
select * from information_schema.session_variables where variable_name='innodb_compression_level';
#
# show that it's writable
#
set global innodb_compression_level=2;
select @@global.innodb_compression_level;
select * from information_schema.global_variables where variable_name='innodb_compression_level';
select * from information_schema.session_variables where variable_name='innodb_compression_level';
--error ER_GLOBAL_VARIABLE
set session innodb_compression_level=4;
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_compression_level=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_compression_level=1e1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_compression_level="foo";
set global innodb_compression_level=10;
select @@global.innodb_compression_level;
select * from information_schema.global_variables where variable_name='innodb_compression_level';
set global innodb_compression_level=-7;
select @@global.innodb_compression_level;
select * from information_schema.global_variables where variable_name='innodb_compression_level';
#
# min/max values
#
set global innodb_compression_level=0;
select @@global.innodb_compression_level;
set global innodb_compression_level=9;
select @@global.innodb_compression_level;
#
# cleanup
#
SET @@global.innodb_compression_level = @start_global_value;
SELECT @@global.innodb_compression_level;
############# mysql-test\t\innodb_compression_pad_pct_max_basic.test ##########
# #
# Variable Name: innodb_compression_pad_pct_max #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 50 #
# Range: 0-75 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Rizwan #
# #
#Description: Test Cases of Dynamic System Variable #
# innodb_compression_pad_pct_max #
# that checks the behavior of #
# this variable in the following ways #
# * Default Value #
# * Valid & Invalid values #
# * Scope & Access method #
# * Data Integrity #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--source include/have_innodb.inc
--source include/load_sysvars.inc
######################################################################
# START OF innodb_compression_pad_pct_max TESTS #
######################################################################
############################################################################################
# Saving initial value of innodb_compression_pad_pct_max in a temporary variable #
############################################################################################
SET @global_start_value = @@global.innodb_compression_pad_pct_max;
SELECT @global_start_value;
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
########################################################################
# Display the DEFAULT value of innodb_compression_pad_pct_max #
########################################################################
SET @@global.innodb_compression_pad_pct_max = DEFAULT;
SELECT @@global.innodb_compression_pad_pct_max;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
##############################################################################################
# check if innodb_compression_pad_pct_max can be accessed with and without @@ sign #
##############################################################################################
--Error ER_GLOBAL_VARIABLE
SET innodb_compression_pad_pct_max = 1;
SELECT @@innodb_compression_pad_pct_max;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_compression_pad_pct_max;
SET global innodb_compression_pad_pct_max = 0;
SELECT @@global.innodb_compression_pad_pct_max;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
#################################################################################
# change the value of innodb_compression_pad_pct_max to a valid value #
#################################################################################
SET @@global.innodb_compression_pad_pct_max = 0;
SELECT @@global.innodb_compression_pad_pct_max;
SET @@global.innodb_compression_pad_pct_max = 75;
SELECT @@global.innodb_compression_pad_pct_max;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
################################################################################
# Cange the value of innodb_compression_pad_pct_max to invalid value #
################################################################################
SET @@global.innodb_compression_pad_pct_max = -1;
SELECT @@global.innodb_compression_pad_pct_max;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_compression_pad_pct_max = "T";
SELECT @@global.innodb_compression_pad_pct_max;
SET @@global.innodb_compression_pad_pct_max = 76;
SELECT @@global.innodb_compression_pad_pct_max;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
SELECT @@global.innodb_compression_pad_pct_max =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_compression_pad_pct_max';
SELECT @@global.innodb_compression_pad_pct_max;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_compression_pad_pct_max';
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_compression_pad_pct_max = OFF;
SELECT @@global.innodb_compression_pad_pct_max;
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_compression_pad_pct_max = ON;
SELECT @@global.innodb_compression_pad_pct_max;
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.innodb_compression_pad_pct_max = TRUE;
SELECT @@global.innodb_compression_pad_pct_max;
SET @@global.innodb_compression_pad_pct_max = FALSE;
SELECT @@global.innodb_compression_pad_pct_max;
##############################
# Restore initial value #
##############################
SET @@global.innodb_compression_pad_pct_max = @global_start_value;
SELECT @@global.innodb_compression_pad_pct_max;
###############################################################
# END OF innodb_compression_pad_pct_max TESTS #
###############################################################
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Scope: GLOBAL # # Scope: GLOBAL #
# Access Type: Dynamic # # Access Type: Dynamic #
# Data Type: Numeric # # Data Type: Numeric #
# Default Value: 500 # # Default Value: 5000 #
# Range: 1-4294967295 # # Range: 1-4294967295 #
# # # #
# # # #
......
#
# Basic test for innodb_disable_background_merge.
#
-- source include/have_innodb.inc
# The config variable is a debug variable
-- source include/have_debug.inc
# Check the default value
SET @orig = @@global.innodb_disable_background_merge;
SELECT @orig;
################# mysql-test\t\innodb_flush_log_at_timeout_basic.test #########
# #
# Variable Name: innodb_flush_log_at_timeout #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 1 #
# Range: 0-2700 #
# #
# #
# Creation Date: 2012-05-10 #
# Author: Nuno Carvalho #
# #
#Description: Test Cases of Dynamic System Variable #
# innodb_flush_log_at_timeout that checks the behavior of #
# this variable in the following ways #
# * Default Value #
# * Valid & Invalid values #
# * Scope & Access method #
# * Data Integrity #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--source include/have_innodb.inc
--source include/load_sysvars.inc
########################################################################
# START OF innodb_flush_log_at_timeout TESTS #
########################################################################
#############################################################################
# Saving initial value of innodb_flush_log_at_timeout #
#############################################################################
SET @global_start_value = @@global.innodb_flush_log_at_timeout;
SELECT @global_start_value;
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
##########################################################################
# Display the DEFAULT value of innodb_flush_log_at_timeout #
##########################################################################
SET @@global.innodb_flush_log_at_timeout = 0;
SET @@global.innodb_flush_log_at_timeout = DEFAULT;
SELECT @@global.innodb_flush_log_at_timeout;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
###############################################################################
# Check if variable can be accessed with and without @@ sign #
###############################################################################
--Error ER_GLOBAL_VARIABLE
SET innodb_flush_log_at_timeout = 1;
SELECT @@innodb_flush_log_at_timeout;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_flush_log_at_timeout;
SET global innodb_flush_log_at_timeout = 0;
SELECT @@global.innodb_flush_log_at_timeout;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
#############################################################################
# change the value of innodb_flush_log_at_timeout to a valid value #
#############################################################################
SET @@global.innodb_flush_log_at_timeout = 0;
SELECT @@global.innodb_flush_log_at_timeout;
SET @@global.innodb_flush_log_at_timeout = 10;
SELECT @@global.innodb_flush_log_at_timeout;
SET @@global.innodb_flush_log_at_timeout = 2700;
SELECT @@global.innodb_flush_log_at_timeout;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
###############################################################################
# Change the value of innodb_flush_log_at_timeout to invalid value #
###############################################################################
SET @@global.innodb_flush_log_at_timeout = -1;
SELECT @@global.innodb_flush_log_at_timeout;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_flush_log_at_timeout = "T";
SELECT @@global.innodb_flush_log_at_timeout;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_flush_log_at_timeout = "Y";
SELECT @@global.innodb_flush_log_at_timeout;
SET @@global.innodb_flush_log_at_timeout = 2701;
SELECT @@global.innodb_flush_log_at_timeout;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
SELECT @@global.innodb_flush_log_at_timeout =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_log_at_timeout';
SELECT @@global.innodb_flush_log_at_timeout;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_log_at_timeout';
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_flush_log_at_timeout = OFF;
SELECT @@global.innodb_flush_log_at_timeout;
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_flush_log_at_timeout = ON;
SELECT @@global.innodb_flush_log_at_timeout;
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.innodb_flush_log_at_timeout = TRUE;
SELECT @@global.innodb_flush_log_at_timeout;
SET @@global.innodb_flush_log_at_timeout = FALSE;
SELECT @@global.innodb_flush_log_at_timeout;
##############################
# Restore initial value #
##############################
SET @@global.innodb_flush_log_at_timeout = @global_start_value;
SELECT @@global.innodb_flush_log_at_timeout;
###############################################################
# END OF innodb_flush_log_at_timeout TESTS #
###############################################################
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--loose-enable-performance-schema
--loose-performance-schema-session-connect-attrs-size=2048
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