1
################# mysql-test\t\innodb_thread_concurrency_basic.test ###########
3
# Variable Name: innodb_thread_concurrency #
5
# Access Type: Dynamic #
11
# Creation Date: 2008-02-07 #
14
#Description:Test Cases of Dynamic System Variable innodb_thread_concurrency #
15
# that checks the behavior of this variable in the following ways #
17
# * Valid & Invalid values #
18
# * Scope & Access method #
21
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
22
# server-system-variables.html #
24
###############################################################################
26
--source include/have_innodb.inc
27
--source include/load_sysvars.inc
29
########################################################################
30
# START OF innodb_thread_concurrency TESTS #
31
########################################################################
34
################################################################################
35
# Saving initial value of innodb_thread_concurrency in a temporary variable #
36
################################################################################
39
SET @global_start_value = @@global.innodb_thread_concurrency;
40
SELECT @global_start_value;
44
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
45
########################################################################
46
# Display the DEFAULT value of innodb_thread_concurrency #
47
########################################################################
51
SET @@global.innodb_thread_concurrency = 0;
52
SET @@global.innodb_thread_concurrency = DEFAULT;
53
SELECT @@global.innodb_thread_concurrency;
55
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
56
###############################################################################
57
# Check if innodb_thread_concurrency can be accessed with and without @@ sign #
58
###############################################################################
60
--Error ER_GLOBAL_VARIABLE
61
SET innodb_thread_concurrency = 1;
62
SELECT @@innodb_thread_concurrency;
65
--Error ER_UNKNOWN_TABLE
66
SELECT local.innodb_thread_concurrency;
69
SET global innodb_thread_concurrency = 0;
70
SELECT @@global.innodb_thread_concurrency;
73
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
74
##########################################################################
75
# change the value of innodb_thread_concurrency to a valid value #
76
##########################################################################
79
SET @@global.innodb_thread_concurrency = 0;
80
SELECT @@global.innodb_thread_concurrency;
82
SET @@global.innodb_thread_concurrency = 1;
83
SELECT @@global.innodb_thread_concurrency;
84
SET @@global.innodb_thread_concurrency = 1000;
85
SELECT @@global.innodb_thread_concurrency;
87
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
88
###########################################################################
89
# Change the value of innodb_thread_concurrency to invalid value #
90
###########################################################################
92
SET @@global.innodb_thread_concurrency = -1;
93
SELECT @@global.innodb_thread_concurrency;
95
--Error ER_WRONG_TYPE_FOR_VAR
96
SET @@global.innodb_thread_concurrency = "T";
97
SELECT @@global.innodb_thread_concurrency;
99
--Error ER_WRONG_TYPE_FOR_VAR
100
SET @@global.innodb_thread_concurrency = "Y";
101
SELECT @@global.innodb_thread_concurrency;
104
SET @@global.innodb_thread_concurrency = 1001;
105
SELECT @@global.innodb_thread_concurrency;
107
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
108
#########################################################################
109
# Check if the value in GLOBAL Table matches value in variable #
110
#########################################################################
112
SELECT @@global.innodb_thread_concurrency =
113
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
114
WHERE VARIABLE_NAME='innodb_thread_concurrency';
115
SELECT @@global.innodb_thread_concurrency;
116
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
117
WHERE VARIABLE_NAME='innodb_thread_concurrency';
119
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
120
###################################################################
121
# Check if ON and OFF values can be used on variable #
122
###################################################################
124
--ERROR ER_WRONG_TYPE_FOR_VAR
125
SET @@global.innodb_thread_concurrency = OFF;
126
SELECT @@global.innodb_thread_concurrency;
128
--ERROR ER_WRONG_TYPE_FOR_VAR
129
SET @@global.innodb_thread_concurrency = ON;
130
SELECT @@global.innodb_thread_concurrency;
132
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
133
###################################################################
134
# Check if TRUE and FALSE values can be used on variable #
135
###################################################################
137
SET @@global.innodb_thread_concurrency = TRUE;
138
SELECT @@global.innodb_thread_concurrency;
139
SET @@global.innodb_thread_concurrency = FALSE;
140
SELECT @@global.innodb_thread_concurrency;
142
##############################
143
# Restore initial value #
144
##############################
146
SET @@global.innodb_thread_concurrency = @global_start_value;
147
SELECT @@global.innodb_thread_concurrency;
149
###############################################################
150
# END OF innodb_thread_concurrency TESTS #
151
###############################################################