~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/t/innodb_thread_concurrency_basic.test

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
################# mysql-test\t\innodb_thread_concurrency_basic.test ###########
 
2
#                                                                             #
 
3
# Variable Name: innodb_thread_concurrency                                    #
 
4
# Scope: GLOBAL                                                               #
 
5
# Access Type: Dynamic                                                        #
 
6
# Data Type: Numeric                                                          #
 
7
# Default Value: 8                                                            #
 
8
# Range: 0-1000                                                               #
 
9
#                                                                             #
 
10
#                                                                             #
 
11
# Creation Date: 2008-02-07                                                   #
 
12
# Author: Rizwan                                                              #
 
13
#                                                                             #
 
14
#Description:Test Cases of Dynamic System Variable innodb_thread_concurrency  #
 
15
#             that checks the behavior of this variable in the following ways #
 
16
#              * Default Value                                                #
 
17
#              * Valid & Invalid values                                       #
 
18
#              * Scope & Access method                                        #
 
19
#              * Data Integrity                                               #
 
20
#                                                                             #
 
21
# Reference: http://dev.mysql.com/doc/refman/5.1/en/                          #
 
22
#  server-system-variables.html                                               #
 
23
#                                                                             #
 
24
###############################################################################
 
25
 
 
26
--source include/have_innodb.inc
 
27
--source include/load_sysvars.inc
 
28
 
 
29
######################################################################## 
 
30
#                    START OF innodb_thread_concurrency TESTS          #
 
31
######################################################################## 
 
32
 
 
33
 
 
34
################################################################################ 
 
35
#   Saving initial value of innodb_thread_concurrency in a temporary variable  #
 
36
################################################################################ 
 
37
 
 
38
 
 
39
SET @global_start_value = @@global.innodb_thread_concurrency;
 
40
SELECT @global_start_value;
 
41
 
 
42
 
 
43
 
 
44
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
 
45
######################################################################## 
 
46
#           Display the DEFAULT value of innodb_thread_concurrency     #
 
47
########################################################################
 
48
 
 
49
 
 
50
 
 
51
SET @@global.innodb_thread_concurrency = 0;
 
52
SET @@global.innodb_thread_concurrency = DEFAULT;
 
53
SELECT @@global.innodb_thread_concurrency;
 
54
 
 
55
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
 
56
###############################################################################
 
57
# Check if innodb_thread_concurrency can be accessed with and without @@ sign #
 
58
###############################################################################
 
59
 
 
60
--Error ER_GLOBAL_VARIABLE
 
61
SET innodb_thread_concurrency = 1;
 
62
SELECT @@innodb_thread_concurrency;
 
63
 
 
64
 
 
65
--Error ER_UNKNOWN_TABLE
 
66
SELECT local.innodb_thread_concurrency;
 
67
 
 
68
 
 
69
SET global innodb_thread_concurrency = 0;
 
70
SELECT @@global.innodb_thread_concurrency;
 
71
 
 
72
 
 
73
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
 
74
########################################################################## 
 
75
#      change the value of innodb_thread_concurrency to a valid value    #
 
76
########################################################################## 
 
77
 
 
78
 
 
79
SET @@global.innodb_thread_concurrency = 0;
 
80
SELECT @@global.innodb_thread_concurrency;
 
81
 
 
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;
 
86
 
 
87
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
 
88
########################################################################### 
 
89
#       Change the value of innodb_thread_concurrency to invalid value    #
 
90
########################################################################### 
 
91
 
 
92
SET @@global.innodb_thread_concurrency = -1;
 
93
SELECT @@global.innodb_thread_concurrency;
 
94
 
 
95
--Error ER_WRONG_TYPE_FOR_VAR
 
96
SET @@global.innodb_thread_concurrency = "T";
 
97
SELECT @@global.innodb_thread_concurrency;
 
98
 
 
99
--Error ER_WRONG_TYPE_FOR_VAR
 
100
SET @@global.innodb_thread_concurrency = "Y";
 
101
SELECT @@global.innodb_thread_concurrency;
 
102
 
 
103
 
 
104
SET @@global.innodb_thread_concurrency = 1001;
 
105
SELECT @@global.innodb_thread_concurrency;
 
106
 
 
107
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
 
108
######################################################################### 
 
109
#     Check if the value in GLOBAL Table matches value in variable      #
 
110
#########################################################################
 
111
 
 
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';
 
118
 
 
119
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
 
120
################################################################### 
 
121
#        Check if ON and OFF values can be used on variable       #
 
122
################################################################### 
 
123
 
 
124
--ERROR ER_WRONG_TYPE_FOR_VAR
 
125
SET @@global.innodb_thread_concurrency = OFF;
 
126
SELECT @@global.innodb_thread_concurrency;
 
127
 
 
128
--ERROR ER_WRONG_TYPE_FOR_VAR
 
129
SET @@global.innodb_thread_concurrency = ON;
 
130
SELECT @@global.innodb_thread_concurrency;
 
131
 
 
132
--echo '#---------------------FN_DYNVARS_046_07----------------------#'
 
133
################################################################### 
 
134
#      Check if TRUE and FALSE values can be used on variable     #
 
135
################################################################### 
 
136
 
 
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;
 
141
 
 
142
##############################  
 
143
#   Restore initial value    #
 
144
##############################
 
145
 
 
146
SET @@global.innodb_thread_concurrency = @global_start_value;
 
147
SELECT @@global.innodb_thread_concurrency;
 
148
 
 
149
###############################################################
 
150
#                    END OF innodb_thread_concurrency TESTS   #
 
151
###############################################################