~mathiaz/ubuntu/lucid/mysql-dfsg-5.1/zap-bug-552053

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2009-06-25 12:55:45 UTC
  • mfrom: (1.1.2 upstream) (0.1.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20090625125545-m8ogs96zzsri74xe
Tags: 5.1.34-1ubuntu1
* Merge from debian experimental (and 5.0 from main), remaining changes:
  - debian/mysql-server-5.1.config:
    + ask for MySQL root password at priority high instead of medium so
      that the password prompt is seen on a default install. (LP: #319843)
    + don't ask for root password when upgrading from a 5.0 install.
  - debian/control:
    + Make libmysqlclient16-dev a transitional package depending on
      libmysqlclient-dev.
    + Make libmysqlclient-dev conflict with libmysqlclient15-dev.
    + Don't build mysql-server, mysql-client, mysql-common and
      libmysqlclient15-dev binary packages since they're still provided
      by mysql-dfsg-5.0.
    + Make mysql-{client,server}-5.1 packages conflict and
      replace mysql-{client,server}-5.0, but not provide
      mysql-{client,server}.
    + Depend on a specific version of mysql-common rather than the src
      version of mysql-dfsg-5.1 since mysql-common is currently part of
      mysql-dfsg-5.0.
    + Lower mailx from a Recommends to a Suggests to avoid pulling in
      a full MTA on all installs of mysql-server. (LP: #259477)
  - debian/rules:
    + added -fno-strict-aliasing to CFLAGS to get around mysql testsuite
      build failures.
    + install mysql-test and sql-bench to /usr/share/mysql/ rather than
      /usr/.
  - debian/additions/debian-start.inc.sh: support ANSI mode (LP: #310211)
  - Add AppArmor profile:
    - debian/apparmor-profile: apparmor profile.
    - debian/rules, debian/mysql-server-5.0.files: install apparmor profile.
    - debian/mysql-server-5.0.dirs: add etc/apparmor.d/force-complain
    - debian/mysql-server-5.0.postrm: remove symlink in force-complain/ on
      purge.
    - debian/mysql-server-5.1.README.Debian: add apparmor documentation.
    - debian/additions/my.cnf: Add warning about apparmor. (LP: #201799)
    - debian/mysql-server-5.1.postinst: reload apparmor profiles.
  - debian/additions/my.cnf: remove language option. Error message files are
    located in a different directory in MySQL 5.0. Setting the language
    option to use /usr/share/mysql/english breaks 5.0. Both 5.0 and 5.1
    use a default value that works. (LP: #316974)
  - debian/mysql-server-5.1.mysql.init:
    + Clearly indicate that we do not support running multiple instances
      of mysqld by duplicating the init script.
      (closes: #314785, #324834, #435165, #444216)
    + Properly parameterize all existing references to the mysql config
      file (/etc/mysql/my.cnf).
  - debian/mysql-server-5.0.postinst: Clear out the second password
    when setting up mysql. (LP: #344816)
  - mysql-server-core-5.1 package for files needed by Akonadi:
    + debian/control: create mysql-server-core-5.1 package.
    + debian/mysql-server-core-5.1.files, debian/mysql-server-5.1.files:
      move core mysqld files to mysql-server-core-5.1 package.
  - Don't package sql-bench and mysql-test file.
* Dropped changes:
  - debian/patches/92_ssl_test_cert.dpatch: certificate expiration in
    test suite (LP: #323755). Included upstream.
* Dropped from 5.0:
  - apparmor profile:
    - debian/control: Recommends apparmor >= 2.1+1075-0ubuntu6. All version
      of apparmor-profile (>hardy) are higher than this version.
    - debian/mysql-server-5.0.preinst: create symlink for force-complain/
      on pre-feisty upgrades, upgrades where apparmor-profiles profile is
      unchanged (ie non-enforcing) and upgrades where the profile
      doesn't exist. Support for pre-hardy upgrades is no longer needed.
* debian/mysql-server-5.1.postinst: fix debian-sys-maint user creation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
########### mysql-test\t\query_cache_wlock_invalidate_basic.test ##############
2
 
#                                                                             #
3
 
# Variable Name: query_cache_wlock_invalidate                                 #
4
 
# Scope: GLOBAL | SESSION                                                     #
5
 
# Access Type: Dynamic                                                        #
6
 
# Data Type: boolean                                                          #
7
 
# Default Value: FALSE                                                        #
8
 
# Range: TRUE, FALSE                                                          #
9
 
#                                                                             #
10
 
#                                                                             #
11
 
# Creation Date: 2008-02-07                                                   #
12
 
# Author:  Rizwan                                                             #
13
 
#                                                                             #
14
 
# Description: Test Cases of Dynamic System Variable                          #
15
 
#              query_cache_wlock_invalidate that checks the behavior of this  #
16
 
#              variable in the following ways                                 #
17
 
#              * Default Value                                                #
18
 
#              * Valid & Invalid values                                       #
19
 
#              * Scope & Access method                                        #
20
 
#              * Data Integrity                                               #
21
 
#                                                                             #
22
 
# Reference: http://dev.mysql.com/doc/refman/5.1/en/                          #
23
 
#  server-system-variables.html                                               #
24
 
#                                                                             #
25
 
###############################################################################
26
 
 
27
 
--source include/load_sysvars.inc
28
 
 
29
 
######################################################################## 
30
 
#                    START OF query_cache_wlock_invalidate TESTS       #
31
 
######################################################################## 
32
 
 
33
 
 
34
 
###############################################################################
35
 
# Saving initial value of query_cache_wlock_invalidate in a temporary variable#
36
 
###############################################################################
37
 
 
38
 
SET @session_start_value = @@session.query_cache_wlock_invalidate;
39
 
SELECT @session_start_value;
40
 
 
41
 
SET @global_start_value = @@global.query_cache_wlock_invalidate;
42
 
SELECT @global_start_value;
43
 
 
44
 
--echo '#--------------------FN_DYNVARS_135_01------------------------#'
45
 
######################################################################## 
46
 
#           Display the DEFAULT value of query_cache_wlock_invalidate  #
47
 
######################################################################## 
48
 
 
49
 
SET @@session.query_cache_wlock_invalidate = 1;
50
 
SET @@session.query_cache_wlock_invalidate = DEFAULT;
51
 
SELECT @@session.query_cache_wlock_invalidate;
52
 
 
53
 
SET @@global.query_cache_wlock_invalidate = 1;
54
 
SET @@global.query_cache_wlock_invalidate = DEFAULT;
55
 
SELECT @@global.query_cache_wlock_invalidate;
56
 
 
57
 
--echo '#---------------------FN_DYNVARS_135_02-------------------------#'
58
 
###########################################################################
59
 
#   Check if query_cache_wlock_invalidate can be accessed with and without
60
 
#   @@ sign  
61
 
###########################################################################
62
 
 
63
 
SET query_cache_wlock_invalidate = 1;
64
 
SELECT @@query_cache_wlock_invalidate;
65
 
 
66
 
--Error ER_UNKNOWN_TABLE
67
 
SELECT session.query_cache_wlock_invalidate;
68
 
 
69
 
--Error ER_UNKNOWN_TABLE
70
 
SELECT local.query_cache_wlock_invalidate;
71
 
 
72
 
--Error ER_UNKNOWN_TABLE
73
 
SELECT global.query_cache_wlock_invalidate;
74
 
 
75
 
#using another syntax for accessing system variables
76
 
SET session query_cache_wlock_invalidate = 0;
77
 
SELECT @@session.query_cache_wlock_invalidate;
78
 
 
79
 
SET global query_cache_wlock_invalidate = 0;
80
 
SELECT @@global.query_cache_wlock_invalidate;
81
 
 
82
 
 
83
 
--echo '#--------------------FN_DYNVARS_135_03------------------------#'
84
 
########################################################################## 
85
 
#   change the value of query_cache_wlock_invalidate to a valid value    #
86
 
########################################################################## 
87
 
# for session
88
 
SET @@session.query_cache_wlock_invalidate = 0;
89
 
SELECT @@session.query_cache_wlock_invalidate;
90
 
SET @@session.query_cache_wlock_invalidate = 1;
91
 
SELECT @@session.query_cache_wlock_invalidate;
92
 
 
93
 
# for global
94
 
SET @@global.query_cache_wlock_invalidate = 0;
95
 
SELECT @@global.query_cache_wlock_invalidate;
96
 
SET @@global.query_cache_wlock_invalidate = 1;
97
 
SELECT @@global.query_cache_wlock_invalidate;
98
 
 
99
 
 
100
 
--echo '#--------------------FN_DYNVARS_135_04-------------------------#'
101
 
########################################################################### 
102
 
#    Change the value of query_cache_wlock_invalidate to invalid value    #
103
 
########################################################################### 
104
 
 
105
 
# for session
106
 
--Error ER_WRONG_VALUE_FOR_VAR
107
 
SET @@session.query_cache_wlock_invalidate = -1;
108
 
--Error ER_WRONG_VALUE_FOR_VAR
109
 
SET @@session.query_cache_wlock_invalidate = 1.6;
110
 
--Error ER_WRONG_VALUE_FOR_VAR
111
 
SET @@session.query_cache_wlock_invalidate = "T";
112
 
--Error ER_WRONG_VALUE_FOR_VAR
113
 
SET @@session.query_cache_wlock_invalidate = "Y";
114
 
--Error ER_WRONG_VALUE_FOR_VAR
115
 
SET @@session.query_cache_wlock_invalidate = TR�E;
116
 
--Error ER_WRONG_VALUE_FOR_VAR
117
 
SET @@session.query_cache_wlock_invalidate = �N;
118
 
 
119
 
SET @@session.query_cache_wlock_invalidate = OF;
120
 
SELECT @@session.query_cache_wlock_invalidate;
121
 
 
122
 
--echo 'Bug# 34828: OF is taken as OFF and a value of 0 is set.'
123
 
 
124
 
--Error ER_WRONG_VALUE_FOR_VAR
125
 
SET @@session.query_cache_wlock_invalidate = �FF;
126
 
 
127
 
# for global
128
 
 
129
 
--Error ER_WRONG_VALUE_FOR_VAR
130
 
SET @@global.query_cache_wlock_invalidate = -1;
131
 
--Error ER_WRONG_VALUE_FOR_VAR
132
 
SET @@global.query_cache_wlock_invalidate = 2;
133
 
--Error ER_WRONG_VALUE_FOR_VAR
134
 
SET @@global.query_cache_wlock_invalidate = "T";
135
 
--Error ER_WRONG_VALUE_FOR_VAR
136
 
SET @@global.query_cache_wlock_invalidate = "Y";
137
 
--Error ER_WRONG_VALUE_FOR_VAR
138
 
SET @@global.query_cache_wlock_invalidate = TR�E;
139
 
--Error ER_WRONG_VALUE_FOR_VAR
140
 
SET @@global.query_cache_wlock_invalidate = �N;
141
 
 
142
 
SET @@global.query_cache_wlock_invalidate = OF;
143
 
SELECT @@global.query_cache_wlock_invalidate;
144
 
 
145
 
--echo 'Bug 34828: OF is taken as OFF and a value of 0 is set.'
146
 
 
147
 
--Error ER_WRONG_VALUE_FOR_VAR
148
 
SET @@global.query_cache_wlock_invalidate = �FF;
149
 
 
150
 
 
151
 
--echo '#-------------------FN_DYNVARS_135_05----------------------------#'
152
 
########################################################################### 
153
 
#       Test if changing global variable effects session and vice versa   #
154
 
########################################################################### 
155
 
 
156
 
SET @@global.query_cache_wlock_invalidate = 0;
157
 
SET @@session.query_cache_wlock_invalidate = 1;
158
 
SELECT @@global.query_cache_wlock_invalidate AS res_is_0;
159
 
 
160
 
SET @@global.query_cache_wlock_invalidate = 0;
161
 
SELECT @@session.query_cache_wlock_invalidate AS res_is_1;
162
 
 
163
 
--echo '#----------------------FN_DYNVARS_135_06------------------------#'
164
 
######################################################################### 
165
 
#     Check if the value in GLOBAL Table matches value in variable      #
166
 
#########################################################################
167
 
 
168
 
SELECT @@global.query_cache_wlock_invalidate = VARIABLE_VALUE 
169
 
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 
170
 
WHERE VARIABLE_NAME='query_cache_wlock_invalidate';
171
 
SELECT @@global.query_cache_wlock_invalidate;
172
 
SELECT VARIABLE_VALUE 
173
 
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 
174
 
WHERE VARIABLE_NAME='query_cache_wlock_invalidate';
175
 
 
176
 
--echo '#----------------------FN_DYNVARS_135_07------------------------#'
177
 
######################################################################### 
178
 
#     Check if the value in SESSION Table matches value in variable     #
179
 
#########################################################################
180
 
 
181
 
SELECT @@session.query_cache_wlock_invalidate = VARIABLE_VALUE 
182
 
FROM INFORMATION_SCHEMA.SESSION_VARIABLES 
183
 
WHERE VARIABLE_NAME='query_cache_wlock_invalidate';
184
 
SELECT @@session.query_cache_wlock_invalidate;
185
 
SELECT VARIABLE_VALUE 
186
 
FROM INFORMATION_SCHEMA.SESSION_VARIABLES 
187
 
WHERE VARIABLE_NAME='query_cache_wlock_invalidate';
188
 
 
189
 
--echo '#---------------------FN_DYNVARS_135_08-------------------------#'
190
 
################################################################### 
191
 
#        Check if ON and OFF values can be used on variable       #
192
 
################################################################### 
193
 
 
194
 
SET @@session.query_cache_wlock_invalidate = OFF;
195
 
SELECT @@session.query_cache_wlock_invalidate;
196
 
SET @@session.query_cache_wlock_invalidate = ON;
197
 
SELECT @@session.query_cache_wlock_invalidate;
198
 
 
199
 
SET @@global.query_cache_wlock_invalidate = OFF;
200
 
SELECT @@global.query_cache_wlock_invalidate;
201
 
SET @@global.query_cache_wlock_invalidate = ON;
202
 
SELECT @@global.query_cache_wlock_invalidate;
203
 
 
204
 
--echo '#---------------------FN_DYNVARS_135_09----------------------#'
205
 
################################################################### 
206
 
#      Check if TRUE and FALSE values can be used on variable     #
207
 
################################################################### 
208
 
 
209
 
SET @@session.query_cache_wlock_invalidate = TRUE;
210
 
SELECT @@session.query_cache_wlock_invalidate;
211
 
SET @@session.query_cache_wlock_invalidate = FALSE;
212
 
SELECT @@session.query_cache_wlock_invalidate;
213
 
 
214
 
SET @@global.query_cache_wlock_invalidate = TRUE;
215
 
SELECT @@global.query_cache_wlock_invalidate;
216
 
SET @@global.query_cache_wlock_invalidate = FALSE;
217
 
SELECT @@global.query_cache_wlock_invalidate;
218
 
 
219
 
##############################  
220
 
#   Restore initial value    #
221
 
##############################
222
 
 
223
 
SET @@session.query_cache_wlock_invalidate = @session_start_value;
224
 
SELECT @@session.query_cache_wlock_invalidate;
225
 
 
226
 
SET @@global.query_cache_wlock_invalidate = @global_start_value;
227
 
SELECT @@global.query_cache_wlock_invalidate;
228
 
 
229
 
###############################################################
230
 
#            END OF query_cache_wlock_invalidate TESTS        #
231
 
###############################################################