1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

sys_var suite passes

This commit is contained in:
Sergei Golubchik
2013-07-13 09:22:00 +02:00
parent 7da16844ea
commit 243371f475
77 changed files with 3674 additions and 7038 deletions

View File

@ -47,6 +47,7 @@ loose-innodb_read_io_threads= 2
loose-innodb_log_buffer_size= 1M
loose-innodb_log_file_size= 5M
loose-innodb_log_files_in_group= 2
loose-innodb-stats-persistent= OFF
slave-net-timeout=120

View File

@ -5306,8 +5306,6 @@ sub mysqld_arguments ($$$) {
mtr_add_arg($args, "--loose-debug-sync-timeout=%s",
$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;
}

View File

@ -6,6 +6,9 @@
source include/not_embedded.inc;
--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_table_stats = query_get_value(show create table mysql.innodb_table_stats, Create Table, 1);
let $database=`select database()`;

View File

@ -0,0 +1,37 @@
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

View File

@ -0,0 +1,96 @@
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

View File

@ -1,103 +0,0 @@
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

View File

@ -0,0 +1,64 @@
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

View File

@ -0,0 +1,53 @@
'#---------------------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'

View File

@ -0,0 +1,53 @@
'#---------------------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'

View File

@ -0,0 +1,53 @@
'#---------------------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'

View File

@ -0,0 +1,66 @@
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

View File

@ -6,13 +6,13 @@ Warning 1292 Truncated incorrect innodb_autoextend_increment value: '0'
SET @@global.innodb_autoextend_increment = DEFAULT;
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
8
64
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_autoextend_increment = 1;
ERROR HY000: Variable 'innodb_autoextend_increment' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_autoextend_increment ;
@@innodb_autoextend_increment
8
64
SELECT local.innodb_autoextend_increment ;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_autoextend_increment = 0;

View File

@ -0,0 +1,65 @@
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;

View File

@ -0,0 +1,96 @@
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

View File

@ -0,0 +1,73 @@
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

View File

@ -0,0 +1,86 @@
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

View File

@ -1,7 +1,7 @@
SET @global_start_value = @@global.innodb_concurrency_tickets;
SELECT @global_start_value;
@global_start_value
500
5000
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_concurrency_tickets = 0;
Warnings:
@ -9,13 +9,13 @@ Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0'
SET @@global.innodb_concurrency_tickets = DEFAULT;
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
500
5000
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_concurrency_tickets = 1;
ERROR HY000: Variable 'innodb_concurrency_tickets' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_concurrency_tickets;
@@innodb_concurrency_tickets
500
5000
SELECT local.innodb_concurrency_tickets;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_concurrency_tickets = 0;
@ -97,4 +97,4 @@ SELECT @@global.innodb_concurrency_tickets;
SET @@global.innodb_concurrency_tickets = @global_start_value;
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
500
5000

View File

@ -0,0 +1,4 @@
SET @orig = @@global.innodb_disable_background_merge;
SELECT @orig;
@orig
0

View File

@ -1,7 +1,7 @@
SET @start_global_value = @@global.innodb_file_per_table;
SELECT @start_global_value;
@start_global_value
0
1
'#---------------------BS_STVARS_028_01----------------------#'
SELECT 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'
SET @@global.innodb_file_per_table = @start_global_value;
SELECT @@global.innodb_file_per_table;
@@global.innodb_file_per_table
0
1

View File

@ -0,0 +1,96 @@
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

View File

@ -2,10 +2,6 @@ SET @start_global_value = @@global.innodb_flush_neighbors;
SELECT @start_global_value;
@start_global_value
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;
@@global.innodb_flush_neighbors
1
@ -13,79 +9,92 @@ select @@session.innodb_flush_neighbors;
ERROR HY000: Variable 'innodb_flush_neighbors' is a GLOBAL variable
show global variables like 'innodb_flush_neighbors';
Variable_name Value
innodb_flush_neighbors ON
innodb_flush_neighbors 1
show session variables like 'innodb_flush_neighbors';
Variable_name Value
innodb_flush_neighbors ON
innodb_flush_neighbors 1
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS ON
INNODB_FLUSH_NEIGHBORS 1
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='OFF';
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
0
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS OFF
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS OFF
set @@global.innodb_flush_neighbors=1;
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
1
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
INNODB_FLUSH_NEIGHBORS 1
set global innodb_flush_neighbors=0;
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
0
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS OFF
INNODB_FLUSH_NEIGHBORS 0
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS OFF
set @@global.innodb_flush_neighbors='ON';
INNODB_FLUSH_NEIGHBORS 0
set @@global.innodb_flush_neighbors=TRUE;
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
1
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS ON
INNODB_FLUSH_NEIGHBORS 1
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS ON
set session innodb_flush_neighbors='OFF';
INNODB_FLUSH_NEIGHBORS 1
set global innodb_flush_neighbors=0;
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
0
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS 0
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS 0
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;
@@global.innodb_flush_neighbors
1
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS 1
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FLUSH_NEIGHBORS 1
set session innodb_flush_neighbors=0;
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
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;
ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors'
set global innodb_flush_neighbors=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors'
set global innodb_flush_neighbors=2;
ERROR 42000: Variable 'innodb_flush_neighbors' can't be set to the value of '2'
set global innodb_flush_neighbors=-3;
ERROR 42000: Variable 'innodb_flush_neighbors' can't be set to the value of '-3'
set global innodb_flush_neighbors=3;
Warnings:
Warning 1292 Truncated incorrect innodb_flush_neighbors value: '3'
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
1
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
2
set global innodb_flush_neighbors=-3;
Warnings:
Warning 1292 Truncated incorrect innodb_flush_neighbors value: '-3'
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
0
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;
SELECT @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors

View File

@ -0,0 +1,98 @@
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

View File

@ -0,0 +1,33 @@
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

View File

@ -1,20 +1,20 @@
select @@global.innodb_ft_cache_size;
@@global.innodb_ft_cache_size
32000000
8000000
select @@session.innodb_ft_cache_size;
ERROR HY000: Variable 'innodb_ft_cache_size' is a GLOBAL variable
show global variables like 'innodb_ft_cache_size';
Variable_name Value
innodb_ft_cache_size 32000000
innodb_ft_cache_size 8000000
show session variables like 'innodb_ft_cache_size';
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';
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';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FT_CACHE_SIZE 32000000
INNODB_FT_CACHE_SIZE 8000000
set global innodb_ft_cache_size=1;
ERROR HY000: Variable 'innodb_ft_cache_size' is a read only variable
set session innodb_ft_cache_size=1;

View File

@ -1,28 +1,28 @@
SET @start_global_value = @@global.innodb_ft_enable_diag_print;
SELECT @start_global_value;
@start_global_value
1
0
Valid values are 'ON' and 'OFF'
select @@global.innodb_ft_enable_diag_print in (0, 1);
@@global.innodb_ft_enable_diag_print in (0, 1)
1
select @@global.innodb_ft_enable_diag_print;
@@global.innodb_ft_enable_diag_print
1
0
select @@session.innodb_ft_enable_diag_print;
ERROR HY000: Variable 'innodb_ft_enable_diag_print' is a GLOBAL variable
show global variables like 'innodb_ft_enable_diag_print';
Variable_name Value
innodb_ft_enable_diag_print ON
innodb_ft_enable_diag_print OFF
show session variables like 'innodb_ft_enable_diag_print';
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';
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';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FT_ENABLE_DIAG_PRINT ON
INNODB_FT_ENABLE_DIAG_PRINT OFF
set global innodb_ft_enable_diag_print='OFF';
select @@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
SET @@global.innodb_ft_enable_diag_print = @start_global_value;
SELECT @@global.innodb_ft_enable_diag_print;
@@global.innodb_ft_enable_diag_print
1
0

View File

@ -0,0 +1,81 @@
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

View File

@ -0,0 +1,109 @@
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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +1,28 @@
SET @start_global_value = @@global.innodb_old_blocks_time;
SELECT @start_global_value;
@start_global_value
0
1000
Valid values are zero or above
select @@global.innodb_old_blocks_time >=0;
@@global.innodb_old_blocks_time >=0
1
select @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time
0
1000
select @@session.innodb_old_blocks_time;
ERROR HY000: Variable 'innodb_old_blocks_time' is a GLOBAL variable
show global variables like 'innodb_old_blocks_time';
Variable_name Value
innodb_old_blocks_time 0
innodb_old_blocks_time 1000
show session variables like 'innodb_old_blocks_time';
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';
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';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_TIME 0
INNODB_OLD_BLOCKS_TIME 1000
set global innodb_old_blocks_time=10;
select @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time
@ -53,4 +53,4 @@ INNODB_OLD_BLOCKS_TIME 0
SET @@global.innodb_old_blocks_time = @start_global_value;
SELECT @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time
0
1000

View File

@ -0,0 +1,64 @@
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

View File

@ -0,0 +1,27 @@
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

View File

@ -0,0 +1,27 @@
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

View File

@ -0,0 +1,22 @@
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

View File

@ -0,0 +1,24 @@
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;

View File

@ -1,28 +1,28 @@
SET @start_global_value = @@global.innodb_stats_on_metadata;
SELECT @start_global_value;
@start_global_value
1
0
Valid values are 'ON' and 'OFF'
select @@global.innodb_stats_on_metadata in (0, 1);
@@global.innodb_stats_on_metadata in (0, 1)
1
select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
1
0
select @@session.innodb_stats_on_metadata;
ERROR HY000: Variable 'innodb_stats_on_metadata' is a GLOBAL variable
show global variables like 'innodb_stats_on_metadata';
Variable_name Value
innodb_stats_on_metadata ON
innodb_stats_on_metadata OFF
show session variables like 'innodb_stats_on_metadata';
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';
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';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_ON_METADATA ON
INNODB_STATS_ON_METADATA OFF
set global innodb_stats_on_metadata='OFF';
select @@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
SET @@global.innodb_stats_on_metadata = @start_global_value;
SELECT @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
1
0

View File

@ -0,0 +1,24 @@
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;

View File

@ -1,18 +1,18 @@
SET @start_value = @@global.max_connect_errors;
SELECT @start_value;
@start_value
10
100
'#--------------------FN_DYNVARS_073_01------------------------#'
SET @@global.max_connect_errors = 5000;
SET @@global.max_connect_errors = DEFAULT;
SELECT @@global.max_connect_errors;
@@global.max_connect_errors
10
100
'#---------------------FN_DYNVARS_073_02-------------------------#'
SET @@global.max_connect_errors = @start_value;
SELECT @@global.max_connect_errors = 10;
@@global.max_connect_errors = 10
1
0
'#--------------------FN_DYNVARS_073_03------------------------#'
SET @@global.max_connect_errors = 4096;
SELECT @@global.max_connect_errors;
@ -131,4 +131,4 @@ ERROR 42S22: Unknown column 'max_connect_errors' in 'field list'
SET @@global.max_connect_errors = @start_value;
SELECT @@global.max_connect_errors;
@@global.max_connect_errors
10
100

View File

@ -0,0 +1,51 @@
####################################################################
# 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

View File

@ -0,0 +1,23 @@
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

View File

@ -0,0 +1 @@
--host-cache-size=123

View File

@ -0,0 +1,41 @@
--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;

View File

@ -0,0 +1,142 @@
############ 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 #
###############################################################

View File

@ -1,81 +0,0 @@
# 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;

View File

@ -0,0 +1,58 @@
#
# 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;

View File

@ -0,0 +1,102 @@
################## 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'

View File

@ -0,0 +1,102 @@
################## 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'

View File

@ -0,0 +1,102 @@
################## 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'

View File

@ -0,0 +1,58 @@
#
# 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;

View File

@ -4,7 +4,7 @@
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 8 #
# Default Value: 64 #
# Range: 0,1 #
# #
# #

View File

@ -0,0 +1,69 @@
-- 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;

View File

@ -0,0 +1,143 @@
##### 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 #
###############################################################

View File

@ -0,0 +1,64 @@
# 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;

View File

@ -0,0 +1,136 @@
############# 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 #
###############################################################

View File

@ -4,7 +4,7 @@
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 500 #
# Default Value: 5000 #
# Range: 1-4294967295 #
# #
# #

View File

@ -0,0 +1,12 @@
#
# 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;

View File

@ -0,0 +1,151 @@
################# 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 #
###############################################################

View File

@ -11,8 +11,6 @@ SELECT @start_global_value;
#
# exists as global only
#
--echo Valid values are 'ON' and 'OFF'
select @@global.innodb_flush_neighbors in (0, 1);
select @@global.innodb_flush_neighbors;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_flush_neighbors;
@ -24,11 +22,11 @@ select * from information_schema.session_variables where variable_name='innodb_f
#
# show that it's writable
#
set global innodb_flush_neighbors='OFF';
set global innodb_flush_neighbors=0;
select @@global.innodb_flush_neighbors;
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
set @@global.innodb_flush_neighbors=1;
set @@global.innodb_flush_neighbors=TRUE;
select @@global.innodb_flush_neighbors;
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
@ -36,30 +34,35 @@ set global innodb_flush_neighbors=0;
select @@global.innodb_flush_neighbors;
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
set @@global.innodb_flush_neighbors='ON';
set @@global.innodb_flush_neighbors=2;
select @@global.innodb_flush_neighbors;
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
set @@global.innodb_flush_neighbors=DEFAULT;
select @@global.innodb_flush_neighbors;
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
--error ER_GLOBAL_VARIABLE
set session innodb_flush_neighbors='OFF';
set session innodb_flush_neighbors=0;
--error ER_GLOBAL_VARIABLE
set @@session.innodb_flush_neighbors='ON';
set @@session.innodb_flush_neighbors=1;
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_flush_neighbors='OFF';
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_flush_neighbors='ON';
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_flush_neighbors=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_flush_neighbors=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_flush_neighbors=2;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_flush_neighbors=3;
select @@global.innodb_flush_neighbors;
set global innodb_flush_neighbors=-3;
select @@global.innodb_flush_neighbors;
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
--error ER_WRONG_VALUE_FOR_VAR
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_flush_neighbors='AUTO';
#

View File

@ -0,0 +1,143 @@
############ mysql-test\t\innodb_flushing_avg_loops_basic.test ################
# #
# Variable Name: innodb_flushing_avg_loops #
# 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_flushing_avg_loops #
# that checks the behavior of this variable in the following ways #
# * Default Value #
# * Valid & Invalid values #
# * Scope & Access method #
# * Data Integrity #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--source include/have_innodb.inc
--source include/load_sysvars.inc
########################################################################
# START OF innodb_flushing_avg_loops TESTS #
########################################################################
###############################################################################
#Saving initial value of innodb_flushing_avg_loops in a temporary variable #
###############################################################################
SET @global_start_value = @@global.innodb_flushing_avg_loops;
SELECT @global_start_value;
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
########################################################################
# Display the DEFAULT value of innodb_flushing_avg_loops #
########################################################################
SET @@global.innodb_flushing_avg_loops = 1;
SET @@global.innodb_flushing_avg_loops = DEFAULT;
SELECT @@global.innodb_flushing_avg_loops;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
##################################################################################
# Check if innodb_flushing_avg_loops can be accessed with and without @@ sign #
##################################################################################
--Error ER_GLOBAL_VARIABLE
SET innodb_flushing_avg_loops = 1;
SELECT @@innodb_flushing_avg_loops;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_flushing_avg_loops;
SET global innodb_flushing_avg_loops = 1;
SELECT @@global.innodb_flushing_avg_loops;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
###############################################################################
# change the value of innodb_flushing_avg_loops to a valid value #
###############################################################################
SET @@global.innodb_flushing_avg_loops = 1;
SELECT @@global.innodb_flushing_avg_loops;
SET @@global.innodb_flushing_avg_loops = 60;
SELECT @@global.innodb_flushing_avg_loops;
SET @@global.innodb_flushing_avg_loops = 1000;
SELECT @@global.innodb_flushing_avg_loops;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
###########################################################################
# Change the value of innodb_flushing_avg_loops to invalid value #
###########################################################################
SET @@global.innodb_flushing_avg_loops = -1;
SELECT @@global.innodb_flushing_avg_loops;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_flushing_avg_loops = "T";
SELECT @@global.innodb_flushing_avg_loops;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_flushing_avg_loops = "Y";
SELECT @@global.innodb_flushing_avg_loops;
SET @@global.innodb_flushing_avg_loops = 1001;
SELECT @@global.innodb_flushing_avg_loops;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
SELECT @@global.innodb_flushing_avg_loops =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flushing_avg_loops';
SELECT @@global.innodb_flushing_avg_loops;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flushing_avg_loops';
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_flushing_avg_loops = OFF;
SELECT @@global.innodb_flushing_avg_loops;
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_flushing_avg_loops = ON;
SELECT @@global.innodb_flushing_avg_loops;
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.innodb_flushing_avg_loops = TRUE;
SELECT @@global.innodb_flushing_avg_loops;
SET @@global.innodb_flushing_avg_loops = FALSE;
SELECT @@global.innodb_flushing_avg_loops;
##############################
# Restore initial value #
##############################
SET @@global.innodb_flushing_avg_loops = @global_start_value;
SELECT @@global.innodb_flushing_avg_loops;
###############################################################
# END OF innodb_flushing_avg_loops TESTS #
###############################################################

View File

@ -0,0 +1,28 @@
--source include/have_innodb.inc
--source include/have_debug.inc
#
# exists as global only
#
select @@global.innodb_force_recovery_crash in (0, 1);
select @@global.innodb_force_recovery_crash;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_force_recovery_crash;
show global variables like 'innodb_force_recovery_crash';
show session variables like 'innodb_force_recovery_crash';
select * from information_schema.global_variables where variable_name='innodb_force_recovery_crash';
select * from information_schema.session_variables where variable_name='innodb_force_recovery_crash';
# show that it's read-only
#
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_force_recovery_crash=1;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_force_recovery_crash=0;
select @@global.innodb_force_recovery_crash;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set session innodb_force_recovery_crash='some';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set @@session.innodb_force_recovery_crash='some';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_force_recovery_crash='some';

View File

@ -0,0 +1,74 @@
# 2012-04-02 - Added
#
--source include/have_innodb.inc
SET @start_innodb_max_capacity = @@global.innodb_io_capacity_max;
SELECT @start_innodb_max_capacity;
SET @start_innodb_capacity = @@global.innodb_io_capacity;
SELECT @start_innodb_capacity;
#
# exists as global only
#
--echo Valid value 100 or more
select @@global.innodb_io_capacity_max > 99;
select @@global.innodb_io_capacity_max;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_io_capacity_max;
show global variables like 'innodb_io_capacity_max';
show session variables like 'innodb_io_capacity_max';
select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
select * from information_schema.session_variables where variable_name='innodb_io_capacity_max';
#
# show that it's writable. Allowed value cannot be lower than innodb_io_capacity
#
set global innodb_io_capacity_max=@start_innodb_capacity + 1;
select @@global.innodb_io_capacity_max;
select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
select * from information_schema.session_variables where variable_name='innodb_io_capacity_max';
--error ER_GLOBAL_VARIABLE
set session innodb_io_capacity_max=444;
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_io_capacity_max=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_io_capacity_max=1e1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_io_capacity_max="foo";
#
# can't set it below innodb_io_capacity
#
set global innodb_io_capacity_max=@start_innodb_capacity - 1;
select @@global.innodb_io_capacity_max;
select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
set global innodb_io_capacity_max=-7;
select @@global.innodb_io_capacity_max;
select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
#
# min/max values
#
# first set innodb_io_cpaacity lower
set global innodb_io_capacity=100;
set global innodb_io_capacity_max=100;
select @@global.innodb_io_capacity_max;
#
# cleanup
#
SET @@global.innodb_io_capacity_max = @start_innodb_max_capacity;
SELECT @@global.innodb_io_capacity_max;
SET @@global.innodb_io_capacity = @start_innodb_capacity;
SELECT @@global.innodb_io_capacity;

View File

@ -0,0 +1,151 @@
############# mysql-test\t\innodb_max_dirty_pages_pct_lwm_basic.test ##########
# #
# Variable Name: innodb_max_dirty_pages_pct_lwm #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 75 #
# Range: 0-99 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Rizwan #
# #
#Description: Test Cases of Dynamic System Variable #
# innodb_max_dirty_pages_pct_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_max_dirty_pages_pct_lwm TESTS #
######################################################################
#################################################################################
#Saving initial value of innodb_max_dirty_pages_pct_lwm in a temporary variable #
#################################################################################
SET @pct_lwm_start_value = @@global.innodb_max_dirty_pages_pct_lwm;
SELECT @pct_lwm_start_value;
SET @pct_start_value = @@global.innodb_max_dirty_pages_pct;
SELECT @pct_start_value;
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
########################################################################
# Display the DEFAULT value of innodb_max_dirty_pages_pct_lwm #
########################################################################
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;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
###################################################################################
#check if innodb_max_dirty_pages_pct_lwm can be accessed with and without @@ sign #
###################################################################################
--Error ER_GLOBAL_VARIABLE
SET innodb_max_dirty_pages_pct_lwm = 1;
SELECT @@innodb_max_dirty_pages_pct_lwm;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_max_dirty_pages_pct_lwm;
SET global innodb_max_dirty_pages_pct_lwm = 0;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
##########################################################################
# change the value of innodb_max_dirty_pages_pct_lwm to a valid value #
# Aloowed values are <= innodb_max_dirty_pages_pct value #
##########################################################################
SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_start_value;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
###########################################################################
# Change the value of innodb_max_dirty_pages_pct_lwm to invalid value #
###########################################################################
SET @@global.innodb_max_dirty_pages_pct_lwm = -1;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_max_dirty_pages_pct_lwm = "T";
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_max_dirty_pages_pct_lwm = "Y";
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_start_value + 1;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
SET @@global.innodb_max_dirty_pages_pct_lwm = 100;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
SELECT @@global.innodb_max_dirty_pages_pct_lwm =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct_lwm';
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct_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_max_dirty_pages_pct_lwm = OFF;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_max_dirty_pages_pct_lwm = ON;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.innodb_max_dirty_pages_pct_lwm = TRUE;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
SET @@global.innodb_max_dirty_pages_pct_lwm = FALSE;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
##############################
# Restore initial value #
##############################
SET @@global.innodb_max_dirty_pages_pct = @pct_start_value;
SELECT @@global.innodb_max_dirty_pages_pct;
SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_lwm_start_value;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
###############################################################
# END OF innodb_max_dirty_pages_pct_lwm TESTS #
###############################################################

View File

@ -11,8 +11,8 @@ select name, status from information_schema.innodb_metrics;
# Turn on all monitor counters
set global innodb_monitor_enable = all;
# status should all change to "started"
select name, status from information_schema.innodb_metrics;
# status should all change to "enabled"
select name from information_schema.innodb_metrics where status!='enabled';
# Test wrong argument to the global configure option
--error ER_WRONG_VALUE_FOR_VAR
@ -29,21 +29,21 @@ set global innodb_monitor_enable = aaa;
# insensitive
set global innodb_monitor_disable = All;
# status should all change to "stopped"
select name, status from information_schema.innodb_metrics;
# status should all change to "disabled"
select name from information_schema.innodb_metrics where status!='disabled';
# Reset all counter values
set global innodb_monitor_reset_all = all;
# count should all change to 0
select name, count, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where count!=0;
# Test wildcard match, turn on all counters contain string "lock"
set global innodb_monitor_enable = "%lock%";
# All lock related counter should be enabled
select name, status from information_schema.innodb_metrics
where name like "%lock%";
select name from information_schema.innodb_metrics
where status != IF(name like "%lock%", 'enabled', 'disabled');
# Disable them
set global innodb_monitor_disable = "%lock%";
@ -59,28 +59,29 @@ set global innodb_monitor_enable = "%lock*";
# All counters will be turned on with wildcard match string with all "%"
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all counters
set global innodb_monitor_disable="%%%%%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='disabled';
# One more round testing. All counters will be turned on with
# single wildcard character "%"
set global innodb_monitor_enable="%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all the counters with "%_%"
set global innodb_monitor_disable="%_%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='disabled';
# Turn on all counters start with "log"
set global innodb_monitor_enable="log%%%%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics
where status != IF(name like "log%", 'enabled', 'disabled');
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
# is single character wildcard match word
@ -153,7 +154,7 @@ where name = "metadata_table_handles_opened";
# Turn off the counter "metadata_table_handles_opened"
set global innodb_monitor_disable = metadata_table_handles_opened;
# Reset the counter value while counter is off (stopped)
# Reset the counter value while counter is off (disabled)
set global innodb_monitor_reset = metadata_table_handles_opened;
select name, max_count, min_count, count,
@ -192,7 +193,7 @@ set global innodb_monitor_enable = metadata_table_handles_opened;
drop table monitor_test;
# Create a new table to test "metadata_table_handles_opened" counter
create table monitor_test(col int) engine = innodb;
create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
@ -336,6 +337,8 @@ drop table monitor_test;
set global innodb_monitor_enable = file_num_open_files;
# Counters are unpredictable when innodb-file-per-table is on
--replace_column 2 # 3 # 4 # 5 # 6 # 7 #
select name, max_count, min_count, count,
max_count_reset, min_count_reset, count_reset, status
from information_schema.innodb_metrics

View File

@ -11,8 +11,8 @@ select name, status from information_schema.innodb_metrics;
# Turn on all monitor counters
set global innodb_monitor_enable = all;
# status should all change to "started"
select name, status from information_schema.innodb_metrics;
# status should all change to "enabled"
select name from information_schema.innodb_metrics where status!='enabled';
# Test wrong argument to the global configure option
--error ER_WRONG_VALUE_FOR_VAR
@ -29,21 +29,21 @@ set global innodb_monitor_enable = aaa;
# insensitive
set global innodb_monitor_disable = All;
# status should all change to "stopped"
select name, status from information_schema.innodb_metrics;
# status should all change to "disabled"
select name from information_schema.innodb_metrics where status!='disabled';
# Reset all counter values
set global innodb_monitor_reset_all = all;
# count should all change to 0
select name, count, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where count!=0;
# Test wildcard match, turn on all counters contain string "lock"
set global innodb_monitor_enable = "%lock%";
# All lock related counter should be enabled
select name, status from information_schema.innodb_metrics
where name like "%lock%";
select name from information_schema.innodb_metrics
where status != IF(name like "%lock%", 'enabled', 'disabled');
# Disable them
set global innodb_monitor_disable = "%lock%";
@ -59,28 +59,29 @@ set global innodb_monitor_enable = "%lock*";
# All counters will be turned on with wildcard match string with all "%"
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all counters
set global innodb_monitor_disable="%%%%%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='disabled';
# One more round testing. All counters will be turned on with
# single wildcard character "%"
set global innodb_monitor_enable="%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all the counters with "%_%"
set global innodb_monitor_disable="%_%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='disabled';
# Turn on all counters start with "log"
set global innodb_monitor_enable="log%%%%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics
where status != IF(name like "log%", 'enabled', 'disabled');
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
# is single character wildcard match word
@ -153,7 +154,7 @@ where name = "metadata_table_handles_opened";
# Turn off the counter "metadata_table_handles_opened"
set global innodb_monitor_disable = metadata_table_handles_opened;
# Reset the counter value while counter is off (stopped)
# Reset the counter value while counter is off (disabled)
set global innodb_monitor_reset = metadata_table_handles_opened;
select name, max_count, min_count, count,
@ -192,7 +193,7 @@ set global innodb_monitor_enable = metadata_table_handles_opened;
drop table monitor_test;
# Create a new table to test "metadata_table_handles_opened" counter
create table monitor_test(col int) engine = innodb;
create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
@ -336,6 +337,8 @@ drop table monitor_test;
set global innodb_monitor_enable = file_num_open_files;
# Counters are unpredictable when innodb-file-per-table is on
--replace_column 2 # 3 # 4 # 5 # 6 # 7 #
select name, max_count, min_count, count,
max_count_reset, min_count_reset, count_reset, status
from information_schema.innodb_metrics

View File

@ -11,8 +11,8 @@ select name, status from information_schema.innodb_metrics;
# Turn on all monitor counters
set global innodb_monitor_enable = all;
# status should all change to "started"
select name, status from information_schema.innodb_metrics;
# status should all change to "enabled"
select name from information_schema.innodb_metrics where status!='enabled';
# Test wrong argument to the global configure option
--error ER_WRONG_VALUE_FOR_VAR
@ -29,21 +29,21 @@ set global innodb_monitor_enable = aaa;
# insensitive
set global innodb_monitor_disable = All;
# status should all change to "stopped"
select name, status from information_schema.innodb_metrics;
# status should all change to "disabled"
select name from information_schema.innodb_metrics where status!='disabled';
# Reset all counter values
set global innodb_monitor_reset_all = all;
# count should all change to 0
select name, count, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where count!=0;
# Test wildcard match, turn on all counters contain string "lock"
set global innodb_monitor_enable = "%lock%";
# All lock related counter should be enabled
select name, status from information_schema.innodb_metrics
where name like "%lock%";
select name from information_schema.innodb_metrics
where status != IF(name like "%lock%", 'enabled', 'disabled');
# Disable them
set global innodb_monitor_disable = "%lock%";
@ -59,28 +59,29 @@ set global innodb_monitor_enable = "%lock*";
# All counters will be turned on with wildcard match string with all "%"
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all counters
set global innodb_monitor_disable="%%%%%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='disabled';
# One more round testing. All counters will be turned on with
# single wildcard character "%"
set global innodb_monitor_enable="%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all the counters with "%_%"
set global innodb_monitor_disable="%_%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='disabled';
# Turn on all counters start with "log"
set global innodb_monitor_enable="log%%%%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics
where status != IF(name like "log%", 'enabled', 'disabled');
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
# is single character wildcard match word
@ -153,7 +154,7 @@ where name = "metadata_table_handles_opened";
# Turn off the counter "metadata_table_handles_opened"
set global innodb_monitor_disable = metadata_table_handles_opened;
# Reset the counter value while counter is off (stopped)
# Reset the counter value while counter is off (disabled)
set global innodb_monitor_reset = metadata_table_handles_opened;
select name, max_count, min_count, count,
@ -192,7 +193,7 @@ set global innodb_monitor_enable = metadata_table_handles_opened;
drop table monitor_test;
# Create a new table to test "metadata_table_handles_opened" counter
create table monitor_test(col int) engine = innodb;
create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
@ -336,6 +337,8 @@ drop table monitor_test;
set global innodb_monitor_enable = file_num_open_files;
# Counters are unpredictable when innodb-file-per-table is on
--replace_column 2 # 3 # 4 # 5 # 6 # 7 #
select name, max_count, min_count, count,
max_count_reset, min_count_reset, count_reset, status
from information_schema.innodb_metrics

View File

@ -11,8 +11,8 @@ select name, status from information_schema.innodb_metrics;
# Turn on all monitor counters
set global innodb_monitor_enable = all;
# status should all change to "started"
select name, status from information_schema.innodb_metrics;
# status should all change to "enabled"
select name from information_schema.innodb_metrics where status!='enabled';
# Test wrong argument to the global configure option
--error ER_WRONG_VALUE_FOR_VAR
@ -29,21 +29,21 @@ set global innodb_monitor_enable = aaa;
# insensitive
set global innodb_monitor_disable = All;
# status should all change to "stopped"
select name, status from information_schema.innodb_metrics;
# status should all change to "disabled"
select name from information_schema.innodb_metrics where status!='disabled';
# Reset all counter values
set global innodb_monitor_reset_all = all;
# count should all change to 0
select name, count, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where count!=0;
# Test wildcard match, turn on all counters contain string "lock"
set global innodb_monitor_enable = "%lock%";
# All lock related counter should be enabled
select name, status from information_schema.innodb_metrics
where name like "%lock%";
select name from information_schema.innodb_metrics
where status != IF(name like "%lock%", 'enabled', 'disabled');
# Disable them
set global innodb_monitor_disable = "%lock%";
@ -59,28 +59,29 @@ set global innodb_monitor_enable = "%lock*";
# All counters will be turned on with wildcard match string with all "%"
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all counters
set global innodb_monitor_disable="%%%%%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='disabled';
# One more round testing. All counters will be turned on with
# single wildcard character "%"
set global innodb_monitor_enable="%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all the counters with "%_%"
set global innodb_monitor_disable="%_%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics where status!='disabled';
# Turn on all counters start with "log"
set global innodb_monitor_enable="log%%%%";
select name, status from information_schema.innodb_metrics;
select name from information_schema.innodb_metrics
where status != IF(name like "log%", 'enabled', 'disabled');
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
# is single character wildcard match word
@ -153,7 +154,7 @@ where name = "metadata_table_handles_opened";
# Turn off the counter "metadata_table_handles_opened"
set global innodb_monitor_disable = metadata_table_handles_opened;
# Reset the counter value while counter is off (stopped)
# Reset the counter value while counter is off (disabled)
set global innodb_monitor_reset = metadata_table_handles_opened;
select name, max_count, min_count, count,
@ -192,7 +193,7 @@ set global innodb_monitor_enable = metadata_table_handles_opened;
drop table monitor_test;
# Create a new table to test "metadata_table_handles_opened" counter
create table monitor_test(col int) engine = innodb;
create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
@ -336,6 +337,8 @@ drop table monitor_test;
set global innodb_monitor_enable = file_num_open_files;
# Counters are unpredictable when innodb-file-per-table is on
--replace_column 2 # 3 # 4 # 5 # 6 # 7 #
select name, max_count, min_count, count,
max_count_reset, min_count_reset, count_reset, status
from information_schema.innodb_metrics

View File

@ -0,0 +1,51 @@
--source include/have_innodb.inc
SET @start_global_value = @@global.innodb_online_alter_log_max_size;
SELECT @start_global_value;
#
# exists as global only
#
select @@global.innodb_online_alter_log_max_size >= 524288;
select @@global.innodb_online_alter_log_max_size;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_online_alter_log_max_size;
show global variables like 'innodb_online_alter_log_max_size';
show session variables like 'innodb_online_alter_log_max_size';
select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
#
# show that it's writable
#
set global innodb_online_alter_log_max_size=1048576;
select @@global.innodb_online_alter_log_max_size;
select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
set @@global.innodb_online_alter_log_max_size=524288;
select @@global.innodb_online_alter_log_max_size;
select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
--error ER_GLOBAL_VARIABLE
set session innodb_online_alter_log_max_size='some';
--error ER_GLOBAL_VARIABLE
set @@session.innodb_online_alter_log_max_size='some';
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_online_alter_log_max_size=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_online_alter_log_max_size='foo';
set global innodb_online_alter_log_max_size=-2;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_online_alter_log_max_size=1e1;
set global innodb_online_alter_log_max_size=2;
#
# Cleanup
#
SET @@global.innodb_online_alter_log_max_size = @start_global_value;
SELECT @@global.innodb_online_alter_log_max_size;

View File

@ -0,0 +1,53 @@
#
# Basic test for innodb_purge_run_now, note it is a duplicate of
# innodb_purge_stop_now.
#
-- source include/have_innodb.inc
# The config variable is a debug variable for now
-- source include/have_debug.inc
--disable_query_log
# Enable metrics for the counters we are going to use
set global innodb_monitor_enable = purge_stop_count;
set global innodb_monitor_enable = purge_resume_count;
--enable_query_log
# Should be 0 for both
SELECT name, count
FROM information_schema.innodb_metrics
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
# Check the default value
SET @orig = @@global.innodb_purge_run_now;
SELECT @orig;
# Stop of purge
SET GLOBAL innodb_purge_stop_now = ON;
# Stop count should now be 1
SELECT name, count
FROM information_schema.innodb_metrics
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
SET GLOBAL innodb_purge_run_now = ON;
# Should always be OFF
SELECT @@global.innodb_purge_run_now;
# Both should be 1 now
SELECT name, count
FROM information_schema.innodb_metrics
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
--disable_query_log
set global innodb_monitor_disable = all;
set global innodb_monitor_reset_all = all;
-- disable_warnings
set global innodb_monitor_enable = default;
set global innodb_monitor_disable = default;
set global innodb_monitor_reset = default;
set global innodb_monitor_reset_all = default;
-- enable_warnings

View File

@ -0,0 +1,53 @@
#
# Basic test for innodb_purge_run_now, note it is a duplicate of
# innodb_purge_stop_now.
#
-- source include/have_innodb.inc
# The config variable is a debug variable for now
-- source include/have_debug.inc
--disable_query_log
# Enable metrics for the counters we are going to use
set global innodb_monitor_enable = purge_stop_count;
set global innodb_monitor_enable = purge_resume_count;
--enable_query_log
# Should be 0 for both
SELECT name, count
FROM information_schema.innodb_metrics
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
# Check the default value
SET @orig = @@global.innodb_purge_run_now;
SELECT @orig;
# Stop of purge
SET GLOBAL innodb_purge_stop_now = ON;
# Stop count should now be 1
SELECT name, count
FROM information_schema.innodb_metrics
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
SET GLOBAL innodb_purge_run_now = ON;
# Should always be OFF
SELECT @@global.innodb_purge_run_now;
# Both should be 1 now
SELECT name, count
FROM information_schema.innodb_metrics
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
--disable_query_log
set global innodb_monitor_disable = all;
set global innodb_monitor_reset_all = all;
-- disable_warnings
set global innodb_monitor_enable = default;
set global innodb_monitor_disable = default;
set global innodb_monitor_reset = default;
set global innodb_monitor_reset_all = default;
-- enable_warnings

View File

@ -0,0 +1,20 @@
--source include/have_innodb.inc
# Can only be set from the command line.
# show the global and session values;
--echo Valid values are 'ON' and 'OFF'
select @@global.innodb_read_only;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_read_only;
show global variables like 'innodb_read_only';
show session variables like 'innodb_read_only';
select * from information_schema.global_variables where variable_name='innodb_read_only';
select * from information_schema.session_variables where variable_name='innodb_read_only';
# Show that it's read-only
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_read_only=1;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set session innodb_read_only=1;

View File

@ -0,0 +1,31 @@
#
# innodb_stats_auto_recalc
#
-- source include/have_innodb.inc
# show the default value
SELECT @@innodb_stats_auto_recalc;
# check that it is writeable
SET GLOBAL innodb_stats_auto_recalc=ON;
SELECT @@innodb_stats_auto_recalc;
SET GLOBAL innodb_stats_auto_recalc=OFF;
SELECT @@innodb_stats_auto_recalc;
SET GLOBAL innodb_stats_auto_recalc=1;
SELECT @@innodb_stats_auto_recalc;
SET GLOBAL innodb_stats_auto_recalc=0;
SELECT @@innodb_stats_auto_recalc;
# should be a boolean
-- error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL innodb_stats_auto_recalc=123;
-- error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL innodb_stats_auto_recalc='foo';
# restore the environment
SET GLOBAL innodb_stats_auto_recalc=default;

View File

@ -0,0 +1,31 @@
#
# innodb_stats_persistent
#
-- source include/have_innodb.inc
# show the default value
SELECT @@innodb_stats_persistent;
# check that it is writeable
SET GLOBAL innodb_stats_persistent=ON;
SELECT @@innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent=OFF;
SELECT @@innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent=1;
SELECT @@innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent=0;
SELECT @@innodb_stats_persistent;
# 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';
# restore the environment
SET GLOBAL innodb_stats_persistent=off;

View File

@ -0,0 +1,60 @@
########## mysql-test\t\metadata_locks_hash_instances_basic.test ##############
# #
# Variable Name: metadata_locks_hash_instances #
# Scope: Global #
# Access Type: Static #
# Data Type: Integer #
# #
###############################################################################
--echo ####################################################################
--echo # Displaying default value #
--echo ####################################################################
SELECT @@GLOBAL.metadata_locks_hash_instances;
--echo ####################################################################
--echo # Check that value cannot be set (this variable is settable only #
--echo # at start-up). #
--echo ####################################################################
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.metadata_locks_hash_instances=1;
SELECT @@GLOBAL.metadata_locks_hash_instances;
--echo #################################################################
--echo # Check if the value in GLOBAL Table matches value in variable #
--echo #################################################################
SELECT @@GLOBAL.metadata_locks_hash_instances = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='metadata_locks_hash_instances';
SELECT @@GLOBAL.metadata_locks_hash_instances;
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='metadata_locks_hash_instances';
--echo ######################################################################
--echo # Check if accessing variable with and without GLOBAL point to same #
--echo # variable #
--echo ######################################################################
SELECT @@metadata_locks_hash_instances = @@GLOBAL.metadata_locks_hash_instances;
--echo ######################################################################
--echo # Check if variable has only the GLOBAL scope #
--echo ######################################################################
SELECT @@metadata_locks_hash_instances;
SELECT @@GLOBAL.metadata_locks_hash_instances;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@local.metadata_locks_hash_instances;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@SESSION.metadata_locks_hash_instances;

View File

@ -0,0 +1,2 @@
--loose-enable-performance-schema
--loose-performance-schema-session-connect-attrs-size=2048

View File

@ -0,0 +1,47 @@
# Copyright (C) 2012 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
--source include/not_embedded.inc
--source include/have_perfschema.inc
#
# Only global
#
select @@global.performance_schema_session_connect_attrs_size;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.performance_schema_session_connect_attrs_size;
show global variables like 'performance_schema_session_connect_attrs_size';
show session variables like 'performance_schema_session_connect_attrs_size';
select * from information_schema.global_variables
where variable_name='performance_schema_session_connect_attrs_size';
select * from information_schema.session_variables
where variable_name='performance_schema_session_connect_attrs_size';
#
# Read-only
#
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global performance_schema_session_connect_attrs_size=1;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set session performance_schema_session_connect_attrs_size=1;