3
################## mysql-test\t\innodb_file_io_threads_basic.test #############
5
# Variable Name: innodb_file_io_threads #
7
# Access Type: Static #
11
# Creation Date: 2008-02-07 #
12
# Author : Sharique Abdullah #
15
# Description:Test Cases of Dynamic System Variable innodb_file_io_threads #
16
# that checks the behavior of this variable in the following ways #
20
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
21
# server-system-variables.html #
23
###############################################################################
25
--source include/have_innodb.inc
27
--echo '#---------------------BS_STVARS_027_01----------------------#'
28
####################################################################
29
# Displaying default value #
30
####################################################################
31
SELECT COUNT(@@GLOBAL.innodb_file_io_threads);
35
--echo '#---------------------BS_STVARS_027_02----------------------#'
36
####################################################################
37
# Check if Value can set #
38
####################################################################
40
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
41
SET @@GLOBAL.innodb_file_io_threads=1;
42
--echo Expected error 'Read only variable'
44
SELECT COUNT(@@GLOBAL.innodb_file_io_threads);
50
--echo '#---------------------BS_STVARS_027_03----------------------#'
51
#################################################################
52
# Check if the value in GLOBAL Table matches value in variable #
53
#################################################################
55
SELECT @@GLOBAL.innodb_file_io_threads = VARIABLE_VALUE
56
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
57
WHERE VARIABLE_NAME='innodb_file_io_threads';
60
SELECT COUNT(@@GLOBAL.innodb_file_io_threads);
63
SELECT COUNT(VARIABLE_VALUE)
64
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
65
WHERE VARIABLE_NAME='innodb_file_io_threads';
70
--echo '#---------------------BS_STVARS_027_04----------------------#'
71
################################################################################
72
# Check if accessing variable with and without GLOBAL point to same variable #
73
################################################################################
74
SELECT @@innodb_file_io_threads = @@GLOBAL.innodb_file_io_threads;
79
--echo '#---------------------BS_STVARS_027_05----------------------#'
80
################################################################################
81
# Check if innodb_file_io_threads can be accessed with and without @@ sign #
82
################################################################################
84
SELECT COUNT(@@innodb_file_io_threads);
87
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
88
SELECT COUNT(@@local.innodb_file_io_threads);
89
--echo Expected error 'Variable is a GLOBAL variable'
91
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
92
SELECT COUNT(@@SESSION.innodb_file_io_threads);
93
--echo Expected error 'Variable is a GLOBAL variable'
95
SELECT COUNT(@@GLOBAL.innodb_file_io_threads);
98
--Error ER_BAD_FIELD_ERROR
99
SELECT innodb_file_io_threads = @@SESSION.innodb_file_io_threads;
100
--echo Expected error 'Readonly variable'