SET @start_global_value = @@global.innodb_background_scrub_data_check_interval; # # default value # select @@global.innodb_background_scrub_data_check_interval; @@global.innodb_background_scrub_data_check_interval 3600 set global innodb_background_scrub_data_check_interval=10; select @@global.innodb_background_scrub_data_check_interval; @@global.innodb_background_scrub_data_check_interval 10 set global innodb_background_scrub_data_check_interval=DEFAULT; select @@global.innodb_background_scrub_data_check_interval; @@global.innodb_background_scrub_data_check_interval 3600 set global innodb_background_scrub_data_check_interval=20; select @@global.innodb_background_scrub_data_check_interval; @@global.innodb_background_scrub_data_check_interval 20 set global innodb_background_scrub_data_check_interval=DEFAULT; select @@global.innodb_background_scrub_data_check_interval; @@global.innodb_background_scrub_data_check_interval 3600 # # exists as global only # select @@global.innodb_background_scrub_data_check_interval; @@global.innodb_background_scrub_data_check_interval 3600 select @@session.innodb_background_scrub_data_check_interval; ERROR HY000: Variable 'innodb_background_scrub_data_check_interval' is a GLOBAL variable show global variables like 'innodb_background_scrub_data_check_interval'; Variable_name Value innodb_background_scrub_data_check_interval 3600 show session variables like 'innodb_background_scrub_data_check_interval'; Variable_name Value innodb_background_scrub_data_check_interval 3600 select * from information_schema.global_variables where variable_name='innodb_background_scrub_data_check_interval'; VARIABLE_NAME VARIABLE_VALUE INNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVAL 3600 select * from information_schema.session_variables where variable_name='innodb_background_scrub_data_check_interval'; VARIABLE_NAME VARIABLE_VALUE INNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVAL 3600 # # show that it's writable # set global innodb_background_scrub_data_check_interval=10; select @@global.innodb_background_scrub_data_check_interval; @@global.innodb_background_scrub_data_check_interval 10 set global innodb_background_scrub_data_check_interval=20; select @@global.innodb_background_scrub_data_check_interval; @@global.innodb_background_scrub_data_check_interval 20 set global innodb_background_scrub_data_check_interval=1; select @@global.innodb_background_scrub_data_check_interval; @@global.innodb_background_scrub_data_check_interval 1 set session innodb_background_scrub_data_check_interval=1; ERROR HY000: Variable 'innodb_background_scrub_data_check_interval' is a GLOBAL variable and should be set with SET GLOBAL # # incorrect types # set global innodb_background_scrub_data_check_interval=1.1; ERROR 42000: Incorrect argument type to variable 'innodb_background_scrub_data_check_interval' set global innodb_background_scrub_data_check_interval=1e1; ERROR 42000: Incorrect argument type to variable 'innodb_background_scrub_data_check_interval' set global innodb_background_scrub_data_check_interval="foo"; ERROR 42000: Incorrect argument type to variable 'innodb_background_scrub_data_check_interval' SET @@global.innodb_background_scrub_data_check_interval = @start_global_value;