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

« back to all changes in this revision

Viewing changes to mysql-test/t/delayed_insert_limit_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                                                                         #
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
 
--echo ** Setup **
23
 
--echo
24
 
#
25
 
# Setup
26
 
#
27
 
 
28
 
--source include/not_embedded.inc
29
 
 
30
 
--echo Creating connection con0
31
 
connect (con0,localhost,root,,);
32
 
--echo Creating connection con1
33
 
connect (con1,localhost,root,,);
34
 
 
35
 
connection default;
36
 
 
37
 
SET @global_delayed_insert_limit = @@GLOBAL.delayed_insert_limit;
38
 
 
39
 
#
40
 
# Create Table
41
 
#
42
 
 
43
 
CREATE TABLE t1 (a varchar(100));
44
 
 
45
 
--echo '#--------------------FN_DYNVARS_25_01-------------------------#'
46
 
#
47
 
# Value less than the provided INSERTS (9)
48
 
#
49
 
 
50
 
SET GLOBAL delayed_insert_limit = 9;
51
 
 
52
 
--echo ** Connection con0 **
53
 
connection con0;
54
 
SET GLOBAL delayed_insert_limit = 9;
55
 
--echo ** Connection con1 **
56
 
connection con1;
57
 
SET GLOBAL delayed_insert_limit = 9;
58
 
--echo ** Connection default **
59
 
connection default;
60
 
SET GLOBAL delayed_insert_limit = 9;
61
 
 
62
 
INSERT INTO t1 VALUES('1');
63
 
INSERT INTO t1 VALUES('2');
64
 
INSERT INTO t1 VALUES('3');
65
 
INSERT INTO t1 VALUES('4');
66
 
INSERT INTO t1 VALUES('5');
67
 
INSERT INTO t1 VALUES('6');
68
 
 
69
 
LOCK TABLE t1 WRITE;
70
 
 
71
 
--echo ** Connection con1 **
72
 
connection con1;
73
 
 
74
 
delimiter |;
75
 
 
76
 
send
77
 
INSERT DELAYED INTO t1 VALUES('7');
78
 
INSERT DELAYED INTO t1 VALUES('8');
79
 
INSERT DELAYED INTO t1 VALUES('9');
80
 
INSERT DELAYED INTO t1 VALUES('10');
81
 
INSERT DELAYED INTO t1 VALUES('11');
82
 
INSERT DELAYED INTO t1 VALUES('12');
83
 
INSERT DELAYED INTO t1 VALUES('13');
84
 
INSERT DELAYED INTO t1 VALUES('14');
85
 
INSERT DELAYED INTO t1 VALUES('15');
86
 
INSERT DELAYED INTO t1 VALUES('16');
87
 
INSERT DELAYED INTO t1 VALUES('17');
88
 
INSERT DELAYED INTO t1 VALUES('18');
89
 
INSERT DELAYED INTO t1 VALUES('19');
90
 
INSERT DELAYED INTO t1 VALUES('20');
91
 
INSERT DELAYED INTO t1 VALUES('21');
92
 
INSERT DELAYED INTO t1 VALUES('22');|
93
 
 
94
 
delimiter ;|
95
 
 
96
 
--echo ** Connection con0 **
97
 
connection con0;
98
 
 
99
 
delimiter |;
100
 
 
101
 
send
102
 
SELECT * FROM t1;|
103
 
 
104
 
delimiter ;|
105
 
 
106
 
--echo ** Connection default **
107
 
connection default;
108
 
 
109
 
--echo Waiting for 1 sec
110
 
--sleep 1
111
 
 
112
 
UNLOCK TABLES;
113
 
 
114
 
--echo ** Connection con0 **
115
 
connection con0;
116
 
reap;
117
 
--echo 'Bug#35386: insert delayed inserts 1 + limit rows instead of just limit rows'
118
 
 
119
 
--echo ** Connection default **
120
 
connection default;
121
 
 
122
 
--echo Waiting for 1 sec
123
 
--sleep 1
124
 
--echo Checking if the delayed insert continued afterwards
125
 
SELECT * FROM t1;
126
 
 
127
 
DELETE FROM t1;
128
 
 
129
 
 
130
 
--echo '#--------------------FN_DYNVARS_25_02-------------------------#'
131
 
#
132
 
# Value 5
133
 
#
134
 
 
135
 
SET GLOBAL delayed_insert_limit = 20;
136
 
 
137
 
--echo ** Connection con0 **
138
 
connection con0;
139
 
SET GLOBAL delayed_insert_limit = 20;
140
 
--echo ** Connection con1 **
141
 
connection con1;
142
 
SET GLOBAL delayed_insert_limit = 20;
143
 
--echo ** Connection default **
144
 
connection default;
145
 
SET GLOBAL delayed_insert_limit = 20;
146
 
 
147
 
INSERT INTO t1 VALUES('1');
148
 
INSERT INTO t1 VALUES('2');
149
 
INSERT INTO t1 VALUES('3');
150
 
INSERT INTO t1 VALUES('4');
151
 
INSERT INTO t1 VALUES('5');
152
 
INSERT INTO t1 VALUES('6');
153
 
 
154
 
LOCK TABLE t1 WRITE;
155
 
 
156
 
--echo ** Connection con1 **
157
 
connection con1;
158
 
 
159
 
--echo Asynchronous execute
160
 
delimiter |;
161
 
 
162
 
send
163
 
INSERT DELAYED INTO t1 VALUES('7');
164
 
INSERT DELAYED INTO t1 VALUES('8');
165
 
INSERT DELAYED INTO t1 VALUES('9');
166
 
INSERT DELAYED INTO t1 VALUES('10');
167
 
INSERT DELAYED INTO t1 VALUES('11');
168
 
INSERT DELAYED INTO t1 VALUES('12');
169
 
INSERT DELAYED INTO t1 VALUES('13');
170
 
INSERT DELAYED INTO t1 VALUES('14');
171
 
INSERT DELAYED INTO t1 VALUES('15');
172
 
INSERT DELAYED INTO t1 VALUES('16');
173
 
INSERT DELAYED INTO t1 VALUES('17');
174
 
INSERT DELAYED INTO t1 VALUES('18');
175
 
INSERT DELAYED INTO t1 VALUES('19');
176
 
INSERT DELAYED INTO t1 VALUES('20');
177
 
INSERT DELAYED INTO t1 VALUES('21');
178
 
INSERT DELAYED INTO t1 VALUES('22');|
179
 
 
180
 
delimiter ;|
181
 
 
182
 
--echo ** Connection con0 **
183
 
connection con0;
184
 
 
185
 
--echo Asynchronous execute
186
 
delimiter |;
187
 
 
188
 
send
189
 
SELECT * FROM t1;|
190
 
 
191
 
delimiter ;|
192
 
 
193
 
--echo ** Connection default **
194
 
connection default;
195
 
 
196
 
--echo Waiting for 1 sec
197
 
--sleep 1
198
 
 
199
 
UNLOCK TABLES;
200
 
 
201
 
--echo ** Connection con0 **
202
 
connection con0;
203
 
--echo Asynchronous execute result
204
 
reap;
205
 
 
206
 
--echo ** Connection default**
207
 
connection default;
208
 
 
209
 
--echo Waiting for 1 sec
210
 
--sleep 1
211
 
--echo Checking if the delayed insert gives the same result afterwards
212
 
SELECT * FROM t1;
213
 
 
214
 
DELETE FROM t1;
215
 
 
216
 
#
217
 
# Cleanup
218
 
#
219
 
 
220
 
--echo Switching to default
221
 
connection default;
222
 
 
223
 
--echo Disconnecting from con1, con0
224
 
disconnect con0;
225
 
disconnect con1;
226
 
 
227
 
DROP TABLE t1;
228
 
 
229
 
SET @@GLOBAL.delayed_insert_limit = @global_delayed_insert_limit;