SET @start_global_value = @@global.innodb_old_blocks_pct;
SELECT @start_global_value;
@start_global_value
37
Valid values are between 5 and 95
select @@global.innodb_old_blocks_pct between 5 and 95;
@@global.innodb_old_blocks_pct between 5 and 95
1
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
37
select @@session.innodb_old_blocks_pct;
ERROR HY000: Variable 'innodb_old_blocks_pct' is a GLOBAL variable
show global variables like 'innodb_old_blocks_pct';
Variable_name	Value
innodb_old_blocks_pct	37
show session variables like 'innodb_old_blocks_pct';
Variable_name	Value
innodb_old_blocks_pct	37
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME	VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT	37
select * from information_schema.session_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME	VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT	37
set global innodb_old_blocks_pct=10;
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
10
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME	VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT	10
select * from information_schema.session_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME	VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT	10
set session innodb_old_blocks_pct=1;
ERROR HY000: Variable 'innodb_old_blocks_pct' is a GLOBAL variable and should be set with SET GLOBAL
set @@global.innodb_old_blocks_pct=DEFAULT;
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
37
set global innodb_old_blocks_pct=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
set global innodb_old_blocks_pct=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
set global innodb_old_blocks_pct="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
set global innodb_old_blocks_pct=" ";
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
set global innodb_old_blocks_pct='';
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
set global innodb_old_blocks_pct=4;
Warnings:
Warning	1292	Truncated incorrect innodb_old_blocks_pct value: '4'
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
5
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME	VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT	5
set global innodb_old_blocks_pct=-7;
Warnings:
Warning	1292	Truncated incorrect innodb_old_blocks_pct value: '-7'
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
5
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME	VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT	5
set global innodb_old_blocks_pct=96;
Warnings:
Warning	1292	Truncated incorrect innodb_old_blocks_pct value: '96'
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
95
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
VARIABLE_NAME	VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT	95
set global innodb_old_blocks_pct=5;
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
5
set global innodb_old_blocks_pct=95;
select @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
95
SET @@global.innodb_old_blocks_pct = @start_global_value;
SELECT @@global.innodb_old_blocks_pct;
@@global.innodb_old_blocks_pct
37
