--source include/have_debug.inc
--source include/have_innodb.inc

# A dynamic, global variable

SET @start_value = @@GLOBAL.innodb_cleaner_max_lru_time;

# Default value
SELECT @@GLOBAL.innodb_cleaner_max_lru_time;

# Global only
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@SESSION.innodb_cleaner_max_lru_time;

# Correct values
SET GLOBAL innodb_cleaner_max_lru_time=0;
SELECT @@GLOBAL.innodb_cleaner_max_lru_time;
SET GLOBAL innodb_cleaner_max_lru_time=1000;
SELECT @@GLOBAL.innodb_cleaner_max_lru_time;
SET GLOBAL innodb_cleaner_max_lru_time=4294967295;
SELECT @@GLOBAL.innodb_cleaner_max_lru_time;

# Incorrect values
--error ER_WRONG_TYPE_FOR_VAR
SET GLOBAL innodb_cleaner_max_lru_time=1.1;
--error ER_WRONG_TYPE_FOR_VAR
SET GLOBAL innodb_cleaner_max_lru_time=1e1;
--error ER_WRONG_TYPE_FOR_VAR
SET GLOBAL innodb_cleaner_max_lru_time='foo';

SET GLOBAL innodb_cleaner_max_lru_time = @start_value;
