--source include/have_innodb.inc SELECT @@GLOBAL.innodb_doublewrite; SET @@GLOBAL.innodb_doublewrite=0; SELECT @@GLOBAL.innodb_doublewrite; SET @@GLOBAL.innodb_doublewrite=2; --error ER_WRONG_VALUE_FOR_VAR SET @@GLOBAL.innodb_doublewrite=3; SELECT @@GLOBAL.innodb_doublewrite; SET @@GLOBAL.innodb_doublewrite=1; SELECT @@GLOBAL.innodb_doublewrite; SELECT COUNT(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_doublewrite'; --echo '#---------------------BS_STVARS_026_04----------------------#' ################################################################################ # Check if accessing variable with and without GLOBAL point to same variable # ################################################################################ SELECT @@innodb_doublewrite = @@GLOBAL.innodb_doublewrite; --echo 1 Expected --echo '#---------------------BS_STVARS_026_05----------------------#' ################################################################################ # Check if innodb_doublewrite can be accessed with and without @@ sign # ################################################################################ SELECT COUNT(@@innodb_doublewrite); --echo 1 Expected --Error ER_INCORRECT_GLOBAL_LOCAL_VAR SELECT COUNT(@@local.innodb_doublewrite); --echo Expected error 'Variable is a GLOBAL variable' --Error ER_INCORRECT_GLOBAL_LOCAL_VAR SELECT COUNT(@@SESSION.innodb_doublewrite); --echo Expected error 'Variable is a GLOBAL variable' SELECT COUNT(@@GLOBAL.innodb_doublewrite); --echo 1 Expected --error ER_INCORRECT_GLOBAL_LOCAL_VAR SELECT @@innodb_doublewrite = @@SESSION.innodb_doublewrite;