1SET @start_global_value = @@global.innodb_background_scrub_data_check_interval;
2#
3# default value
4#
5select @@global.innodb_background_scrub_data_check_interval;
6@@global.innodb_background_scrub_data_check_interval
73600
8set global innodb_background_scrub_data_check_interval=10;
9select @@global.innodb_background_scrub_data_check_interval;
10@@global.innodb_background_scrub_data_check_interval
1110
12set global innodb_background_scrub_data_check_interval=DEFAULT;
13select @@global.innodb_background_scrub_data_check_interval;
14@@global.innodb_background_scrub_data_check_interval
153600
16set global innodb_background_scrub_data_check_interval=20;
17select @@global.innodb_background_scrub_data_check_interval;
18@@global.innodb_background_scrub_data_check_interval
1920
20set global innodb_background_scrub_data_check_interval=DEFAULT;
21select @@global.innodb_background_scrub_data_check_interval;
22@@global.innodb_background_scrub_data_check_interval
233600
24#
25# exists as global only
26#
27select @@global.innodb_background_scrub_data_check_interval;
28@@global.innodb_background_scrub_data_check_interval
293600
30select @@session.innodb_background_scrub_data_check_interval;
31ERROR HY000: Variable 'innodb_background_scrub_data_check_interval' is a GLOBAL variable
32show global variables like 'innodb_background_scrub_data_check_interval';
33Variable_name	Value
34innodb_background_scrub_data_check_interval	3600
35show session variables like 'innodb_background_scrub_data_check_interval';
36Variable_name	Value
37innodb_background_scrub_data_check_interval	3600
38select * from information_schema.global_variables
39where variable_name='innodb_background_scrub_data_check_interval';
40VARIABLE_NAME	VARIABLE_VALUE
41INNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVAL	3600
42select * from information_schema.session_variables
43where variable_name='innodb_background_scrub_data_check_interval';
44VARIABLE_NAME	VARIABLE_VALUE
45INNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVAL	3600
46#
47# show that it's writable
48#
49set global innodb_background_scrub_data_check_interval=10;
50select @@global.innodb_background_scrub_data_check_interval;
51@@global.innodb_background_scrub_data_check_interval
5210
53set global innodb_background_scrub_data_check_interval=20;
54select @@global.innodb_background_scrub_data_check_interval;
55@@global.innodb_background_scrub_data_check_interval
5620
57set global innodb_background_scrub_data_check_interval=1;
58select @@global.innodb_background_scrub_data_check_interval;
59@@global.innodb_background_scrub_data_check_interval
601
61set session innodb_background_scrub_data_check_interval=1;
62ERROR HY000: Variable 'innodb_background_scrub_data_check_interval' is a GLOBAL variable and should be set with SET GLOBAL
63#
64# incorrect types
65#
66set global innodb_background_scrub_data_check_interval=1.1;
67ERROR 42000: Incorrect argument type to variable 'innodb_background_scrub_data_check_interval'
68set global innodb_background_scrub_data_check_interval=1e1;
69ERROR 42000: Incorrect argument type to variable 'innodb_background_scrub_data_check_interval'
70set global innodb_background_scrub_data_check_interval="foo";
71ERROR 42000: Incorrect argument type to variable 'innodb_background_scrub_data_check_interval'
72SET @@global.innodb_background_scrub_data_check_interval = @start_global_value;
73