diff options
Diffstat (limited to 'mysql-test/suite/sys_vars/t/innodb_disable_resize_buffer_pool_debug_basic.test')
-rw-r--r-- | mysql-test/suite/sys_vars/t/innodb_disable_resize_buffer_pool_debug_basic.test | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/mysql-test/suite/sys_vars/t/innodb_disable_resize_buffer_pool_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_disable_resize_buffer_pool_debug_basic.test new file mode 100644 index 00000000000..e381e746c06 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_disable_resize_buffer_pool_debug_basic.test @@ -0,0 +1,72 @@ +--echo # +--echo # Basic test for innodb_disable_resize_buffer_pool_debug +--echo # + +--source include/have_innodb.inc + +# The config variable is a debug variable +-- source include/have_debug.inc + +SET @start_global_value = @@global.innodb_disable_resize_buffer_pool_debug; + +# Check if Value can set + +SET @@global.innodb_disable_resize_buffer_pool_debug = 0; +SELECT @@global.innodb_disable_resize_buffer_pool_debug; + +SET @@global.innodb_disable_resize_buffer_pool_debug ='On' ; +SELECT @@global.innodb_disable_resize_buffer_pool_debug; + +SET @@global.innodb_disable_resize_buffer_pool_debug ='Off' ; +SELECT @@global.innodb_disable_resize_buffer_pool_debug; + +SET @@global.innodb_disable_resize_buffer_pool_debug = 1; +SELECT @@global.innodb_disable_resize_buffer_pool_debug; + +# Check if the value in GLOBAL Table matches value in variable + +--disable_warnings +SELECT IF(@@GLOBAL.innodb_disable_resize_buffer_pool_debug,'ON','OFF') = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='innodb_disable_resize_buffer_pool_debug'; +--enable_warnings +--echo 1 Expected + +SELECT COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug); +--echo 1 Expected + +--disable_warnings +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='innodb_disable_resize_buffer_pool_debug'; +--enable_warnings +--echo 1 Expected + +# Check if accessing variable with and without GLOBAL point to same variable + +SELECT @@innodb_disable_resize_buffer_pool_debug = @@GLOBAL.innodb_disable_resize_buffer_pool_debug; +--echo 1 Expected + +# Check if innodb_disable_resize_buffer_pool_debug can be accessed with and without @@ sign + +SELECT COUNT(@@innodb_disable_resize_buffer_pool_debug); +--echo 1 Expected + +--Error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT COUNT(@@local.innodb_disable_resize_buffer_pool_debug); +--echo Expected error 'Variable is a GLOBAL variable' + +--Error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT COUNT(@@SESSION.innodb_disable_resize_buffer_pool_debug); +--echo Expected error 'Variable is a GLOBAL variable' + +SELECT COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug); +--echo 1 Expected + +--Error ER_BAD_FIELD_ERROR +SELECT innodb_disable_resize_buffer_pool_debug = @@SESSION.innodb_disable_resize_buffer_pool_debug; + +# Cleanup + +SET @@global.innodb_disable_resize_buffer_pool_debug = @start_global_value; +SELECT @@global.innodb_disable_resize_buffer_pool_debug; |