summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/r/delayed_insert_limit_func.result
blob: 2e6b730f10460afe618ebe79fa3299b97079c65c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
** Setup **

connect  con0,localhost,root,,;
connect  con1,localhost,root,,;
connection default;
SET @global_delayed_insert_limit = @@GLOBAL.delayed_insert_limit;
CREATE TABLE t1 (a VARCHAR(100),b VARCHAR(100),c VARCHAR(100));
CREATE VIEW v1 as select * from t1;
'#--------------------FN_DYNVARS_25_01-------------------------#'
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');
LOCK TABLE v1 READ;
connection con1;
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');|
connection con0;
SELECT COUNT(*) FROM t1;
connection default;
** Wait till con0 is blocked **
UNLOCK TABLES;
connection con1;
Asynchronous "reap" result
connection con0;
Asynchronous "reap" result
The next result suffers from
'# Bug#35386 insert delayed inserts 1 + limit rows instead of just limit rows'
COUNT(*)
21
connection default;
Checking if the delayed insert continued afterwards
SELECT COUNT(*) FROM t1;
COUNT(*)
43
DROP TABLE t1;
DROP VIEW v1;
'#--------------------FN_DYNVARS_25_02-------------------------#'
CREATE TABLE t1 (a VARCHAR(100));
CREATE VIEW v1 AS SELECT * FROM t1;
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');
LOCK TABLE v1 READ;
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
SELECT COUNT(*) BETWEEN 6 AND 22 FROM t1;
connection default;
** Wait till con0 is blocked **
UNLOCK TABLES;
connection con1;
connection con0;
Asynchronous "reap" result
COUNT(*) BETWEEN 6 AND 22
1
connection default;
Checking if the delayed insert gives the same result afterwards
SELECT COUNT(*) BETWEEN 6 AND 22 FROM t1;
COUNT(*) BETWEEN 6 AND 22
1
connection default;
DROP TABLE t1;
DROP VIEW v1;
SET @@GLOBAL.delayed_insert_limit = @global_delayed_insert_limit;
disconnect con0;
disconnect con1;