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

« back to all changes in this revision

Viewing changes to mysql-test/t/sql_low_priority_updates_func.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\sql_low_priority_updates_func.test #################
2
 
#                                                                             #
3
 
# Variable Name: sql_low_priority_updates                                     #
4
 
# Scope: GLOBAL & SESSION                                                     #
5
 
# Access Type: Dynamic                                                        #
6
 
# Data Type: BOOLEAN                                                          #
7
 
# Default Value: 1 TRUE                                                       #
8
 
# Values:       1 TRUE, 0 FALSE                                               #
9
 
#                                                                             #
10
 
#                                                                             #
11
 
# Creation Date: 2008-02-25                                                   #
12
 
# Author:  Sharique Abdullah                                                  #
13
 
#                                                                             #
14
 
# Description: Test Cases of Dynamic System Variable  sql_low_priority_updates#
15
 
#              that checks behavior of this variable in the following ways    #
16
 
#              * Functionality based on different values                      #
17
 
#                                                                             #
18
 
# Reference: http://dev.mysql.com/doc/refman/5.1/en/set-option.html           #
19
 
#                                                                             #
20
 
###############################################################################
21
 
 
22
 
--source include/not_embedded.inc
23
 
 
24
 
################################################################
25
 
# sql_low_priority_updates was renamed to low_priority_updates #
26
 
################################################################
27
 
 
28
 
--echo ** Setup **
29
 
--echo
30
 
#
31
 
# Setup
32
 
#
33
 
--echo ** Connecting con0 using root **
34
 
connect (con0,localhost,root,,);
35
 
--echo ** Connecting con1 using root **
36
 
connect (con1,localhost,root,,);
37
 
 
38
 
--echo ** Connection default **
39
 
connection default;
40
 
 
41
 
SET @global_low_priority_updates = @@GLOBAL.low_priority_updates;
42
 
SET @session_low_priority_updates = @@SESSION.low_priority_updates;
43
 
 
44
 
#
45
 
# Create Table
46
 
#
47
 
 
48
 
CREATE TABLE t1 (a varchar(100));
49
 
 
50
 
--echo '#--------------------FN_DYNVARS_160_01-------------------------#'
51
 
#
52
 
# Value ON
53
 
#
54
 
 
55
 
--echo ** Connection con0 **
56
 
connection con0;
57
 
SET SESSION low_priority_updates = ON;
58
 
--echo ** Connection con1 **
59
 
connection con1;
60
 
SET SESSION low_priority_updates = ON;
61
 
--echo ** Connection default **
62
 
connection default;
63
 
SET SESSION low_priority_updates = ON;
64
 
 
65
 
INSERT INTO t1 VALUES('1');
66
 
INSERT INTO t1 VALUES('2');
67
 
INSERT INTO t1 VALUES('3');
68
 
INSERT INTO t1 VALUES('4');
69
 
INSERT INTO t1 VALUES('5');
70
 
INSERT INTO t1 VALUES('6');
71
 
 
72
 
LOCK TABLE t1 WRITE;
73
 
 
74
 
--echo ** Connection con1 **
75
 
connection con1;
76
 
 
77
 
--echo ** Asynchronous Execution **
78
 
delimiter |;
79
 
 
80
 
send
81
 
UPDATE t1 SET a = CONCAT(a,"-updated");|
82
 
 
83
 
delimiter ;|
84
 
 
85
 
--echo ** Connection con0 **
86
 
connection con0;
87
 
 
88
 
--echo ** Asynchronous Execution **
89
 
delimiter |;
90
 
 
91
 
send
92
 
LOCK TABLE t1 READ;
93
 
SELECT * FROM t1;
94
 
UNLOCK TABLES;|
95
 
 
96
 
delimiter ;|
97
 
 
98
 
--echo ** Connection default **
99
 
connection default;
100
 
 
101
 
--echo Sleeping for 1 secs
102
 
--sleep 1
103
 
 
104
 
UNLOCK TABLES;
105
 
 
106
 
--echo ** Connection con0 **
107
 
connection con0;
108
 
--echo ** Asynchronous Result **
109
 
reap;
110
 
 
111
 
--echo Expected values of a without -updated;
112
 
 
113
 
--echo ** Connection default **
114
 
connection default;
115
 
 
116
 
DELETE FROM t1;
117
 
 
118
 
--echo '#--------------------FN_DYNVARS_160_02-------------------------#'
119
 
#
120
 
# Value ON
121
 
#
122
 
 
123
 
--echo ** Connection con0 **
124
 
connection con0;
125
 
SET SESSION low_priority_updates = OFF;
126
 
--echo ** Connection con1 **
127
 
connection con1;
128
 
SET SESSION low_priority_updates = OFF;
129
 
--echo ** Connection default**
130
 
connection default;
131
 
SET SESSION low_priority_updates = OFF;
132
 
 
133
 
INSERT INTO t1 VALUES('1');
134
 
INSERT INTO t1 VALUES('2');
135
 
INSERT INTO t1 VALUES('3');
136
 
INSERT INTO t1 VALUES('4');
137
 
INSERT INTO t1 VALUES('5');
138
 
INSERT INTO t1 VALUES('6');
139
 
 
140
 
LOCK TABLE t1 WRITE;
141
 
 
142
 
--echo ** Connection con1 **
143
 
connection con1;
144
 
 
145
 
--echo ** Asynchronous Execution **
146
 
delimiter |;
147
 
 
148
 
send
149
 
UPDATE t1 SET a = CONCAT(a,"-updated");|
150
 
 
151
 
delimiter ;|
152
 
 
153
 
--echo ** Connection con0 **
154
 
connection con0;
155
 
 
156
 
--echo ** Asynchronous Execution **
157
 
delimiter |;
158
 
 
159
 
send
160
 
LOCK TABLE t1 READ;
161
 
SELECT * FROM t1;
162
 
UNLOCK TABLES;|
163
 
 
164
 
delimiter ;|
165
 
 
166
 
--echo ** Connection default **
167
 
connection default;
168
 
 
169
 
--echo Sleeping for 1 secs
170
 
--sleep 1
171
 
 
172
 
UNLOCK TABLES;
173
 
 
174
 
--echo ** Connection con0 **
175
 
connection con0;
176
 
--echo ** Asynchronous Result **
177
 
reap;
178
 
--echo Expected values of a with -updated;
179
 
 
180
 
--echo ** Connection default**
181
 
connection default;
182
 
 
183
 
DELETE FROM t1;
184
 
 
185
 
--echo '#--------------------FN_DYNVARS_160_03-------------------------#'
186
 
#
187
 
# Session data integrity check & GLOBAL Value check
188
 
#
189
 
 
190
 
--echo ** Connecting con_int1 using root **
191
 
connect (con_int1,localhost,root,,);
192
 
 
193
 
--echo ** Connection con_int1 **
194
 
connection con_int1;
195
 
SELECT @@SESSION.low_priority_updates;
196
 
--echo 1 / TRUE Expected
197
 
 
198
 
SET SESSION low_priority_updates = FALSE;
199
 
 
200
 
--echo ** Connecting con_int2 using root **
201
 
connect (con_int2,localhost,root,,);
202
 
 
203
 
--echo ** Connection con_int2 **
204
 
connection con_int2;
205
 
SELECT @@SESSION.low_priority_updates;
206
 
--echo 1 / TRUE Expected
207
 
 
208
 
SET SESSION low_priority_updates = TRUE;
209
 
 
210
 
--echo ** Connection con_int1 **
211
 
connection con_int1;
212
 
SELECT @@SESSION.low_priority_updates;
213
 
--echo 0 / FALSE Expected
214
 
 
215
 
--echo ** Connection con_int2 **
216
 
connection con_int2;
217
 
SELECT @@SESSION.low_priority_updates;
218
 
--echo 1 / TRUE Expected
219
 
 
220
 
--echo ** Connection default  **
221
 
connection default;
222
 
 
223
 
--echo Disconnecting Connections con_int1, con_int2
224
 
disconnect con_int1;
225
 
disconnect con_int2;
226
 
 
227
 
#
228
 
# Cleanup
229
 
#
230
 
 
231
 
--echo ** Connection default **
232
 
connection default;
233
 
--echo Disconnecting Connections con0, con1
234
 
disconnect con0;
235
 
disconnect con1;
236
 
 
237
 
DROP TABLE t1;
238
 
 
239
 
SET @@GLOBAL.low_priority_updates = @global_low_priority_updates;
240
 
SET @@SESSION.low_priority_updates = @session_low_priority_updates;