mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
sys_var suite passes
This commit is contained in:
@@ -0,0 +1 @@
|
||||
--host-cache-size=123
|
||||
41
mysql-test/suite/sys_vars/t/host_cache_size_basic.test
Normal file
41
mysql-test/suite/sys_vars/t/host_cache_size_basic.test
Normal file
@@ -0,0 +1,41 @@
|
||||
--source include/not_embedded.inc
|
||||
|
||||
#
|
||||
# Only global
|
||||
#
|
||||
|
||||
select @@global.host_cache_size;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.host_cache_size;
|
||||
|
||||
show global variables like 'host_cache_size';
|
||||
|
||||
show session variables like 'host_cache_size';
|
||||
|
||||
select * from information_schema.global_variables
|
||||
where variable_name='host_cache_size';
|
||||
|
||||
select * from information_schema.session_variables
|
||||
where variable_name='host_cache_size';
|
||||
|
||||
#
|
||||
# Read-Write
|
||||
#
|
||||
|
||||
set global host_cache_size=1;
|
||||
select @@global.host_cache_size;
|
||||
|
||||
set global host_cache_size=12;
|
||||
select @@global.host_cache_size;
|
||||
|
||||
set global host_cache_size=0;
|
||||
select @@global.host_cache_size;
|
||||
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session host_cache_size=1;
|
||||
|
||||
# Restore default
|
||||
set global host_cache_size=123;
|
||||
select @@global.host_cache_size;
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
############ mysql-test\t\innodb_adaptive_flushing_lwm_basic.test #############
|
||||
# #
|
||||
# Variable Name: innodb_adaptive_flushing_lwm #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 10 #
|
||||
# Range: 0-70 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author: Rizwan #
|
||||
# #
|
||||
#Description:Test Cases of Dynamic System Variable innodb_adaptive_flushing_lwm #
|
||||
# that checks the behavior of this variable in the following ways #
|
||||
# * Default Value #
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
########################################################################
|
||||
# START OF innodb_adaptive_flushing_lwm TESTS #
|
||||
########################################################################
|
||||
|
||||
|
||||
###############################################################################
|
||||
#Saving initial value of innodb_adaptive_flushing_lwm in a temporary variable #
|
||||
###############################################################################
|
||||
|
||||
SET @global_start_value = @@global.innodb_adaptive_flushing_lwm;
|
||||
SELECT @global_start_value;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
|
||||
########################################################################
|
||||
# Display the DEFAULT value of innodb_adaptive_flushing_lwm #
|
||||
########################################################################
|
||||
|
||||
SET @@global.innodb_adaptive_flushing_lwm = 1;
|
||||
SET @@global.innodb_adaptive_flushing_lwm = DEFAULT;
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
|
||||
###################################################################################
|
||||
# Check if innodb_adaptive_flushing_lwm can be accessed with and without @@ sign #
|
||||
###################################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET innodb_adaptive_flushing_lwm = 1;
|
||||
SELECT @@innodb_adaptive_flushing_lwm;
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.innodb_adaptive_flushing_lwm;
|
||||
|
||||
SET global innodb_adaptive_flushing_lwm = 1;
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
|
||||
###############################################################################
|
||||
# change the value of innodb_adaptive_flushing_lwm to a valid value #
|
||||
###############################################################################
|
||||
|
||||
SET @@global.innodb_adaptive_flushing_lwm = 1;
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
|
||||
SET @@global.innodb_adaptive_flushing_lwm = 60;
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
SET @@global.innodb_adaptive_flushing_lwm = 70;
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
|
||||
###########################################################################
|
||||
# Change the value of innodb_adaptive_flushing_lwm to invalid value #
|
||||
###########################################################################
|
||||
|
||||
SET @@global.innodb_adaptive_flushing_lwm = -1;
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_adaptive_flushing_lwm = "T";
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_adaptive_flushing_lwm = "Y";
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
|
||||
SET @@global.innodb_adaptive_flushing_lwm = 71;
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
|
||||
#########################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#########################################################################
|
||||
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm =
|
||||
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_adaptive_flushing_lwm';
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_adaptive_flushing_lwm';
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
|
||||
###################################################################
|
||||
# Check if ON and OFF values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_adaptive_flushing_lwm = OFF;
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_adaptive_flushing_lwm = ON;
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
|
||||
SET @@global.innodb_adaptive_flushing_lwm = TRUE;
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
SET @@global.innodb_adaptive_flushing_lwm = FALSE;
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
SET @@global.innodb_adaptive_flushing_lwm = @global_start_value;
|
||||
SELECT @@global.innodb_adaptive_flushing_lwm;
|
||||
|
||||
###############################################################
|
||||
# END OF innodb_adaptive_flushing_lwm TESTS #
|
||||
###############################################################
|
||||
@@ -1,81 +0,0 @@
|
||||
|
||||
# 2010-01-25 - Added
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_analyze_is_persistent;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are 'ON' and 'OFF'
|
||||
SELECT @@global.innodb_analyze_is_persistent in (0, 1);
|
||||
SELECT @@global.innodb_analyze_is_persistent;
|
||||
#--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@session.innodb_analyze_is_persistent;
|
||||
SHOW global variables LIKE 'innodb_analyze_is_persistent';
|
||||
SHOW session variables LIKE 'innodb_analyze_is_persistent';
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_analyze_is_persistent';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_analyze_is_persistent';
|
||||
|
||||
#
|
||||
# SHOW that it's writable
|
||||
#
|
||||
SET global innodb_analyze_is_persistent='OFF';
|
||||
SELECT @@global.innodb_analyze_is_persistent;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_analyze_is_persistent';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_analyze_is_persistent';
|
||||
SET @@global.innodb_analyze_is_persistent=1;
|
||||
SELECT @@global.innodb_analyze_is_persistent;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_analyze_is_persistent';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_analyze_is_persistent';
|
||||
SET global innodb_analyze_is_persistent=0;
|
||||
SELECT @@global.innodb_analyze_is_persistent;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_analyze_is_persistent';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_analyze_is_persistent';
|
||||
SET @@global.innodb_analyze_is_persistent='ON';
|
||||
SELECT @@global.innodb_analyze_is_persistent;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_analyze_is_persistent';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_analyze_is_persistent';
|
||||
#--error ER_GLOBAL_VARIABLE
|
||||
SET session innodb_analyze_is_persistent='OFF';
|
||||
#--error ER_GLOBAL_VARIABLE
|
||||
SET @@session.innodb_analyze_is_persistent='ON';
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_analyze_is_persistent=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_analyze_is_persistent=1e1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET global innodb_analyze_is_persistent=2;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET global innodb_analyze_is_persistent=-3;
|
||||
SELECT @@global.innodb_analyze_is_persistent;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_analyze_is_persistent';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_analyze_is_persistent';
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET global innodb_analyze_is_persistent='AUTO';
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_analyze_is_persistent = @start_global_value;
|
||||
SELECT @@global.innodb_analyze_is_persistent;
|
||||
@@ -0,0 +1,58 @@
|
||||
#
|
||||
# 2012-08-01 Added
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_api_bk_commit_interval;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are positive number
|
||||
SELECT @@global.innodb_api_bk_commit_interval > 0;
|
||||
SELECT @@global.innodb_api_bk_commit_interval <= 1024*1024*1024;
|
||||
SELECT @@global.innodb_api_bk_commit_interval;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@session.innodb_api_bk_commit_interval;
|
||||
SHOW global variables LIKE 'innodb_api_bk_commit_interval';
|
||||
SHOW session variables LIKE 'innodb_api_bk_commit_interval';
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_api_bk_commit_interval';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_api_bk_commit_interval';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
SET global innodb_api_bk_commit_interval=100;
|
||||
SELECT @@global.innodb_api_bk_commit_interval;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_api_bk_commit_interval';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_api_bk_commit_interval';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET session innodb_api_bk_commit_interval=1;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_api_bk_commit_interval=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_api_bk_commit_interval=1e1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_api_bk_commit_interval="foo";
|
||||
SET global innodb_api_bk_commit_interval=-7;
|
||||
SELECT @@global.innodb_api_bk_commit_interval;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_api_bk_commit_interval';
|
||||
|
||||
#
|
||||
# cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_api_bk_commit_interval = @start_global_value;
|
||||
SELECT @@global.innodb_api_bk_commit_interval;
|
||||
@@ -0,0 +1,102 @@
|
||||
|
||||
|
||||
################## mysql-test\t\innodb_api_disable_rowlock_basic.test ##############
|
||||
# #
|
||||
# Variable Name: innodb_api_disable_rowlock #
|
||||
# Scope: Global #
|
||||
# Access Type: Static #
|
||||
# Data Type: numeric #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author : Sharique Abdullah #
|
||||
# #
|
||||
# #
|
||||
# Description:Test Cases of Dynamic System Variable innodb_api_disable_rowlock #
|
||||
# that checks the behavior of this variable in the following ways #
|
||||
# * Value Check #
|
||||
# * Scope Check #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_01----------------------#'
|
||||
####################################################################
|
||||
# Displaying default value #
|
||||
####################################################################
|
||||
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_02----------------------#'
|
||||
####################################################################
|
||||
# Check if Value can set #
|
||||
####################################################################
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@GLOBAL.innodb_api_disable_rowlock=1;
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_03----------------------#'
|
||||
#################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#################################################################
|
||||
|
||||
SELECT IF(@@GLOBAL.innodb_api_disable_rowlock, 'ON', 'OFF') = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_api_disable_rowlock';
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_api_disable_rowlock';
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_04----------------------#'
|
||||
################################################################################
|
||||
# Check if accessing variable with and without GLOBAL point to same variable #
|
||||
################################################################################
|
||||
SELECT @@innodb_api_disable_rowlock = @@GLOBAL.innodb_api_enable_binlog;
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_05----------------------#'
|
||||
################################################################################
|
||||
# Check if innodb_log_file_size can be accessed with and without @@ sign #
|
||||
################################################################################
|
||||
|
||||
SELECT COUNT(@@innodb_api_disable_rowlock);
|
||||
--echo 1 Expected
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@local.innodb_api_disable_rowlock);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@SESSION.innodb_api_disable_rowlock);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
|
||||
--echo 1 Expected
|
||||
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT innodb_api_disable_rowlock = @@SESSION.innodb_api_enable_binlog;
|
||||
--echo Expected error 'Readonly variable'
|
||||
|
||||
|
||||
102
mysql-test/suite/sys_vars/t/innodb_api_enable_binlog_basic.test
Normal file
102
mysql-test/suite/sys_vars/t/innodb_api_enable_binlog_basic.test
Normal file
@@ -0,0 +1,102 @@
|
||||
|
||||
|
||||
################## mysql-test\t\innodb_api_enable_binlog_basic.test ##############
|
||||
# #
|
||||
# Variable Name: innodb_api_enable_binlog #
|
||||
# Scope: Global #
|
||||
# Access Type: Static #
|
||||
# Data Type: numeric #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author : Sharique Abdullah #
|
||||
# #
|
||||
# #
|
||||
# Description:Test Cases of Dynamic System Variable innodb_api_enable_binlog #
|
||||
# that checks the behavior of this variable in the following ways #
|
||||
# * Value Check #
|
||||
# * Scope Check #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_01----------------------#'
|
||||
####################################################################
|
||||
# Displaying default value #
|
||||
####################################################################
|
||||
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_02----------------------#'
|
||||
####################################################################
|
||||
# Check if Value can set #
|
||||
####################################################################
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@GLOBAL.innodb_api_enable_binlog=1;
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_03----------------------#'
|
||||
#################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#################################################################
|
||||
|
||||
SELECT IF(@@GLOBAL.innodb_api_enable_binlog, 'ON', 'OFF') = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_api_enable_binlog';
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_api_enable_binlog';
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_04----------------------#'
|
||||
################################################################################
|
||||
# Check if accessing variable with and without GLOBAL point to same variable #
|
||||
################################################################################
|
||||
SELECT @@innodb_api_enable_binlog = @@GLOBAL.innodb_api_enable_binlog;
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_05----------------------#'
|
||||
################################################################################
|
||||
# Check if innodb_log_file_size can be accessed with and without @@ sign #
|
||||
################################################################################
|
||||
|
||||
SELECT COUNT(@@innodb_api_enable_binlog);
|
||||
--echo 1 Expected
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@local.innodb_api_enable_binlog);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@SESSION.innodb_api_enable_binlog);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
|
||||
--echo 1 Expected
|
||||
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT innodb_api_enable_binlog = @@SESSION.innodb_api_enable_binlog;
|
||||
--echo Expected error 'Readonly variable'
|
||||
|
||||
|
||||
102
mysql-test/suite/sys_vars/t/innodb_api_enable_mdl_basic.test
Normal file
102
mysql-test/suite/sys_vars/t/innodb_api_enable_mdl_basic.test
Normal file
@@ -0,0 +1,102 @@
|
||||
|
||||
|
||||
################## mysql-test\t\innodb_api_enable_mdl_basic.test ##############
|
||||
# #
|
||||
# Variable Name: innodb_api_enable_mdl #
|
||||
# Scope: Global #
|
||||
# Access Type: Static #
|
||||
# Data Type: numeric #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author : Sharique Abdullah #
|
||||
# #
|
||||
# #
|
||||
# Description:Test Cases of Dynamic System Variable innodb_api_enable_mdl #
|
||||
# that checks the behavior of this variable in the following ways #
|
||||
# * Value Check #
|
||||
# * Scope Check #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_01----------------------#'
|
||||
####################################################################
|
||||
# Displaying default value #
|
||||
####################################################################
|
||||
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_02----------------------#'
|
||||
####################################################################
|
||||
# Check if Value can set #
|
||||
####################################################################
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@GLOBAL.innodb_api_enable_mdl=1;
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_03----------------------#'
|
||||
#################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#################################################################
|
||||
|
||||
SELECT IF(@@GLOBAL.innodb_api_enable_mdl, 'ON', 'OFF') = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_api_enable_mdl';
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_api_enable_mdl';
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_04----------------------#'
|
||||
################################################################################
|
||||
# Check if accessing variable with and without GLOBAL point to same variable #
|
||||
################################################################################
|
||||
SELECT @@innodb_api_enable_mdl = @@GLOBAL.innodb_api_enable_mdl;
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_035_05----------------------#'
|
||||
################################################################################
|
||||
# Check if innodb_log_file_size can be accessed with and without @@ sign #
|
||||
################################################################################
|
||||
|
||||
SELECT COUNT(@@innodb_api_enable_mdl);
|
||||
--echo 1 Expected
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@local.innodb_api_enable_mdl);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@SESSION.innodb_api_enable_mdl);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
|
||||
--echo 1 Expected
|
||||
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT innodb_api_enable_mdl = @@SESSION.innodb_api_enable_mdl;
|
||||
--echo Expected error 'Readonly variable'
|
||||
|
||||
|
||||
58
mysql-test/suite/sys_vars/t/innodb_api_trx_level_basic.test
Normal file
58
mysql-test/suite/sys_vars/t/innodb_api_trx_level_basic.test
Normal file
@@ -0,0 +1,58 @@
|
||||
#
|
||||
# 2011-08-01 Added
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_api_trx_level;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are zero or above
|
||||
SELECT @@global.innodb_api_trx_level >=0;
|
||||
SELECT @@global.innodb_api_trx_level <=3;
|
||||
SELECT @@global.innodb_api_trx_level;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@session.innodb_api_trx_level;
|
||||
SHOW global variables LIKE 'innodb_api_trx_level';
|
||||
SHOW session variables LIKE 'innodb_api_trx_level';
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_api_trx_level';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_api_trx_level';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
SET global innodb_api_trx_level=100;
|
||||
SELECT @@global.innodb_api_trx_level;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_api_trx_level';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_api_trx_level';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET session innodb_api_trx_level=1;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_api_trx_level=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_api_trx_level=1e1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_api_trx_level="foo";
|
||||
SET global innodb_api_trx_level=-7;
|
||||
SELECT @@global.innodb_api_trx_level;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_api_trx_level';
|
||||
|
||||
#
|
||||
# cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_api_trx_level = @start_global_value;
|
||||
SELECT @@global.innodb_api_trx_level;
|
||||
@@ -4,7 +4,7 @@
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 8 #
|
||||
# Default Value: 64 #
|
||||
# Range: 0,1 #
|
||||
# #
|
||||
# #
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
-- source include/have_innodb.inc
|
||||
# CREATE TABLE ... KEY_BLOCK_SIZE=8; does not work with page size = 4k
|
||||
-- source include/have_innodb_16k.inc
|
||||
|
||||
# Check the default value
|
||||
SELECT @@global.innodb_cmp_per_index_enabled;
|
||||
|
||||
# should be a boolean
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
SET GLOBAL innodb_stats_persistent=123;
|
||||
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
SET GLOBAL innodb_stats_persistent='foo';
|
||||
|
||||
# Check that changing value works and that setting the same value again
|
||||
# is as expected
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
SELECT @@global.innodb_cmp_per_index_enabled;
|
||||
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
SELECT @@global.innodb_cmp_per_index_enabled;
|
||||
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=OFF;
|
||||
SELECT @@global.innodb_cmp_per_index_enabled;
|
||||
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=OFF;
|
||||
SELECT @@global.innodb_cmp_per_index_enabled;
|
||||
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
|
||||
-- vertical_results
|
||||
|
||||
# Check that enabling after being disabled resets the stats
|
||||
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
|
||||
CREATE TABLE t (a INT) ENGINE=INNODB KEY_BLOCK_SIZE=8;
|
||||
|
||||
INSERT INTO t VALUES (1);
|
||||
|
||||
SELECT * FROM information_schema.innodb_cmp_per_index;
|
||||
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=OFF;
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
|
||||
SELECT * FROM information_schema.innodb_cmp_per_index;
|
||||
|
||||
DROP TABLE t;
|
||||
|
||||
# Check that enabling after being enabled does not reset the stats
|
||||
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
|
||||
CREATE TABLE t (a INT) ENGINE=INNODB KEY_BLOCK_SIZE=8;
|
||||
|
||||
INSERT INTO t VALUES (1);
|
||||
|
||||
SELECT * FROM information_schema.innodb_cmp_per_index;
|
||||
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
|
||||
SELECT * FROM information_schema.innodb_cmp_per_index;
|
||||
|
||||
DROP TABLE t;
|
||||
|
||||
#
|
||||
|
||||
SET GLOBAL innodb_file_format=default;
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=default;
|
||||
@@ -0,0 +1,143 @@
|
||||
##### mysql-test\t\innodb_compression_failure_threshold_pct_basic.test ########
|
||||
# #
|
||||
# Variable Name: innodb_compression_failure_threshold_pct #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 5 #
|
||||
# Range: 0-100 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author: Rizwan #
|
||||
# #
|
||||
#Description: Test Cases of Dynamic System Variable #
|
||||
# innodb_compression_failure_threshold_pct #
|
||||
# that checks the behavior of #
|
||||
# this variable in the following ways #
|
||||
# * Default Value #
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
--source include/have_innodb.inc
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
######################################################################
|
||||
# START OF innodb_compression_failure_threshold_pct TESTS #
|
||||
######################################################################
|
||||
|
||||
|
||||
############################################################################################
|
||||
# Saving initial value of innodb_compression_failure_threshold_pct in a temporary variable #
|
||||
############################################################################################
|
||||
|
||||
SET @global_start_value = @@global.innodb_compression_failure_threshold_pct;
|
||||
SELECT @global_start_value;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
|
||||
########################################################################
|
||||
# Display the DEFAULT value of innodb_compression_failure_threshold_pct#
|
||||
########################################################################
|
||||
|
||||
SET @@global.innodb_compression_failure_threshold_pct = 0;
|
||||
SET @@global.innodb_compression_failure_threshold_pct = DEFAULT;
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
|
||||
##############################################################################################
|
||||
# check if innodb_compression_failure_threshold_pct can be accessed with and without @@ sign #
|
||||
##############################################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET innodb_compression_failure_threshold_pct = 1;
|
||||
SELECT @@innodb_compression_failure_threshold_pct;
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.innodb_compression_failure_threshold_pct;
|
||||
|
||||
SET global innodb_compression_failure_threshold_pct = 0;
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
|
||||
#################################################################################
|
||||
# change the value of innodb_compression_failure_threshold_pct to a valid value #
|
||||
#################################################################################
|
||||
|
||||
SET @@global.innodb_compression_failure_threshold_pct = 0;
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
|
||||
SET @@global.innodb_compression_failure_threshold_pct = 1;
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
SET @@global.innodb_compression_failure_threshold_pct = 100;
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
|
||||
################################################################################
|
||||
# Cange the value of innodb_compression_failure_threshold_pct to invalid value #
|
||||
################################################################################
|
||||
|
||||
SET @@global.innodb_compression_failure_threshold_pct = -1;
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_compression_failure_threshold_pct = "T";
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_compression_failure_threshold_pct = "Y";
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
|
||||
SET @@global.innodb_compression_failure_threshold_pct = 101;
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
|
||||
#########################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#########################################################################
|
||||
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct =
|
||||
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_compression_failure_threshold_pct';
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_compression_failure_threshold_pct';
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
|
||||
###################################################################
|
||||
# Check if ON and OFF values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_compression_failure_threshold_pct = OFF;
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_compression_failure_threshold_pct = ON;
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
SET @@global.innodb_compression_failure_threshold_pct = TRUE;
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
SET @@global.innodb_compression_failure_threshold_pct = FALSE;
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
SET @@global.innodb_compression_failure_threshold_pct = @global_start_value;
|
||||
SELECT @@global.innodb_compression_failure_threshold_pct;
|
||||
|
||||
###############################################################
|
||||
# END OF innodb_compression_failure_threshold_pct TESTS #
|
||||
###############################################################
|
||||
@@ -0,0 +1,64 @@
|
||||
|
||||
|
||||
# 2012-05-29 - Added
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_compression_level;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid value 0-9
|
||||
select @@global.innodb_compression_level <= 9;
|
||||
select @@global.innodb_compression_level;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.innodb_compression_level;
|
||||
show global variables like 'innodb_compression_level';
|
||||
show session variables like 'innodb_compression_level';
|
||||
select * from information_schema.global_variables where variable_name='innodb_compression_level';
|
||||
select * from information_schema.session_variables where variable_name='innodb_compression_level';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global innodb_compression_level=2;
|
||||
select @@global.innodb_compression_level;
|
||||
select * from information_schema.global_variables where variable_name='innodb_compression_level';
|
||||
select * from information_schema.session_variables where variable_name='innodb_compression_level';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session innodb_compression_level=4;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_compression_level=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_compression_level=1e1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_compression_level="foo";
|
||||
|
||||
set global innodb_compression_level=10;
|
||||
select @@global.innodb_compression_level;
|
||||
select * from information_schema.global_variables where variable_name='innodb_compression_level';
|
||||
set global innodb_compression_level=-7;
|
||||
select @@global.innodb_compression_level;
|
||||
select * from information_schema.global_variables where variable_name='innodb_compression_level';
|
||||
|
||||
#
|
||||
# min/max values
|
||||
#
|
||||
set global innodb_compression_level=0;
|
||||
select @@global.innodb_compression_level;
|
||||
set global innodb_compression_level=9;
|
||||
select @@global.innodb_compression_level;
|
||||
|
||||
#
|
||||
# cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_compression_level = @start_global_value;
|
||||
SELECT @@global.innodb_compression_level;
|
||||
@@ -0,0 +1,136 @@
|
||||
############# mysql-test\t\innodb_compression_pad_pct_max_basic.test ##########
|
||||
# #
|
||||
# Variable Name: innodb_compression_pad_pct_max #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 50 #
|
||||
# Range: 0-75 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author: Rizwan #
|
||||
# #
|
||||
#Description: Test Cases of Dynamic System Variable #
|
||||
# innodb_compression_pad_pct_max #
|
||||
# that checks the behavior of #
|
||||
# this variable in the following ways #
|
||||
# * Default Value #
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
--source include/have_innodb.inc
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
######################################################################
|
||||
# START OF innodb_compression_pad_pct_max TESTS #
|
||||
######################################################################
|
||||
|
||||
|
||||
############################################################################################
|
||||
# Saving initial value of innodb_compression_pad_pct_max in a temporary variable #
|
||||
############################################################################################
|
||||
|
||||
SET @global_start_value = @@global.innodb_compression_pad_pct_max;
|
||||
SELECT @global_start_value;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
|
||||
########################################################################
|
||||
# Display the DEFAULT value of innodb_compression_pad_pct_max #
|
||||
########################################################################
|
||||
|
||||
SET @@global.innodb_compression_pad_pct_max = DEFAULT;
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
|
||||
##############################################################################################
|
||||
# check if innodb_compression_pad_pct_max can be accessed with and without @@ sign #
|
||||
##############################################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET innodb_compression_pad_pct_max = 1;
|
||||
SELECT @@innodb_compression_pad_pct_max;
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.innodb_compression_pad_pct_max;
|
||||
|
||||
SET global innodb_compression_pad_pct_max = 0;
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
|
||||
#################################################################################
|
||||
# change the value of innodb_compression_pad_pct_max to a valid value #
|
||||
#################################################################################
|
||||
|
||||
SET @@global.innodb_compression_pad_pct_max = 0;
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
|
||||
SET @@global.innodb_compression_pad_pct_max = 75;
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
|
||||
################################################################################
|
||||
# Cange the value of innodb_compression_pad_pct_max to invalid value #
|
||||
################################################################################
|
||||
|
||||
SET @@global.innodb_compression_pad_pct_max = -1;
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_compression_pad_pct_max = "T";
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
|
||||
SET @@global.innodb_compression_pad_pct_max = 76;
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
|
||||
#########################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#########################################################################
|
||||
|
||||
SELECT @@global.innodb_compression_pad_pct_max =
|
||||
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_compression_pad_pct_max';
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_compression_pad_pct_max';
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
|
||||
###################################################################
|
||||
# Check if ON and OFF values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_compression_pad_pct_max = OFF;
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_compression_pad_pct_max = ON;
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
SET @@global.innodb_compression_pad_pct_max = TRUE;
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
SET @@global.innodb_compression_pad_pct_max = FALSE;
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
SET @@global.innodb_compression_pad_pct_max = @global_start_value;
|
||||
SELECT @@global.innodb_compression_pad_pct_max;
|
||||
|
||||
###############################################################
|
||||
# END OF innodb_compression_pad_pct_max TESTS #
|
||||
###############################################################
|
||||
@@ -4,7 +4,7 @@
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 500 #
|
||||
# Default Value: 5000 #
|
||||
# Range: 1-4294967295 #
|
||||
# #
|
||||
# #
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# Basic test for innodb_disable_background_merge.
|
||||
#
|
||||
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
# The config variable is a debug variable
|
||||
-- source include/have_debug.inc
|
||||
|
||||
# Check the default value
|
||||
SET @orig = @@global.innodb_disable_background_merge;
|
||||
SELECT @orig;
|
||||
@@ -0,0 +1,151 @@
|
||||
################# mysql-test\t\innodb_flush_log_at_timeout_basic.test #########
|
||||
# #
|
||||
# Variable Name: innodb_flush_log_at_timeout #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 1 #
|
||||
# Range: 0-2700 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2012-05-10 #
|
||||
# Author: Nuno Carvalho #
|
||||
# #
|
||||
#Description: Test Cases of Dynamic System Variable #
|
||||
# innodb_flush_log_at_timeout that checks the behavior of #
|
||||
# this variable in the following ways #
|
||||
# * Default Value #
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
########################################################################
|
||||
# START OF innodb_flush_log_at_timeout TESTS #
|
||||
########################################################################
|
||||
|
||||
|
||||
#############################################################################
|
||||
# Saving initial value of innodb_flush_log_at_timeout #
|
||||
#############################################################################
|
||||
|
||||
|
||||
SET @global_start_value = @@global.innodb_flush_log_at_timeout;
|
||||
SELECT @global_start_value;
|
||||
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
|
||||
##########################################################################
|
||||
# Display the DEFAULT value of innodb_flush_log_at_timeout #
|
||||
##########################################################################
|
||||
|
||||
SET @@global.innodb_flush_log_at_timeout = 0;
|
||||
SET @@global.innodb_flush_log_at_timeout = DEFAULT;
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
|
||||
###############################################################################
|
||||
# Check if variable can be accessed with and without @@ sign #
|
||||
###############################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET innodb_flush_log_at_timeout = 1;
|
||||
SELECT @@innodb_flush_log_at_timeout;
|
||||
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.innodb_flush_log_at_timeout;
|
||||
|
||||
|
||||
SET global innodb_flush_log_at_timeout = 0;
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
|
||||
#############################################################################
|
||||
# change the value of innodb_flush_log_at_timeout to a valid value #
|
||||
#############################################################################
|
||||
|
||||
|
||||
SET @@global.innodb_flush_log_at_timeout = 0;
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
|
||||
SET @@global.innodb_flush_log_at_timeout = 10;
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
SET @@global.innodb_flush_log_at_timeout = 2700;
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
|
||||
###############################################################################
|
||||
# Change the value of innodb_flush_log_at_timeout to invalid value #
|
||||
###############################################################################
|
||||
|
||||
SET @@global.innodb_flush_log_at_timeout = -1;
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_flush_log_at_timeout = "T";
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_flush_log_at_timeout = "Y";
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
|
||||
SET @@global.innodb_flush_log_at_timeout = 2701;
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
|
||||
#########################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#########################################################################
|
||||
|
||||
SELECT @@global.innodb_flush_log_at_timeout =
|
||||
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_flush_log_at_timeout';
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_flush_log_at_timeout';
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
|
||||
###################################################################
|
||||
# Check if ON and OFF values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_flush_log_at_timeout = OFF;
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_flush_log_at_timeout = ON;
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
|
||||
SET @@global.innodb_flush_log_at_timeout = TRUE;
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
SET @@global.innodb_flush_log_at_timeout = FALSE;
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
|
||||
SET @@global.innodb_flush_log_at_timeout = @global_start_value;
|
||||
SELECT @@global.innodb_flush_log_at_timeout;
|
||||
|
||||
###############################################################
|
||||
# END OF innodb_flush_log_at_timeout TESTS #
|
||||
###############################################################
|
||||
@@ -11,8 +11,6 @@ SELECT @start_global_value;
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are 'ON' and 'OFF'
|
||||
select @@global.innodb_flush_neighbors in (0, 1);
|
||||
select @@global.innodb_flush_neighbors;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.innodb_flush_neighbors;
|
||||
@@ -24,11 +22,11 @@ select * from information_schema.session_variables where variable_name='innodb_f
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global innodb_flush_neighbors='OFF';
|
||||
set global innodb_flush_neighbors=0;
|
||||
select @@global.innodb_flush_neighbors;
|
||||
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
|
||||
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
|
||||
set @@global.innodb_flush_neighbors=1;
|
||||
set @@global.innodb_flush_neighbors=TRUE;
|
||||
select @@global.innodb_flush_neighbors;
|
||||
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
|
||||
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
|
||||
@@ -36,30 +34,35 @@ set global innodb_flush_neighbors=0;
|
||||
select @@global.innodb_flush_neighbors;
|
||||
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
|
||||
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
|
||||
set @@global.innodb_flush_neighbors='ON';
|
||||
set @@global.innodb_flush_neighbors=2;
|
||||
select @@global.innodb_flush_neighbors;
|
||||
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
|
||||
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
|
||||
set @@global.innodb_flush_neighbors=DEFAULT;
|
||||
select @@global.innodb_flush_neighbors;
|
||||
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
|
||||
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session innodb_flush_neighbors='OFF';
|
||||
set session innodb_flush_neighbors=0;
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set @@session.innodb_flush_neighbors='ON';
|
||||
set @@session.innodb_flush_neighbors=1;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_flush_neighbors='OFF';
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_flush_neighbors='ON';
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_flush_neighbors=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_flush_neighbors=1e1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_flush_neighbors=2;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_flush_neighbors=3;
|
||||
select @@global.innodb_flush_neighbors;
|
||||
set global innodb_flush_neighbors=-3;
|
||||
select @@global.innodb_flush_neighbors;
|
||||
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
|
||||
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_flush_neighbors='AUTO';
|
||||
|
||||
#
|
||||
|
||||
143
mysql-test/suite/sys_vars/t/innodb_flushing_avg_loops_basic.test
Normal file
143
mysql-test/suite/sys_vars/t/innodb_flushing_avg_loops_basic.test
Normal file
@@ -0,0 +1,143 @@
|
||||
############ mysql-test\t\innodb_flushing_avg_loops_basic.test ################
|
||||
# #
|
||||
# Variable Name: innodb_flushing_avg_loops #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 10 #
|
||||
# Range: 0-70 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author: Rizwan #
|
||||
# #
|
||||
#Description:Test Cases of Dynamic System Variable innodb_flushing_avg_loops #
|
||||
# that checks the behavior of this variable in the following ways #
|
||||
# * Default Value #
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
########################################################################
|
||||
# START OF innodb_flushing_avg_loops TESTS #
|
||||
########################################################################
|
||||
|
||||
|
||||
###############################################################################
|
||||
#Saving initial value of innodb_flushing_avg_loops in a temporary variable #
|
||||
###############################################################################
|
||||
|
||||
SET @global_start_value = @@global.innodb_flushing_avg_loops;
|
||||
SELECT @global_start_value;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
|
||||
########################################################################
|
||||
# Display the DEFAULT value of innodb_flushing_avg_loops #
|
||||
########################################################################
|
||||
|
||||
SET @@global.innodb_flushing_avg_loops = 1;
|
||||
SET @@global.innodb_flushing_avg_loops = DEFAULT;
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
|
||||
##################################################################################
|
||||
# Check if innodb_flushing_avg_loops can be accessed with and without @@ sign #
|
||||
##################################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET innodb_flushing_avg_loops = 1;
|
||||
SELECT @@innodb_flushing_avg_loops;
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.innodb_flushing_avg_loops;
|
||||
|
||||
SET global innodb_flushing_avg_loops = 1;
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
|
||||
###############################################################################
|
||||
# change the value of innodb_flushing_avg_loops to a valid value #
|
||||
###############################################################################
|
||||
|
||||
SET @@global.innodb_flushing_avg_loops = 1;
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
SET @@global.innodb_flushing_avg_loops = 60;
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
SET @@global.innodb_flushing_avg_loops = 1000;
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
|
||||
###########################################################################
|
||||
# Change the value of innodb_flushing_avg_loops to invalid value #
|
||||
###########################################################################
|
||||
|
||||
SET @@global.innodb_flushing_avg_loops = -1;
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_flushing_avg_loops = "T";
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_flushing_avg_loops = "Y";
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
SET @@global.innodb_flushing_avg_loops = 1001;
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
|
||||
#########################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#########################################################################
|
||||
|
||||
SELECT @@global.innodb_flushing_avg_loops =
|
||||
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_flushing_avg_loops';
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_flushing_avg_loops';
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
|
||||
###################################################################
|
||||
# Check if ON and OFF values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_flushing_avg_loops = OFF;
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_flushing_avg_loops = ON;
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
|
||||
SET @@global.innodb_flushing_avg_loops = TRUE;
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
SET @@global.innodb_flushing_avg_loops = FALSE;
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
SET @@global.innodb_flushing_avg_loops = @global_start_value;
|
||||
SELECT @@global.innodb_flushing_avg_loops;
|
||||
|
||||
###############################################################
|
||||
# END OF innodb_flushing_avg_loops TESTS #
|
||||
###############################################################
|
||||
@@ -0,0 +1,28 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
select @@global.innodb_force_recovery_crash in (0, 1);
|
||||
select @@global.innodb_force_recovery_crash;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.innodb_force_recovery_crash;
|
||||
show global variables like 'innodb_force_recovery_crash';
|
||||
show session variables like 'innodb_force_recovery_crash';
|
||||
select * from information_schema.global_variables where variable_name='innodb_force_recovery_crash';
|
||||
select * from information_schema.session_variables where variable_name='innodb_force_recovery_crash';
|
||||
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global innodb_force_recovery_crash=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global innodb_force_recovery_crash=0;
|
||||
select @@global.innodb_force_recovery_crash;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session innodb_force_recovery_crash='some';
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set @@session.innodb_force_recovery_crash='some';
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global innodb_force_recovery_crash='some';
|
||||
@@ -0,0 +1,74 @@
|
||||
|
||||
|
||||
# 2012-04-02 - Added
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_innodb_max_capacity = @@global.innodb_io_capacity_max;
|
||||
SELECT @start_innodb_max_capacity;
|
||||
|
||||
SET @start_innodb_capacity = @@global.innodb_io_capacity;
|
||||
SELECT @start_innodb_capacity;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid value 100 or more
|
||||
select @@global.innodb_io_capacity_max > 99;
|
||||
select @@global.innodb_io_capacity_max;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.innodb_io_capacity_max;
|
||||
show global variables like 'innodb_io_capacity_max';
|
||||
show session variables like 'innodb_io_capacity_max';
|
||||
select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
|
||||
select * from information_schema.session_variables where variable_name='innodb_io_capacity_max';
|
||||
|
||||
#
|
||||
# show that it's writable. Allowed value cannot be lower than innodb_io_capacity
|
||||
#
|
||||
set global innodb_io_capacity_max=@start_innodb_capacity + 1;
|
||||
select @@global.innodb_io_capacity_max;
|
||||
select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
|
||||
select * from information_schema.session_variables where variable_name='innodb_io_capacity_max';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session innodb_io_capacity_max=444;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_io_capacity_max=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_io_capacity_max=1e1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_io_capacity_max="foo";
|
||||
|
||||
#
|
||||
# can't set it below innodb_io_capacity
|
||||
#
|
||||
set global innodb_io_capacity_max=@start_innodb_capacity - 1;
|
||||
select @@global.innodb_io_capacity_max;
|
||||
select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
|
||||
set global innodb_io_capacity_max=-7;
|
||||
select @@global.innodb_io_capacity_max;
|
||||
select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
|
||||
|
||||
#
|
||||
# min/max values
|
||||
#
|
||||
# first set innodb_io_cpaacity lower
|
||||
set global innodb_io_capacity=100;
|
||||
set global innodb_io_capacity_max=100;
|
||||
select @@global.innodb_io_capacity_max;
|
||||
|
||||
#
|
||||
# cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_io_capacity_max = @start_innodb_max_capacity;
|
||||
SELECT @@global.innodb_io_capacity_max;
|
||||
|
||||
SET @@global.innodb_io_capacity = @start_innodb_capacity;
|
||||
SELECT @@global.innodb_io_capacity;
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
############# mysql-test\t\innodb_max_dirty_pages_pct_lwm_basic.test ##########
|
||||
# #
|
||||
# Variable Name: innodb_max_dirty_pages_pct_lwm #
|
||||
# Scope: GLOBAL #
|
||||
# Access Type: Dynamic #
|
||||
# Data Type: Numeric #
|
||||
# Default Value: 75 #
|
||||
# Range: 0-99 #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2008-02-07 #
|
||||
# Author: Rizwan #
|
||||
# #
|
||||
#Description: Test Cases of Dynamic System Variable #
|
||||
# innodb_max_dirty_pages_pct_lwm that checks the behavior of #
|
||||
# this variable in the following ways #
|
||||
# * Default Value #
|
||||
# * Valid & Invalid values #
|
||||
# * Scope & Access method #
|
||||
# * Data Integrity #
|
||||
# #
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||||
# server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
--source include/have_innodb.inc
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
######################################################################
|
||||
# START OF innodb_max_dirty_pages_pct_lwm TESTS #
|
||||
######################################################################
|
||||
|
||||
|
||||
#################################################################################
|
||||
#Saving initial value of innodb_max_dirty_pages_pct_lwm in a temporary variable #
|
||||
#################################################################################
|
||||
|
||||
SET @pct_lwm_start_value = @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
SELECT @pct_lwm_start_value;
|
||||
|
||||
SET @pct_start_value = @@global.innodb_max_dirty_pages_pct;
|
||||
SELECT @pct_start_value;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
|
||||
########################################################################
|
||||
# Display the DEFAULT value of innodb_max_dirty_pages_pct_lwm #
|
||||
########################################################################
|
||||
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = DEFAULT;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
|
||||
###################################################################################
|
||||
#check if innodb_max_dirty_pages_pct_lwm can be accessed with and without @@ sign #
|
||||
###################################################################################
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET innodb_max_dirty_pages_pct_lwm = 1;
|
||||
SELECT @@innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
--Error ER_UNKNOWN_TABLE
|
||||
SELECT local.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
SET global innodb_max_dirty_pages_pct_lwm = 0;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
|
||||
##########################################################################
|
||||
# change the value of innodb_max_dirty_pages_pct_lwm to a valid value #
|
||||
# Aloowed values are <= innodb_max_dirty_pages_pct value #
|
||||
##########################################################################
|
||||
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_start_value;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
|
||||
###########################################################################
|
||||
# Change the value of innodb_max_dirty_pages_pct_lwm to invalid value #
|
||||
###########################################################################
|
||||
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = -1;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = "T";
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = "Y";
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_start_value + 1;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = 100;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
|
||||
#########################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#########################################################################
|
||||
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm =
|
||||
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct_lwm';
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct_lwm';
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
|
||||
###################################################################
|
||||
# Check if ON and OFF values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = OFF;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
--ERROR ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = ON;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
|
||||
###################################################################
|
||||
# Check if TRUE and FALSE values can be used on variable #
|
||||
###################################################################
|
||||
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = TRUE;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = FALSE;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
##############################
|
||||
# Restore initial value #
|
||||
##############################
|
||||
|
||||
SET @@global.innodb_max_dirty_pages_pct = @pct_start_value;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct;
|
||||
|
||||
SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_lwm_start_value;
|
||||
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
|
||||
|
||||
###############################################################
|
||||
# END OF innodb_max_dirty_pages_pct_lwm TESTS #
|
||||
###############################################################
|
||||
@@ -11,8 +11,8 @@ select name, status from information_schema.innodb_metrics;
|
||||
# Turn on all monitor counters
|
||||
set global innodb_monitor_enable = all;
|
||||
|
||||
# status should all change to "started"
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
# status should all change to "enabled"
|
||||
select name from information_schema.innodb_metrics where status!='enabled';
|
||||
|
||||
# Test wrong argument to the global configure option
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
@@ -29,21 +29,21 @@ set global innodb_monitor_enable = aaa;
|
||||
# insensitive
|
||||
set global innodb_monitor_disable = All;
|
||||
|
||||
# status should all change to "stopped"
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
# status should all change to "disabled"
|
||||
select name from information_schema.innodb_metrics where status!='disabled';
|
||||
|
||||
# Reset all counter values
|
||||
set global innodb_monitor_reset_all = all;
|
||||
|
||||
# count should all change to 0
|
||||
select name, count, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where count!=0;
|
||||
|
||||
# Test wildcard match, turn on all counters contain string "lock"
|
||||
set global innodb_monitor_enable = "%lock%";
|
||||
|
||||
# All lock related counter should be enabled
|
||||
select name, status from information_schema.innodb_metrics
|
||||
where name like "%lock%";
|
||||
select name from information_schema.innodb_metrics
|
||||
where status != IF(name like "%lock%", 'enabled', 'disabled');
|
||||
|
||||
# Disable them
|
||||
set global innodb_monitor_disable = "%lock%";
|
||||
@@ -59,28 +59,29 @@ set global innodb_monitor_enable = "%lock*";
|
||||
# All counters will be turned on with wildcard match string with all "%"
|
||||
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='enabled';
|
||||
|
||||
# Turn off all counters
|
||||
set global innodb_monitor_disable="%%%%%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='disabled';
|
||||
|
||||
# One more round testing. All counters will be turned on with
|
||||
# single wildcard character "%"
|
||||
set global innodb_monitor_enable="%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='enabled';
|
||||
|
||||
# Turn off all the counters with "%_%"
|
||||
set global innodb_monitor_disable="%_%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='disabled';
|
||||
|
||||
# Turn on all counters start with "log"
|
||||
set global innodb_monitor_enable="log%%%%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics
|
||||
where status != IF(name like "log%", 'enabled', 'disabled');
|
||||
|
||||
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
|
||||
# is single character wildcard match word
|
||||
@@ -153,7 +154,7 @@ where name = "metadata_table_handles_opened";
|
||||
# Turn off the counter "metadata_table_handles_opened"
|
||||
set global innodb_monitor_disable = metadata_table_handles_opened;
|
||||
|
||||
# Reset the counter value while counter is off (stopped)
|
||||
# Reset the counter value while counter is off (disabled)
|
||||
set global innodb_monitor_reset = metadata_table_handles_opened;
|
||||
|
||||
select name, max_count, min_count, count,
|
||||
@@ -192,7 +193,7 @@ set global innodb_monitor_enable = metadata_table_handles_opened;
|
||||
drop table monitor_test;
|
||||
|
||||
# Create a new table to test "metadata_table_handles_opened" counter
|
||||
create table monitor_test(col int) engine = innodb;
|
||||
create table monitor_test(col int) engine = innodb stats_persistent=0;
|
||||
|
||||
select * from monitor_test;
|
||||
|
||||
@@ -336,6 +337,8 @@ drop table monitor_test;
|
||||
|
||||
set global innodb_monitor_enable = file_num_open_files;
|
||||
|
||||
# Counters are unpredictable when innodb-file-per-table is on
|
||||
--replace_column 2 # 3 # 4 # 5 # 6 # 7 #
|
||||
select name, max_count, min_count, count,
|
||||
max_count_reset, min_count_reset, count_reset, status
|
||||
from information_schema.innodb_metrics
|
||||
|
||||
@@ -11,8 +11,8 @@ select name, status from information_schema.innodb_metrics;
|
||||
# Turn on all monitor counters
|
||||
set global innodb_monitor_enable = all;
|
||||
|
||||
# status should all change to "started"
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
# status should all change to "enabled"
|
||||
select name from information_schema.innodb_metrics where status!='enabled';
|
||||
|
||||
# Test wrong argument to the global configure option
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
@@ -29,21 +29,21 @@ set global innodb_monitor_enable = aaa;
|
||||
# insensitive
|
||||
set global innodb_monitor_disable = All;
|
||||
|
||||
# status should all change to "stopped"
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
# status should all change to "disabled"
|
||||
select name from information_schema.innodb_metrics where status!='disabled';
|
||||
|
||||
# Reset all counter values
|
||||
set global innodb_monitor_reset_all = all;
|
||||
|
||||
# count should all change to 0
|
||||
select name, count, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where count!=0;
|
||||
|
||||
# Test wildcard match, turn on all counters contain string "lock"
|
||||
set global innodb_monitor_enable = "%lock%";
|
||||
|
||||
# All lock related counter should be enabled
|
||||
select name, status from information_schema.innodb_metrics
|
||||
where name like "%lock%";
|
||||
select name from information_schema.innodb_metrics
|
||||
where status != IF(name like "%lock%", 'enabled', 'disabled');
|
||||
|
||||
# Disable them
|
||||
set global innodb_monitor_disable = "%lock%";
|
||||
@@ -59,28 +59,29 @@ set global innodb_monitor_enable = "%lock*";
|
||||
# All counters will be turned on with wildcard match string with all "%"
|
||||
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='enabled';
|
||||
|
||||
# Turn off all counters
|
||||
set global innodb_monitor_disable="%%%%%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='disabled';
|
||||
|
||||
# One more round testing. All counters will be turned on with
|
||||
# single wildcard character "%"
|
||||
set global innodb_monitor_enable="%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='enabled';
|
||||
|
||||
# Turn off all the counters with "%_%"
|
||||
set global innodb_monitor_disable="%_%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='disabled';
|
||||
|
||||
# Turn on all counters start with "log"
|
||||
set global innodb_monitor_enable="log%%%%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics
|
||||
where status != IF(name like "log%", 'enabled', 'disabled');
|
||||
|
||||
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
|
||||
# is single character wildcard match word
|
||||
@@ -153,7 +154,7 @@ where name = "metadata_table_handles_opened";
|
||||
# Turn off the counter "metadata_table_handles_opened"
|
||||
set global innodb_monitor_disable = metadata_table_handles_opened;
|
||||
|
||||
# Reset the counter value while counter is off (stopped)
|
||||
# Reset the counter value while counter is off (disabled)
|
||||
set global innodb_monitor_reset = metadata_table_handles_opened;
|
||||
|
||||
select name, max_count, min_count, count,
|
||||
@@ -192,7 +193,7 @@ set global innodb_monitor_enable = metadata_table_handles_opened;
|
||||
drop table monitor_test;
|
||||
|
||||
# Create a new table to test "metadata_table_handles_opened" counter
|
||||
create table monitor_test(col int) engine = innodb;
|
||||
create table monitor_test(col int) engine = innodb stats_persistent=0;
|
||||
|
||||
select * from monitor_test;
|
||||
|
||||
@@ -336,6 +337,8 @@ drop table monitor_test;
|
||||
|
||||
set global innodb_monitor_enable = file_num_open_files;
|
||||
|
||||
# Counters are unpredictable when innodb-file-per-table is on
|
||||
--replace_column 2 # 3 # 4 # 5 # 6 # 7 #
|
||||
select name, max_count, min_count, count,
|
||||
max_count_reset, min_count_reset, count_reset, status
|
||||
from information_schema.innodb_metrics
|
||||
|
||||
@@ -11,8 +11,8 @@ select name, status from information_schema.innodb_metrics;
|
||||
# Turn on all monitor counters
|
||||
set global innodb_monitor_enable = all;
|
||||
|
||||
# status should all change to "started"
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
# status should all change to "enabled"
|
||||
select name from information_schema.innodb_metrics where status!='enabled';
|
||||
|
||||
# Test wrong argument to the global configure option
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
@@ -29,21 +29,21 @@ set global innodb_monitor_enable = aaa;
|
||||
# insensitive
|
||||
set global innodb_monitor_disable = All;
|
||||
|
||||
# status should all change to "stopped"
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
# status should all change to "disabled"
|
||||
select name from information_schema.innodb_metrics where status!='disabled';
|
||||
|
||||
# Reset all counter values
|
||||
set global innodb_monitor_reset_all = all;
|
||||
|
||||
# count should all change to 0
|
||||
select name, count, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where count!=0;
|
||||
|
||||
# Test wildcard match, turn on all counters contain string "lock"
|
||||
set global innodb_monitor_enable = "%lock%";
|
||||
|
||||
# All lock related counter should be enabled
|
||||
select name, status from information_schema.innodb_metrics
|
||||
where name like "%lock%";
|
||||
select name from information_schema.innodb_metrics
|
||||
where status != IF(name like "%lock%", 'enabled', 'disabled');
|
||||
|
||||
# Disable them
|
||||
set global innodb_monitor_disable = "%lock%";
|
||||
@@ -59,28 +59,29 @@ set global innodb_monitor_enable = "%lock*";
|
||||
# All counters will be turned on with wildcard match string with all "%"
|
||||
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='enabled';
|
||||
|
||||
# Turn off all counters
|
||||
set global innodb_monitor_disable="%%%%%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='disabled';
|
||||
|
||||
# One more round testing. All counters will be turned on with
|
||||
# single wildcard character "%"
|
||||
set global innodb_monitor_enable="%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='enabled';
|
||||
|
||||
# Turn off all the counters with "%_%"
|
||||
set global innodb_monitor_disable="%_%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='disabled';
|
||||
|
||||
# Turn on all counters start with "log"
|
||||
set global innodb_monitor_enable="log%%%%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics
|
||||
where status != IF(name like "log%", 'enabled', 'disabled');
|
||||
|
||||
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
|
||||
# is single character wildcard match word
|
||||
@@ -153,7 +154,7 @@ where name = "metadata_table_handles_opened";
|
||||
# Turn off the counter "metadata_table_handles_opened"
|
||||
set global innodb_monitor_disable = metadata_table_handles_opened;
|
||||
|
||||
# Reset the counter value while counter is off (stopped)
|
||||
# Reset the counter value while counter is off (disabled)
|
||||
set global innodb_monitor_reset = metadata_table_handles_opened;
|
||||
|
||||
select name, max_count, min_count, count,
|
||||
@@ -192,7 +193,7 @@ set global innodb_monitor_enable = metadata_table_handles_opened;
|
||||
drop table monitor_test;
|
||||
|
||||
# Create a new table to test "metadata_table_handles_opened" counter
|
||||
create table monitor_test(col int) engine = innodb;
|
||||
create table monitor_test(col int) engine = innodb stats_persistent=0;
|
||||
|
||||
select * from monitor_test;
|
||||
|
||||
@@ -336,6 +337,8 @@ drop table monitor_test;
|
||||
|
||||
set global innodb_monitor_enable = file_num_open_files;
|
||||
|
||||
# Counters are unpredictable when innodb-file-per-table is on
|
||||
--replace_column 2 # 3 # 4 # 5 # 6 # 7 #
|
||||
select name, max_count, min_count, count,
|
||||
max_count_reset, min_count_reset, count_reset, status
|
||||
from information_schema.innodb_metrics
|
||||
|
||||
@@ -11,8 +11,8 @@ select name, status from information_schema.innodb_metrics;
|
||||
# Turn on all monitor counters
|
||||
set global innodb_monitor_enable = all;
|
||||
|
||||
# status should all change to "started"
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
# status should all change to "enabled"
|
||||
select name from information_schema.innodb_metrics where status!='enabled';
|
||||
|
||||
# Test wrong argument to the global configure option
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
@@ -29,21 +29,21 @@ set global innodb_monitor_enable = aaa;
|
||||
# insensitive
|
||||
set global innodb_monitor_disable = All;
|
||||
|
||||
# status should all change to "stopped"
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
# status should all change to "disabled"
|
||||
select name from information_schema.innodb_metrics where status!='disabled';
|
||||
|
||||
# Reset all counter values
|
||||
set global innodb_monitor_reset_all = all;
|
||||
|
||||
# count should all change to 0
|
||||
select name, count, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where count!=0;
|
||||
|
||||
# Test wildcard match, turn on all counters contain string "lock"
|
||||
set global innodb_monitor_enable = "%lock%";
|
||||
|
||||
# All lock related counter should be enabled
|
||||
select name, status from information_schema.innodb_metrics
|
||||
where name like "%lock%";
|
||||
select name from information_schema.innodb_metrics
|
||||
where status != IF(name like "%lock%", 'enabled', 'disabled');
|
||||
|
||||
# Disable them
|
||||
set global innodb_monitor_disable = "%lock%";
|
||||
@@ -59,28 +59,29 @@ set global innodb_monitor_enable = "%lock*";
|
||||
# All counters will be turned on with wildcard match string with all "%"
|
||||
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='enabled';
|
||||
|
||||
# Turn off all counters
|
||||
set global innodb_monitor_disable="%%%%%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='disabled';
|
||||
|
||||
# One more round testing. All counters will be turned on with
|
||||
# single wildcard character "%"
|
||||
set global innodb_monitor_enable="%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='enabled';
|
||||
|
||||
# Turn off all the counters with "%_%"
|
||||
set global innodb_monitor_disable="%_%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics where status!='disabled';
|
||||
|
||||
# Turn on all counters start with "log"
|
||||
set global innodb_monitor_enable="log%%%%";
|
||||
|
||||
select name, status from information_schema.innodb_metrics;
|
||||
select name from information_schema.innodb_metrics
|
||||
where status != IF(name like "log%", 'enabled', 'disabled');
|
||||
|
||||
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
|
||||
# is single character wildcard match word
|
||||
@@ -153,7 +154,7 @@ where name = "metadata_table_handles_opened";
|
||||
# Turn off the counter "metadata_table_handles_opened"
|
||||
set global innodb_monitor_disable = metadata_table_handles_opened;
|
||||
|
||||
# Reset the counter value while counter is off (stopped)
|
||||
# Reset the counter value while counter is off (disabled)
|
||||
set global innodb_monitor_reset = metadata_table_handles_opened;
|
||||
|
||||
select name, max_count, min_count, count,
|
||||
@@ -192,7 +193,7 @@ set global innodb_monitor_enable = metadata_table_handles_opened;
|
||||
drop table monitor_test;
|
||||
|
||||
# Create a new table to test "metadata_table_handles_opened" counter
|
||||
create table monitor_test(col int) engine = innodb;
|
||||
create table monitor_test(col int) engine = innodb stats_persistent=0;
|
||||
|
||||
select * from monitor_test;
|
||||
|
||||
@@ -336,6 +337,8 @@ drop table monitor_test;
|
||||
|
||||
set global innodb_monitor_enable = file_num_open_files;
|
||||
|
||||
# Counters are unpredictable when innodb-file-per-table is on
|
||||
--replace_column 2 # 3 # 4 # 5 # 6 # 7 #
|
||||
select name, max_count, min_count, count,
|
||||
max_count_reset, min_count_reset, count_reset, status
|
||||
from information_schema.innodb_metrics
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_online_alter_log_max_size;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
select @@global.innodb_online_alter_log_max_size >= 524288;
|
||||
select @@global.innodb_online_alter_log_max_size;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.innodb_online_alter_log_max_size;
|
||||
show global variables like 'innodb_online_alter_log_max_size';
|
||||
show session variables like 'innodb_online_alter_log_max_size';
|
||||
select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
|
||||
select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global innodb_online_alter_log_max_size=1048576;
|
||||
select @@global.innodb_online_alter_log_max_size;
|
||||
select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
|
||||
select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
|
||||
set @@global.innodb_online_alter_log_max_size=524288;
|
||||
select @@global.innodb_online_alter_log_max_size;
|
||||
select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
|
||||
select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session innodb_online_alter_log_max_size='some';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set @@session.innodb_online_alter_log_max_size='some';
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_online_alter_log_max_size=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_online_alter_log_max_size='foo';
|
||||
set global innodb_online_alter_log_max_size=-2;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_online_alter_log_max_size=1e1;
|
||||
set global innodb_online_alter_log_max_size=2;
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_online_alter_log_max_size = @start_global_value;
|
||||
SELECT @@global.innodb_online_alter_log_max_size;
|
||||
53
mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test
Normal file
53
mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
# Basic test for innodb_purge_run_now, note it is a duplicate of
|
||||
# innodb_purge_stop_now.
|
||||
#
|
||||
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
# The config variable is a debug variable for now
|
||||
-- source include/have_debug.inc
|
||||
|
||||
--disable_query_log
|
||||
# Enable metrics for the counters we are going to use
|
||||
set global innodb_monitor_enable = purge_stop_count;
|
||||
set global innodb_monitor_enable = purge_resume_count;
|
||||
--enable_query_log
|
||||
|
||||
# Should be 0 for both
|
||||
SELECT name, count
|
||||
FROM information_schema.innodb_metrics
|
||||
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
|
||||
|
||||
# Check the default value
|
||||
SET @orig = @@global.innodb_purge_run_now;
|
||||
SELECT @orig;
|
||||
|
||||
# Stop of purge
|
||||
SET GLOBAL innodb_purge_stop_now = ON;
|
||||
|
||||
# Stop count should now be 1
|
||||
SELECT name, count
|
||||
FROM information_schema.innodb_metrics
|
||||
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
|
||||
|
||||
SET GLOBAL innodb_purge_run_now = ON;
|
||||
|
||||
# Should always be OFF
|
||||
SELECT @@global.innodb_purge_run_now;
|
||||
|
||||
# Both should be 1 now
|
||||
SELECT name, count
|
||||
FROM information_schema.innodb_metrics
|
||||
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
|
||||
|
||||
--disable_query_log
|
||||
set global innodb_monitor_disable = all;
|
||||
set global innodb_monitor_reset_all = all;
|
||||
|
||||
-- disable_warnings
|
||||
set global innodb_monitor_enable = default;
|
||||
set global innodb_monitor_disable = default;
|
||||
set global innodb_monitor_reset = default;
|
||||
set global innodb_monitor_reset_all = default;
|
||||
-- enable_warnings
|
||||
53
mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test
Normal file
53
mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
# Basic test for innodb_purge_run_now, note it is a duplicate of
|
||||
# innodb_purge_stop_now.
|
||||
#
|
||||
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
# The config variable is a debug variable for now
|
||||
-- source include/have_debug.inc
|
||||
|
||||
--disable_query_log
|
||||
# Enable metrics for the counters we are going to use
|
||||
set global innodb_monitor_enable = purge_stop_count;
|
||||
set global innodb_monitor_enable = purge_resume_count;
|
||||
--enable_query_log
|
||||
|
||||
# Should be 0 for both
|
||||
SELECT name, count
|
||||
FROM information_schema.innodb_metrics
|
||||
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
|
||||
|
||||
# Check the default value
|
||||
SET @orig = @@global.innodb_purge_run_now;
|
||||
SELECT @orig;
|
||||
|
||||
# Stop of purge
|
||||
SET GLOBAL innodb_purge_stop_now = ON;
|
||||
|
||||
# Stop count should now be 1
|
||||
SELECT name, count
|
||||
FROM information_schema.innodb_metrics
|
||||
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
|
||||
|
||||
SET GLOBAL innodb_purge_run_now = ON;
|
||||
|
||||
# Should always be OFF
|
||||
SELECT @@global.innodb_purge_run_now;
|
||||
|
||||
# Both should be 1 now
|
||||
SELECT name, count
|
||||
FROM information_schema.innodb_metrics
|
||||
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
|
||||
|
||||
--disable_query_log
|
||||
set global innodb_monitor_disable = all;
|
||||
set global innodb_monitor_reset_all = all;
|
||||
|
||||
-- disable_warnings
|
||||
set global innodb_monitor_enable = default;
|
||||
set global innodb_monitor_disable = default;
|
||||
set global innodb_monitor_reset = default;
|
||||
set global innodb_monitor_reset_all = default;
|
||||
-- enable_warnings
|
||||
20
mysql-test/suite/sys_vars/t/innodb_read_only_basic.test
Normal file
20
mysql-test/suite/sys_vars/t/innodb_read_only_basic.test
Normal file
@@ -0,0 +1,20 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# Can only be set from the command line.
|
||||
# show the global and session values;
|
||||
|
||||
--echo Valid values are 'ON' and 'OFF'
|
||||
select @@global.innodb_read_only;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.innodb_read_only;
|
||||
show global variables like 'innodb_read_only';
|
||||
show session variables like 'innodb_read_only';
|
||||
select * from information_schema.global_variables where variable_name='innodb_read_only';
|
||||
select * from information_schema.session_variables where variable_name='innodb_read_only';
|
||||
|
||||
# Show that it's read-only
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global innodb_read_only=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session innodb_read_only=1;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# innodb_stats_auto_recalc
|
||||
#
|
||||
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
# show the default value
|
||||
SELECT @@innodb_stats_auto_recalc;
|
||||
|
||||
# check that it is writeable
|
||||
SET GLOBAL innodb_stats_auto_recalc=ON;
|
||||
SELECT @@innodb_stats_auto_recalc;
|
||||
|
||||
SET GLOBAL innodb_stats_auto_recalc=OFF;
|
||||
SELECT @@innodb_stats_auto_recalc;
|
||||
|
||||
SET GLOBAL innodb_stats_auto_recalc=1;
|
||||
SELECT @@innodb_stats_auto_recalc;
|
||||
|
||||
SET GLOBAL innodb_stats_auto_recalc=0;
|
||||
SELECT @@innodb_stats_auto_recalc;
|
||||
|
||||
# should be a boolean
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
SET GLOBAL innodb_stats_auto_recalc=123;
|
||||
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
SET GLOBAL innodb_stats_auto_recalc='foo';
|
||||
|
||||
# restore the environment
|
||||
SET GLOBAL innodb_stats_auto_recalc=default;
|
||||
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# innodb_stats_persistent
|
||||
#
|
||||
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
# show the default value
|
||||
SELECT @@innodb_stats_persistent;
|
||||
|
||||
# check that it is writeable
|
||||
SET GLOBAL innodb_stats_persistent=ON;
|
||||
SELECT @@innodb_stats_persistent;
|
||||
|
||||
SET GLOBAL innodb_stats_persistent=OFF;
|
||||
SELECT @@innodb_stats_persistent;
|
||||
|
||||
SET GLOBAL innodb_stats_persistent=1;
|
||||
SELECT @@innodb_stats_persistent;
|
||||
|
||||
SET GLOBAL innodb_stats_persistent=0;
|
||||
SELECT @@innodb_stats_persistent;
|
||||
|
||||
# should be a boolean
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
SET GLOBAL innodb_stats_persistent=123;
|
||||
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
SET GLOBAL innodb_stats_persistent='foo';
|
||||
|
||||
# restore the environment
|
||||
SET GLOBAL innodb_stats_persistent=off;
|
||||
@@ -0,0 +1,60 @@
|
||||
########## mysql-test\t\metadata_locks_hash_instances_basic.test ##############
|
||||
# #
|
||||
# Variable Name: metadata_locks_hash_instances #
|
||||
# Scope: Global #
|
||||
# Access Type: Static #
|
||||
# Data Type: Integer #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
|
||||
--echo ####################################################################
|
||||
--echo # Displaying default value #
|
||||
--echo ####################################################################
|
||||
SELECT @@GLOBAL.metadata_locks_hash_instances;
|
||||
|
||||
|
||||
--echo ####################################################################
|
||||
--echo # Check that value cannot be set (this variable is settable only #
|
||||
--echo # at start-up). #
|
||||
--echo ####################################################################
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@GLOBAL.metadata_locks_hash_instances=1;
|
||||
|
||||
SELECT @@GLOBAL.metadata_locks_hash_instances;
|
||||
|
||||
|
||||
--echo #################################################################
|
||||
--echo # Check if the value in GLOBAL Table matches value in variable #
|
||||
--echo #################################################################
|
||||
SELECT @@GLOBAL.metadata_locks_hash_instances = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='metadata_locks_hash_instances';
|
||||
|
||||
SELECT @@GLOBAL.metadata_locks_hash_instances;
|
||||
|
||||
SELECT VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='metadata_locks_hash_instances';
|
||||
|
||||
|
||||
--echo ######################################################################
|
||||
--echo # Check if accessing variable with and without GLOBAL point to same #
|
||||
--echo # variable #
|
||||
--echo ######################################################################
|
||||
SELECT @@metadata_locks_hash_instances = @@GLOBAL.metadata_locks_hash_instances;
|
||||
|
||||
|
||||
--echo ######################################################################
|
||||
--echo # Check if variable has only the GLOBAL scope #
|
||||
--echo ######################################################################
|
||||
|
||||
SELECT @@metadata_locks_hash_instances;
|
||||
|
||||
SELECT @@GLOBAL.metadata_locks_hash_instances;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@local.metadata_locks_hash_instances;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@SESSION.metadata_locks_hash_instances;
|
||||
@@ -0,0 +1,2 @@
|
||||
--loose-enable-performance-schema
|
||||
--loose-performance-schema-session-connect-attrs-size=2048
|
||||
@@ -0,0 +1,47 @@
|
||||
# Copyright (C) 2012 Sun Microsystems, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
#
|
||||
# Only global
|
||||
#
|
||||
|
||||
select @@global.performance_schema_session_connect_attrs_size;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.performance_schema_session_connect_attrs_size;
|
||||
|
||||
show global variables like 'performance_schema_session_connect_attrs_size';
|
||||
|
||||
show session variables like 'performance_schema_session_connect_attrs_size';
|
||||
|
||||
select * from information_schema.global_variables
|
||||
where variable_name='performance_schema_session_connect_attrs_size';
|
||||
|
||||
select * from information_schema.session_variables
|
||||
where variable_name='performance_schema_session_connect_attrs_size';
|
||||
|
||||
#
|
||||
# Read-only
|
||||
#
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global performance_schema_session_connect_attrs_size=1;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session performance_schema_session_connect_attrs_size=1;
|
||||
|
||||
Reference in New Issue
Block a user