delayed_insert_limit_func.result 4.19 KB
Newer Older
1 2 3 4 5
** Setup **

Creating connection con0
Creating connection con1
SET @global_delayed_insert_limit = @@GLOBAL.delayed_insert_limit;
6
CREATE TABLE t1 (a VARCHAR(100),b VARCHAR(100),c VARCHAR(100));
7
CREATE VIEW v1 as select * from t1;
8
'#--------------------FN_DYNVARS_25_01-------------------------#'
9 10 11 12 13 14 15
SET GLOBAL delayed_insert_limit = 14;
INSERT INTO t1 VALUES('1','1','1');
INSERT INTO t1 VALUES('2','1','1');
INSERT INTO t1 VALUES('3','1','1');
INSERT INTO t1 VALUES('4','1','1');
INSERT INTO t1 VALUES('5','1','1');
INSERT INTO t1 VALUES('6','1','1');
16
LOCK TABLE v1 WRITE;
17
** Connection con1 **
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
INSERT DELAYED INTO t1 VALUES('7','1','1');
INSERT DELAYED INTO t1 VALUES('8','1','1');
INSERT DELAYED INTO t1 VALUES('9','1','1');
INSERT DELAYED INTO t1 VALUES('10','1','1');
INSERT DELAYED INTO t1 VALUES('11','1','1');
INSERT DELAYED INTO t1 VALUES('12','1','1');
INSERT DELAYED INTO t1 VALUES('13','1','1');
INSERT DELAYED INTO t1 VALUES('14','1','1');
INSERT DELAYED INTO t1 VALUES('15','1','1');
INSERT DELAYED INTO t1 VALUES('16','1','1');
INSERT DELAYED INTO t1 VALUES('17','1','1');
INSERT DELAYED INTO t1 VALUES('18','1','1');
INSERT DELAYED INTO t1 VALUES('19','1','1');
INSERT DELAYED INTO t1 VALUES('20','1','1');
INSERT DELAYED INTO t1 VALUES('21','1','1');
INSERT DELAYED INTO t1 VALUES('22','1','1');
INSERT DELAYED INTO t1 VALUES('23','1','1');
INSERT DELAYED INTO t1 VALUES('24','1','1');
INSERT DELAYED INTO t1 VALUES('25','1','1');
INSERT DELAYED INTO t1 VALUES('26','1','1');
INSERT DELAYED INTO t1 VALUES('27','1','1');
INSERT DELAYED INTO t1 VALUES('28','1','1');
INSERT DELAYED INTO t1 VALUES('29','1','1');
INSERT DELAYED INTO t1 VALUES('30','1','1');
INSERT DELAYED INTO t1 VALUES('31','1','1');
INSERT DELAYED INTO t1 VALUES('32','1','1');
INSERT DELAYED INTO t1 VALUES('33','1','1');
INSERT DELAYED INTO t1 VALUES('34','1','1');
INSERT DELAYED INTO t1 VALUES('35','1','1');
INSERT DELAYED INTO t1 VALUES('36','1','1');
INSERT DELAYED INTO t1 VALUES('37','1','1');
INSERT DELAYED INTO t1 VALUES('38','1','1');
INSERT DELAYED INTO t1 VALUES('39','1','1');
INSERT DELAYED INTO t1 VALUES('40','1','1');
INSERT DELAYED INTO t1 VALUES('41','1','1');
INSERT DELAYED INTO t1 VALUES('42','1','1');
INSERT DELAYED INTO t1 VALUES('43','1','1');|
55
** Connection con0 **
56
SELECT COUNT(*) FROM t1;
57
** Connection default **
58
** Wait till con0 is blocked **
59
UNLOCK TABLES;
60 61
** Connection con1 **
Asynchronous "reap" result
62
** Connection con0 **
63 64 65 66 67
Asynchronous "reap" result
The next result suffers from
'# Bug#35386 insert delayed inserts 1 + limit rows instead of just limit rows'
COUNT(*)
21
68 69
** Connection default **
Checking if the delayed insert continued afterwards
70 71 72 73
SELECT COUNT(*) FROM t1;
COUNT(*)
43
DROP TABLE t1;
74
DROP VIEW v1;
75
'#--------------------FN_DYNVARS_25_02-------------------------#'
76
CREATE TABLE t1 (a VARCHAR(100));
77
CREATE VIEW v1 AS SELECT * FROM t1;
78 79 80 81 82 83 84
SET GLOBAL delayed_insert_limit = 20;
INSERT INTO t1 VALUES('1');
INSERT INTO t1 VALUES('2');
INSERT INTO t1 VALUES('3');
INSERT INTO t1 VALUES('4');
INSERT INTO t1 VALUES('5');
INSERT INTO t1 VALUES('6');
85
LOCK TABLE v1 WRITE;
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
** Connection con1 **
Asynchronous execute
INSERT DELAYED INTO t1 VALUES('7');
INSERT DELAYED INTO t1 VALUES('8');
INSERT DELAYED INTO t1 VALUES('9');
INSERT DELAYED INTO t1 VALUES('10');
INSERT DELAYED INTO t1 VALUES('11');
INSERT DELAYED INTO t1 VALUES('12');
INSERT DELAYED INTO t1 VALUES('13');
INSERT DELAYED INTO t1 VALUES('14');
INSERT DELAYED INTO t1 VALUES('15');
INSERT DELAYED INTO t1 VALUES('16');
INSERT DELAYED INTO t1 VALUES('17');
INSERT DELAYED INTO t1 VALUES('18');
INSERT DELAYED INTO t1 VALUES('19');
INSERT DELAYED INTO t1 VALUES('20');
INSERT DELAYED INTO t1 VALUES('21');
INSERT DELAYED INTO t1 VALUES('22');|
** Connection con0 **
Asynchronous execute
Horst.Hunger's avatar
Horst.Hunger committed
106
SELECT COUNT(*) BETWEEN 6 AND 22 FROM t1;
107
** Connection default **
108
** Wait till con0 is blocked **
109
UNLOCK TABLES;
110
** Connection con1 **
111
** Connection con0 **
112
Asynchronous "reap" result
Horst.Hunger's avatar
Horst.Hunger committed
113
COUNT(*) BETWEEN 6 AND 22
114 115 116
1
** Connection default**
Checking if the delayed insert gives the same result afterwards
Horst.Hunger's avatar
Horst.Hunger committed
117 118
SELECT COUNT(*) BETWEEN 6 AND 22 FROM t1;
COUNT(*) BETWEEN 6 AND 22
119
1
120
** Connection default**
121
DROP TABLE t1;
122
DROP VIEW v1;
123
SET @@GLOBAL.delayed_insert_limit = @global_delayed_insert_limit;
124
Disconnecting from con1, con0