--source include/have_debug.inc
--source include/have_xtradb.inc
--source include/linux.inc

# A dynamic, global variable

SET @start_value = @@GLOBAL.innodb_priority_cleaner;

# Default value
SELECT @@GLOBAL.innodb_priority_cleaner;

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

# Correct values
SET GLOBAL innodb_priority_cleaner='OFF';
SELECT @@GLOBAL.innodb_priority_cleaner;
SET GLOBAL innodb_priority_cleaner='ON';
SELECT @@GLOBAL.innodb_priority_cleaner;
SET GLOBAL innodb_priority_cleaner=0;
SELECT @@GLOBAL.innodb_priority_cleaner;
SET GLOBAL innodb_priority_cleaner=1;
SELECT @@GLOBAL.innodb_priority_cleaner;

# Incorrect values
--error ER_WRONG_TYPE_FOR_VAR
SET GLOBAL innodb_priority_cleaner=1.1;
--error ER_WRONG_TYPE_FOR_VAR
SET GLOBAL innodb_priority_cleaner=1e1;
--error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL innodb_priority_cleaner=2;
--error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL innodb_priority_cleaner='foo';

SET GLOBAL innodb_priority_cleaner = @start_value;
