Commit 87cf8651 authored by Sergei Golubchik's avatar Sergei Golubchik

clarify/simplify new innodb sysvars: innodb-scrub-force-testing

rename to innodb-debug-force-scrubbing
parent 19e76814
SET @start_global_value = @@global.innodb_debug_force_scrubbing;
#
# exists as global only
#
select @@global.innodb_debug_force_scrubbing;
@@global.innodb_debug_force_scrubbing
0
select @@session.innodb_debug_force_scrubbing;
ERROR HY000: Variable 'innodb_debug_force_scrubbing' is a GLOBAL variable
show global variables like 'innodb_debug_force_scrubbing';
Variable_name Value
innodb_debug_force_scrubbing OFF
show session variables like 'innodb_debug_force_scrubbing';
Variable_name Value
innodb_debug_force_scrubbing OFF
select * from information_schema.global_variables
where variable_name='innodb_debug_force_scrubbing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_DEBUG_FORCE_SCRUBBING OFF
select * from information_schema.session_variables
where variable_name='innodb_debug_force_scrubbing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_DEBUG_FORCE_SCRUBBING OFF
#
# show that it's writable
#
set global innodb_debug_force_scrubbing=ON;
select @@global.innodb_debug_force_scrubbing;
@@global.innodb_debug_force_scrubbing
1
set global innodb_debug_force_scrubbing=OFF;
select @@global.innodb_debug_force_scrubbing;
@@global.innodb_debug_force_scrubbing
0
set global innodb_debug_force_scrubbing=1;
select @@global.innodb_debug_force_scrubbing;
@@global.innodb_debug_force_scrubbing
1
set session innodb_debug_force_scrubbing=1;
ERROR HY000: Variable 'innodb_debug_force_scrubbing' is a GLOBAL variable and should be set with SET GLOBAL
#
# incorrect types
#
set global innodb_debug_force_scrubbing=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_debug_force_scrubbing'
set global innodb_debug_force_scrubbing=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_debug_force_scrubbing'
set global innodb_debug_force_scrubbing="foo";
ERROR 42000: Variable 'innodb_debug_force_scrubbing' can't be set to the value of 'foo'
SET @@global.innodb_debug_force_scrubbing = @start_global_value;
SET @start_global_value = @@global.innodb_scrub_force_testing;
#
# exists as global only
#
select @@global.innodb_scrub_force_testing;
@@global.innodb_scrub_force_testing
0
select @@session.innodb_scrub_force_testing;
ERROR HY000: Variable 'innodb_scrub_force_testing' is a GLOBAL variable
show global variables like 'innodb_scrub_force_testing';
Variable_name Value
innodb_scrub_force_testing OFF
show session variables like 'innodb_scrub_force_testing';
Variable_name Value
innodb_scrub_force_testing OFF
select * from information_schema.global_variables
where variable_name='innodb_scrub_force_testing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SCRUB_FORCE_TESTING OFF
select * from information_schema.session_variables
where variable_name='innodb_scrub_force_testing';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SCRUB_FORCE_TESTING OFF
#
# show that it's writable
#
set global innodb_scrub_force_testing=ON;
select @@global.innodb_scrub_force_testing;
@@global.innodb_scrub_force_testing
1
set global innodb_scrub_force_testing=OFF;
select @@global.innodb_scrub_force_testing;
@@global.innodb_scrub_force_testing
0
set global innodb_scrub_force_testing=1;
select @@global.innodb_scrub_force_testing;
@@global.innodb_scrub_force_testing
1
set session innodb_scrub_force_testing=1;
ERROR HY000: Variable 'innodb_scrub_force_testing' is a GLOBAL variable and should be set with SET GLOBAL
#
# incorrect types
#
set global innodb_scrub_force_testing=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_scrub_force_testing'
set global innodb_scrub_force_testing=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_scrub_force_testing'
set global innodb_scrub_force_testing="foo";
ERROR 42000: Variable 'innodb_scrub_force_testing' can't be set to the value of 'foo'
SET @@global.innodb_scrub_force_testing = @start_global_value;
......@@ -177,7 +177,7 @@
VARIABLE_NAME INNODB_DATA_FILE_PATH
SESSION_VALUE NULL
GLOBAL_VALUE ibdata1:12M:autoextend
@@ -719,6 +859,20 @@
@@ -733,6 +873,20 @@
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
......@@ -198,7 +198,7 @@
VARIABLE_NAME INNODB_ENCRYPTION_ROTATE_KEY_AGE
SESSION_VALUE NULL
GLOBAL_VALUE 1
@@ -789,6 +943,20 @@
@@ -803,6 +957,20 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
......@@ -219,7 +219,7 @@
VARIABLE_NAME INNODB_FAST_SHUTDOWN
SESSION_VALUE NULL
GLOBAL_VALUE 1
@@ -916,11 +1084,11 @@
@@ -930,11 +1098,11 @@
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FLUSH_LOG_AT_TRX_COMMIT
......@@ -233,7 +233,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
NUMERIC_MIN_VALUE 0
@@ -1013,6 +1181,20 @@
@@ -1027,6 +1195,20 @@
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
......@@ -254,7 +254,7 @@
VARIABLE_NAME INNODB_FT_AUX_TABLE
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -1251,6 +1433,20 @@
@@ -1265,6 +1447,20 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
......@@ -275,7 +275,7 @@
VARIABLE_NAME INNODB_LARGE_PREFIX
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -1279,6 +1475,20 @@
@@ -1293,6 +1489,20 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
......@@ -296,7 +296,7 @@
VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -1307,6 +1517,62 @@
@@ -1321,6 +1531,62 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
......@@ -359,7 +359,7 @@
VARIABLE_NAME INNODB_LOG_BUFFER_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 1048576
@@ -1335,6 +1601,20 @@
@@ -1349,6 +1615,20 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
......@@ -380,7 +380,7 @@
VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -1405,6 +1685,34 @@
@@ -1419,6 +1699,34 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
......@@ -415,7 +415,7 @@
VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT
SESSION_VALUE NULL
GLOBAL_VALUE 75.000000
@@ -1671,6 +1979,62 @@
@@ -1685,6 +1993,62 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
......@@ -478,7 +478,7 @@
VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 300
@@ -1839,6 +2203,48 @@
@@ -1853,6 +2217,48 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
......@@ -524,7 +524,7 @@
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_SCRUB_FORCE_TESTING
VARIABLE_NAME INNODB_SCRUB_LOG
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -1881,6 +2287,34 @@
......
......@@ -565,6 +565,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEBUG_FORCE_SCRUBBING
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Perform extra scrubbing to increase test exposure
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEFAULT_PAGE_ENCRYPTION_KEY
SESSION_VALUE NULL
GLOBAL_VALUE 1
......@@ -1839,20 +1853,6 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SCRUB_FORCE_TESTING
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Perform extra scrubbing to increase test exposure
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_SCRUB_LOG
SESSION_VALUE NULL
GLOBAL_VALUE OFF
......
......@@ -2,41 +2,41 @@
--source include/have_innodb.inc
--source include/have_debug.inc
SET @start_global_value = @@global.innodb_scrub_force_testing;
SET @start_global_value = @@global.innodb_debug_force_scrubbing;
--echo #
--echo # exists as global only
--echo #
select @@global.innodb_scrub_force_testing;
select @@global.innodb_debug_force_scrubbing;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_scrub_force_testing;
show global variables like 'innodb_scrub_force_testing';
show session variables like 'innodb_scrub_force_testing';
select @@session.innodb_debug_force_scrubbing;
show global variables like 'innodb_debug_force_scrubbing';
show session variables like 'innodb_debug_force_scrubbing';
select * from information_schema.global_variables
where variable_name='innodb_scrub_force_testing';
where variable_name='innodb_debug_force_scrubbing';
select * from information_schema.session_variables
where variable_name='innodb_scrub_force_testing';
where variable_name='innodb_debug_force_scrubbing';
--echo #
--echo # show that it's writable
--echo #
set global innodb_scrub_force_testing=ON;
select @@global.innodb_scrub_force_testing;
set global innodb_scrub_force_testing=OFF;
select @@global.innodb_scrub_force_testing;
set global innodb_scrub_force_testing=1;
select @@global.innodb_scrub_force_testing;
set global innodb_debug_force_scrubbing=ON;
select @@global.innodb_debug_force_scrubbing;
set global innodb_debug_force_scrubbing=OFF;
select @@global.innodb_debug_force_scrubbing;
set global innodb_debug_force_scrubbing=1;
select @@global.innodb_debug_force_scrubbing;
--error ER_GLOBAL_VARIABLE
set session innodb_scrub_force_testing=1;
set session innodb_debug_force_scrubbing=1;
--echo #
--echo # incorrect types
--echo #
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_scrub_force_testing=1.1;
set global innodb_debug_force_scrubbing=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_scrub_force_testing=1e1;
set global innodb_debug_force_scrubbing=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_scrub_force_testing="foo";
set global innodb_debug_force_scrubbing="foo";
SET @@global.innodb_scrub_force_testing = @start_global_value;
SET @@global.innodb_debug_force_scrubbing = @start_global_value;
......@@ -19218,7 +19218,7 @@ static MYSQL_SYSVAR_UINT(background_scrub_data_interval,
UINT_MAX32, 0);
#ifdef UNIV_DEBUG
static MYSQL_SYSVAR_BOOL(scrub_force_testing,
static MYSQL_SYSVAR_BOOL(debug_force_scrubbing,
srv_scrub_force_testing,
0,
"Perform extra scrubbing to increase test exposure",
......@@ -19426,7 +19426,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(background_scrub_data_interval),
MYSQL_SYSVAR(background_scrub_data_check_interval),
#ifdef UNIV_DEBUG
MYSQL_SYSVAR(scrub_force_testing),
MYSQL_SYSVAR(debug_force_scrubbing),
#endif
MYSQL_SYSVAR(instrument_semaphores),
NULL
......
......@@ -20401,7 +20401,7 @@ static MYSQL_SYSVAR_UINT(background_scrub_data_interval,
UINT_MAX32, 0);
#ifdef UNIV_DEBUG
static MYSQL_SYSVAR_BOOL(scrub_force_testing,
static MYSQL_SYSVAR_BOOL(debug_force_scrubbing,
srv_scrub_force_testing,
0,
"Perform extra scrubbing to increase test exposure",
......@@ -20646,7 +20646,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(background_scrub_data_interval),
MYSQL_SYSVAR(background_scrub_data_check_interval),
#ifdef UNIV_DEBUG
MYSQL_SYSVAR(scrub_force_testing),
MYSQL_SYSVAR(debug_force_scrubbing),
#endif
MYSQL_SYSVAR(instrument_semaphores),
NULL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment