Commit cfbce98a authored by Inaam Rana's avatar Inaam Rana

Add basic tests for new innodb features

parent 248dd65f
'#---------------------BS_STVARS_035_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
COUNT(@@GLOBAL.innodb_buffer_pool_instances)
1
1 Expected
'#---------------------BS_STVARS_035_02----------------------#'
SET @@GLOBAL.innodb_buffer_pool_instances=1;
ERROR HY000: Variable 'innodb_buffer_pool_instances' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
COUNT(@@GLOBAL.innodb_buffer_pool_instances)
1
1 Expected
'#---------------------BS_STVARS_035_03----------------------#'
SELECT @@GLOBAL.innodb_buffer_pool_instances = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_buffer_pool_instances';
@@GLOBAL.innodb_buffer_pool_instances = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
COUNT(@@GLOBAL.innodb_buffer_pool_instances)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_buffer_pool_instances';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_035_04----------------------#'
SELECT @@innodb_buffer_pool_instances = @@GLOBAL.innodb_buffer_pool_instances;
@@innodb_buffer_pool_instances = @@GLOBAL.innodb_buffer_pool_instances
1
1 Expected
'#---------------------BS_STVARS_035_05----------------------#'
SELECT COUNT(@@innodb_buffer_pool_instances);
COUNT(@@innodb_buffer_pool_instances)
1
1 Expected
SELECT COUNT(@@local.innodb_buffer_pool_instances);
ERROR HY000: Variable 'innodb_buffer_pool_instances' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_buffer_pool_instances);
ERROR HY000: Variable 'innodb_buffer_pool_instances' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
COUNT(@@GLOBAL.innodb_buffer_pool_instances)
1
1 Expected
SELECT innodb_buffer_pool_instances = @@SESSION.innodb_buffer_pool_instances;
ERROR 42S22: Unknown column 'innodb_buffer_pool_instances' in 'field list'
Expected error 'Readonly variable'
SET @global_start_value = @@global.innodb_purge_batch_size;
SELECT @global_start_value;
@global_start_value
20
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_purge_batch_size = 1;
SET @@global.innodb_purge_batch_size = DEFAULT;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
20
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_purge_batch_size = 1;
ERROR HY000: Variable 'innodb_purge_batch_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_purge_batch_size;
@@innodb_purge_batch_size
20
SELECT local.innodb_purge_batch_size;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_purge_batch_size = 1;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_purge_batch_size = 1;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
SET @@global.innodb_purge_batch_size = 5000;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
5000
SET @@global.innodb_purge_batch_size = 1000;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1000
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_purge_batch_size = 0;
Warnings:
Warning 1292 Truncated incorrect innodb_purge_batch_size value: '0'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
SET @@global.innodb_purge_batch_size = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_purge_batch_size'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
SET @@global.innodb_purge_batch_size = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_purge_batch_size'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
SET @@global.innodb_purge_batch_size = 5001;
Warnings:
Warning 1292 Truncated incorrect innodb_purge_batch_size value: '5001'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
5000
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_purge_batch_size =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_batch_size';
@@global.innodb_purge_batch_size =
VARIABLE_VALUE
1
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
5000
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_batch_size';
VARIABLE_VALUE
5000
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_purge_batch_size = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_purge_batch_size'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
5000
SET @@global.innodb_purge_batch_size = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_purge_batch_size'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
5000
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_purge_batch_size = TRUE;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
SET @@global.innodb_purge_batch_size = FALSE;
Warnings:
Warning 1292 Truncated incorrect innodb_purge_batch_size value: '0'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
SET @@global.innodb_purge_batch_size = @global_start_value;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
20
'#---------------------BS_STVARS_035_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
COUNT(@@GLOBAL.innodb_purge_threads)
1
1 Expected
'#---------------------BS_STVARS_035_02----------------------#'
SET @@GLOBAL.innodb_purge_threads=1;
ERROR HY000: Variable 'innodb_purge_threads' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
COUNT(@@GLOBAL.innodb_purge_threads)
1
1 Expected
'#---------------------BS_STVARS_035_03----------------------#'
SELECT @@GLOBAL.innodb_purge_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_threads';
@@GLOBAL.innodb_purge_threads = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
COUNT(@@GLOBAL.innodb_purge_threads)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_threads';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_035_04----------------------#'
SELECT @@innodb_purge_threads = @@GLOBAL.innodb_purge_threads;
@@innodb_purge_threads = @@GLOBAL.innodb_purge_threads
1
1 Expected
'#---------------------BS_STVARS_035_05----------------------#'
SELECT COUNT(@@innodb_purge_threads);
COUNT(@@innodb_purge_threads)
1
1 Expected
SELECT COUNT(@@local.innodb_purge_threads);
ERROR HY000: Variable 'innodb_purge_threads' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_purge_threads);
ERROR HY000: Variable 'innodb_purge_threads' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
COUNT(@@GLOBAL.innodb_purge_threads)
1
1 Expected
SELECT innodb_purge_threads = @@SESSION.innodb_purge_threads;
ERROR 42S22: Unknown column 'innodb_purge_threads' in 'field list'
Expected error 'Readonly variable'
'#---------------------BS_STVARS_035_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
COUNT(@@GLOBAL.innodb_use_native_aio)
1
1 Expected
'#---------------------BS_STVARS_035_02----------------------#'
SET @@GLOBAL.innodb_use_native_aio=1;
ERROR HY000: Variable 'innodb_use_native_aio' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
COUNT(@@GLOBAL.innodb_use_native_aio)
1
1 Expected
'#---------------------BS_STVARS_035_03----------------------#'
SELECT IF(@@GLOBAL.innodb_use_native_aio, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_use_native_aio';
IF(@@GLOBAL.innodb_use_native_aio, 'ON', 'OFF') = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
COUNT(@@GLOBAL.innodb_use_native_aio)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_use_native_aio';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_035_04----------------------#'
SELECT @@innodb_use_native_aio = @@GLOBAL.innodb_use_native_aio;
@@innodb_use_native_aio = @@GLOBAL.innodb_use_native_aio
1
1 Expected
'#---------------------BS_STVARS_035_05----------------------#'
SELECT COUNT(@@innodb_use_native_aio);
COUNT(@@innodb_use_native_aio)
1
1 Expected
SELECT COUNT(@@local.innodb_use_native_aio);
ERROR HY000: Variable 'innodb_use_native_aio' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_use_native_aio);
ERROR HY000: Variable 'innodb_use_native_aio' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
COUNT(@@GLOBAL.innodb_use_native_aio)
1
1 Expected
SELECT innodb_use_native_aio = @@SESSION.innodb_use_native_aio;
ERROR 42S22: Unknown column 'innodb_use_native_aio' in 'field list'
Expected error 'Readonly variable'
################## mysql-test\t\innodb_buffer_pool_instances_basic.test #######
# #
# Variable Name: innodb_buffer_pool_instances #
# Scope: Global #
# Access Type: Static #
# Data Type: numeric #
# #
# #
# Creation Date: 2008-02-07 #
# Author : Sharique Abdullah #
# #
# #
# Description:Test Cases of Dynamic System Variable #
# innodb_buffer_pool_instances #
# 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_buffer_pool_instances);
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_02----------------------#'
####################################################################
# Check if Value can set #
####################################################################
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.innodb_buffer_pool_instances=1;
--echo Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_03----------------------#'
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
SELECT @@GLOBAL.innodb_buffer_pool_instances = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_buffer_pool_instances';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_buffer_pool_instances';
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_04----------------------#'
################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
################################################################################
SELECT @@innodb_buffer_pool_instances = @@GLOBAL.innodb_buffer_pool_instances;
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_05----------------------#'
################################################################################
# Check if innodb_buffer_pool_instances can be accessed with and without @@ sign #
################################################################################
SELECT COUNT(@@innodb_buffer_pool_instances);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.innodb_buffer_pool_instances);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.innodb_buffer_pool_instances);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
--echo 1 Expected
--Error ER_BAD_FIELD_ERROR
SELECT innodb_buffer_pool_instances = @@SESSION.innodb_buffer_pool_instances;
--echo Expected error 'Readonly variable'
################# mysql-test\t\innodb_purge_batch_size_basic.test #############
# #
# Variable Name: innodb_purge_batch_size #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 20 #
# Range: 0-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Rizwan #
# #
#Description:Test Cases of Dynamic System Variable innodb_purge_batch_size #
# 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_purge_batch_size TESTS #
########################################################################
############################################################################
# Saving initial value of innodb_purge_batch_size in a temporary variable #
############################################################################
SET @global_start_value = @@global.innodb_purge_batch_size;
SELECT @global_start_value;
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
########################################################################
# Display the DEFAULT value of innodb_purge_batch_size #
########################################################################
SET @@global.innodb_purge_batch_size = 1;
SET @@global.innodb_purge_batch_size = DEFAULT;
SELECT @@global.innodb_purge_batch_size;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
##############################################################################
# Check if innodb_purge_batch_size can be accessed with and without @@ sign #
##############################################################################
--Error ER_GLOBAL_VARIABLE
SET innodb_purge_batch_size = 1;
SELECT @@innodb_purge_batch_size;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_purge_batch_size;
SET global innodb_purge_batch_size = 1;
SELECT @@global.innodb_purge_batch_size;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
##########################################################################
# change the value of innodb_purge_batch_size to a valid value #
##########################################################################
SET @@global.innodb_purge_batch_size = 1;
SELECT @@global.innodb_purge_batch_size;
SET @@global.innodb_purge_batch_size = 5000;
SELECT @@global.innodb_purge_batch_size;
SET @@global.innodb_purge_batch_size = 1000;
SELECT @@global.innodb_purge_batch_size;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
###########################################################################
# Change the value of innodb_purge_batch_size to invalid value #
###########################################################################
SET @@global.innodb_purge_batch_size = 0;
SELECT @@global.innodb_purge_batch_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_purge_batch_size = "T";
SELECT @@global.innodb_purge_batch_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_purge_batch_size = "Y";
SELECT @@global.innodb_purge_batch_size;
SET @@global.innodb_purge_batch_size = 5001;
SELECT @@global.innodb_purge_batch_size;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
SELECT @@global.innodb_purge_batch_size =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_batch_size';
SELECT @@global.innodb_purge_batch_size;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_batch_size';
--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_purge_batch_size = OFF;
SELECT @@global.innodb_purge_batch_size;
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_purge_batch_size = ON;
SELECT @@global.innodb_purge_batch_size;
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@global.innodb_purge_batch_size = TRUE;
SELECT @@global.innodb_purge_batch_size;
SET @@global.innodb_purge_batch_size = FALSE;
SELECT @@global.innodb_purge_batch_size;
##############################
# Restore initial value #
##############################
SET @@global.innodb_purge_batch_size = @global_start_value;
SELECT @@global.innodb_purge_batch_size;
###############################################################
# END OF innodb_purge_batch_size TESTS #
###############################################################
################## mysql-test\t\innodb_log_purge_threads_basic.test ###########
# #
# Variable Name: innodb_purge_threads #
# Scope: Global #
# Access Type: Static #
# Data Type: numeric #
# #
# #
# Creation Date: 2008-02-07 #
# Author : Sharique Abdullah #
# #
# #
# Description:Test Cases of Dynamic System Variable innodb_purge_threads #
# 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_purge_threads);
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_02----------------------#'
####################################################################
# Check if Value can set #
####################################################################
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.innodb_purge_threads=1;
--echo Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_03----------------------#'
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
SELECT @@GLOBAL.innodb_purge_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_threads';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_threads';
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_04----------------------#'
################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
################################################################################
SELECT @@innodb_purge_threads = @@GLOBAL.innodb_purge_threads;
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_05----------------------#'
################################################################################
# Check if innodb_purge_threads can be accessed with and without @@ sign #
################################################################################
SELECT COUNT(@@innodb_purge_threads);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.innodb_purge_threads);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.innodb_purge_threads);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
--echo 1 Expected
--Error ER_BAD_FIELD_ERROR
SELECT innodb_purge_threads = @@SESSION.innodb_purge_threads;
--echo Expected error 'Readonly variable'
################## mysql-test\t\innodb_use_native_aio_basic.test ##############
# #
# Variable Name: innodb_use_native_aio #
# Scope: Global #
# Access Type: Static #
# Data Type: numeric #
# #
# #
# Creation Date: 2008-02-07 #
# Author : Sharique Abdullah #
# #
# #
# Description:Test Cases of Dynamic System Variable innodb_use_native_aio #
# 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_use_native_aio);
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_02----------------------#'
####################################################################
# Check if Value can set #
####################################################################
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.innodb_use_native_aio=1;
--echo Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_03----------------------#'
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
SELECT IF(@@GLOBAL.innodb_use_native_aio, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_use_native_aio';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_use_native_aio';
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_04----------------------#'
################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
################################################################################
SELECT @@innodb_use_native_aio = @@GLOBAL.innodb_use_native_aio;
--echo 1 Expected
--echo '#---------------------BS_STVARS_035_05----------------------#'
################################################################################
# Check if innodb_log_file_size can be accessed with and without @@ sign #
################################################################################
SELECT COUNT(@@innodb_use_native_aio);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.innodb_use_native_aio);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.innodb_use_native_aio);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
--echo 1 Expected
--Error ER_BAD_FIELD_ERROR
SELECT innodb_use_native_aio = @@SESSION.innodb_use_native_aio;
--echo Expected error 'Readonly variable'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment