Skip to content

Commit fe4eacd

Browse files
author
Alexey Botchkov
committed
MDEV-17683 sys_vars.delayed_insert_limit_func fails in buildbot with wrong result.
Test fixed to be deterministic.
1 parent edb6e2b commit fe4eacd

File tree

2 files changed

+11
-33
lines changed

2 files changed

+11
-33
lines changed

mysql-test/suite/sys_vars/r/delayed_insert_limit_func.result

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,12 @@ INSERT DELAYED INTO t1 VALUES('39','1','1');
5151
INSERT DELAYED INTO t1 VALUES('40','1','1');
5252
INSERT DELAYED INTO t1 VALUES('41','1','1');
5353
INSERT DELAYED INTO t1 VALUES('42','1','1');
54-
INSERT DELAYED INTO t1 VALUES('43','1','1');|
54+
INSERT DELAYED INTO t1 VALUES('43','1','1');
5555
** Connection con0 **
5656
SELECT COUNT(*) FROM t1;
5757
** Connection default **
5858
** Wait till con0 is blocked **
5959
UNLOCK TABLES;
60-
** Connection con1 **
61-
Asynchronous "reap" result
6260
** Connection con0 **
6361
Asynchronous "reap" result
6462
The next result suffers from
@@ -84,7 +82,6 @@ INSERT INTO t1 VALUES('5');
8482
INSERT INTO t1 VALUES('6');
8583
LOCK TABLE v1 READ;
8684
** Connection con1 **
87-
Asynchronous execute
8885
INSERT DELAYED INTO t1 VALUES('7');
8986
INSERT DELAYED INTO t1 VALUES('8');
9087
INSERT DELAYED INTO t1 VALUES('9');
@@ -100,23 +97,22 @@ INSERT DELAYED INTO t1 VALUES('18');
10097
INSERT DELAYED INTO t1 VALUES('19');
10198
INSERT DELAYED INTO t1 VALUES('20');
10299
INSERT DELAYED INTO t1 VALUES('21');
103-
INSERT DELAYED INTO t1 VALUES('22');|
100+
INSERT DELAYED INTO t1 VALUES('22');
104101
** Connection con0 **
105102
Asynchronous execute
106-
SELECT COUNT(*) BETWEEN 6 AND 22 FROM t1;
103+
SELECT COUNT(*) FROM t1;
107104
** Connection default **
108105
** Wait till con0 is blocked **
109106
UNLOCK TABLES;
110-
** Connection con1 **
111107
** Connection con0 **
112108
Asynchronous "reap" result
113-
COUNT(*) BETWEEN 6 AND 22
114-
1
109+
COUNT(*)
110+
22
115111
** Connection default**
116112
Checking if the delayed insert gives the same result afterwards
117-
SELECT COUNT(*) BETWEEN 6 AND 22 FROM t1;
118-
COUNT(*) BETWEEN 6 AND 22
119-
1
113+
SELECT COUNT(*) FROM t1;
114+
COUNT(*)
115+
22
120116
** Connection default**
121117
DROP TABLE t1;
122118
DROP VIEW v1;

mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ LOCK TABLE v1 READ;
6666
--echo ** Connection con1 **
6767
connection con1;
6868

69-
delimiter |;
70-
send
7169
INSERT DELAYED INTO t1 VALUES('7','1','1');
7270
INSERT DELAYED INTO t1 VALUES('8','1','1');
7371
INSERT DELAYED INTO t1 VALUES('9','1','1');
@@ -104,8 +102,7 @@ INSERT DELAYED INTO t1 VALUES('39','1','1');
104102
INSERT DELAYED INTO t1 VALUES('40','1','1');
105103
INSERT DELAYED INTO t1 VALUES('41','1','1');
106104
INSERT DELAYED INTO t1 VALUES('42','1','1');
107-
INSERT DELAYED INTO t1 VALUES('43','1','1');|
108-
delimiter ;|
105+
INSERT DELAYED INTO t1 VALUES('43','1','1');
109106

110107
--echo ** Connection con0 **
111108
connection con0;
@@ -126,11 +123,6 @@ let $wait_condition=
126123
--source include/wait_condition.inc
127124
UNLOCK TABLES;
128125

129-
--echo ** Connection con1 **
130-
connection con1;
131-
--echo Asynchronous "reap" result
132-
reap;
133-
134126
--echo ** Connection con0 **
135127
connection con0;
136128
--echo Asynchronous "reap" result
@@ -170,10 +162,6 @@ LOCK TABLE v1 READ;
170162
--echo ** Connection con1 **
171163
connection con1;
172164

173-
--echo Asynchronous execute
174-
delimiter |;
175-
176-
send
177165
INSERT DELAYED INTO t1 VALUES('7');
178166
INSERT DELAYED INTO t1 VALUES('8');
179167
INSERT DELAYED INTO t1 VALUES('9');
@@ -189,9 +177,7 @@ INSERT DELAYED INTO t1 VALUES('18');
189177
INSERT DELAYED INTO t1 VALUES('19');
190178
INSERT DELAYED INTO t1 VALUES('20');
191179
INSERT DELAYED INTO t1 VALUES('21');
192-
INSERT DELAYED INTO t1 VALUES('22');|
193-
194-
delimiter ;|
180+
INSERT DELAYED INTO t1 VALUES('22');
195181

196182
--echo ** Connection con0 **
197183
connection con0;
@@ -202,7 +188,7 @@ let $wait_condition=
202188
--echo Asynchronous execute
203189
# Due to performance and server behaveiour the test observes values between 6 and 22.
204190
# In any case the value must not be outside of that range.
205-
let $my_select= SELECT COUNT(*) BETWEEN 6 AND 22 FROM t1;
191+
let $my_select= SELECT COUNT(*) FROM t1;
206192
send;
207193
eval $my_select;
208194

@@ -215,10 +201,6 @@ let $wait_condition=
215201
--source include/wait_condition.inc
216202
UNLOCK TABLES;
217203

218-
--echo ** Connection con1 **
219-
connection con1;
220-
reap;
221-
222204
--echo ** Connection con0 **
223205
connection con0;
224206
--echo Asynchronous "reap" result

0 commit comments

Comments
 (0)