SET @start_global_value = @@global.innodb_stats_sample_pages; SELECT @start_global_value; @start_global_value 8 Valid values are one or above select @@global.innodb_stats_sample_pages >=1; @@global.innodb_stats_sample_pages >=1 1 select @@global.innodb_stats_sample_pages; @@global.innodb_stats_sample_pages 8 select @@session.innodb_stats_sample_pages; ERROR HY000: Variable 'innodb_stats_sample_pages' is a GLOBAL variable show global variables like 'innodb_stats_sample_pages'; Variable_name Value innodb_stats_sample_pages 8 show session variables like 'innodb_stats_sample_pages'; Variable_name Value innodb_stats_sample_pages 8 select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages'; VARIABLE_NAME VARIABLE_VALUE INNODB_STATS_SAMPLE_PAGES 8 select * from information_schema.session_variables where variable_name='innodb_stats_sample_pages'; VARIABLE_NAME VARIABLE_VALUE INNODB_STATS_SAMPLE_PAGES 8 set global innodb_stats_sample_pages=10; Warnings: Warning 131 Using innodb_stats_sample_pages is deprecated and the variable may be removed in future releases. Please use innodb_stats_transient_sample_pages instead. select @@global.innodb_stats_sample_pages; @@global.innodb_stats_sample_pages 10 select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages'; VARIABLE_NAME VARIABLE_VALUE INNODB_STATS_SAMPLE_PAGES 10 select * from information_schema.session_variables where variable_name='innodb_stats_sample_pages'; VARIABLE_NAME VARIABLE_VALUE INNODB_STATS_SAMPLE_PAGES 10 set session innodb_stats_sample_pages=1; ERROR HY000: Variable 'innodb_stats_sample_pages' is a GLOBAL variable and should be set with SET GLOBAL set global innodb_stats_sample_pages=1.1; ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages' set global innodb_stats_sample_pages=1e1; ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages' set global innodb_stats_sample_pages="foo"; ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages' set global innodb_stats_sample_pages=-7; Warnings: Warning 1292 Truncated incorrect innodb_stats_sample_pages value: '-7' Warning 131 Using innodb_stats_sample_pages is deprecated and the variable may be removed in future releases. Please use innodb_stats_transient_sample_pages instead. select @@global.innodb_stats_sample_pages; @@global.innodb_stats_sample_pages 1 select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages'; VARIABLE_NAME VARIABLE_VALUE INNODB_STATS_SAMPLE_PAGES 1 SET @@global.innodb_stats_sample_pages = @start_global_value; Warnings: Warning 131 Using innodb_stats_sample_pages is deprecated and the variable may be removed in future releases. Please use innodb_stats_transient_sample_pages instead. SELECT @@global.innodb_stats_sample_pages; @@global.innodb_stats_sample_pages 8