SET @start_global_value = @@global.innodb_stats_modified_counter;
SELECT @start_global_value;
@start_global_value
0
Valid values are one or above
select @@global.innodb_stats_modified_counter >=1;
@@global.innodb_stats_modified_counter >=1
0
select @@global.innodb_stats_modified_counter;
@@global.innodb_stats_modified_counter
0
select @@session.innodb_stats_modified_counter;
ERROR HY000: Variable 'innodb_stats_modified_counter' is a GLOBAL variable
show global variables like 'innodb_stats_modified_counter';
Variable_name	Value
innodb_stats_modified_counter	0
show session variables like 'innodb_stats_modified_counter';
Variable_name	Value
innodb_stats_modified_counter	0
select * from information_schema.global_variables where variable_name='innodb_stats_modified_counter';
VARIABLE_NAME	VARIABLE_VALUE
INNODB_STATS_MODIFIED_COUNTER	0
select * from information_schema.session_variables where variable_name='innodb_stats_modified_counter';
VARIABLE_NAME	VARIABLE_VALUE
INNODB_STATS_MODIFIED_COUNTER	0
set global innodb_stats_modified_counter=10;
select @@global.innodb_stats_modified_counter;
@@global.innodb_stats_modified_counter
10
select * from information_schema.global_variables where variable_name='innodb_stats_modified_counter';
VARIABLE_NAME	VARIABLE_VALUE
INNODB_STATS_MODIFIED_COUNTER	10
select * from information_schema.session_variables where variable_name='innodb_stats_modified_counter';
VARIABLE_NAME	VARIABLE_VALUE
INNODB_STATS_MODIFIED_COUNTER	10
set session innodb_stats_modified_counter=1;
ERROR HY000: Variable 'innodb_stats_modified_counter' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_stats_modified_counter=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_stats_modified_counter'
set global innodb_stats_modified_counter=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_stats_modified_counter'
set global innodb_stats_modified_counter="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_stats_modified_counter'
set global innodb_stats_modified_counter=-7;
Warnings:
Warning	1292	Truncated incorrect innodb_stats_modified_counter value: '-7'
select @@global.innodb_stats_modified_counter;
@@global.innodb_stats_modified_counter
0
select * from information_schema.global_variables where variable_name='innodb_stats_modified_counter';
VARIABLE_NAME	VARIABLE_VALUE
INNODB_STATS_MODIFIED_COUNTER	0
SET @@global.innodb_stats_modified_counter = @start_global_value;
SELECT @@global.innodb_stats_modified_counter;
@@global.innodb_stats_modified_counter
0
