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

#
# exists as global only
#
select @@global.innodb_doublewrite_batch_size between 1 and 127;
select @@global.innodb_doublewrite_batch_size;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_doublewrite_batch_size;
show global variables like 'innodb_doublewrite_batch_size';
show session variables like 'innodb_doublewrite_batch_size';
select * from information_schema.global_variables where variable_name='innodb_doublewrite_batch_size';
select * from information_schema.session_variables where variable_name='innodb_doublewrite_batch_size';

#
# show that it's read-only
#
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_doublewrite_batch_size=1;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set @@session.innodb_doublewrite_batch_size='some';
