mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			187 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			187 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
** Setup **
 | 
						|
 | 
						|
Creating connection con0
 | 
						|
Creating connection con1
 | 
						|
SET @global_delayed_insert_limit = @@GLOBAL.delayed_insert_limit;
 | 
						|
CREATE TABLE t1 (a varchar(100));
 | 
						|
'#--------------------FN_DYNVARS_25_01-------------------------#'
 | 
						|
SET GLOBAL delayed_insert_limit = 9;
 | 
						|
** Connection con0 **
 | 
						|
SET GLOBAL delayed_insert_limit = 9;
 | 
						|
** Connection con1 **
 | 
						|
SET GLOBAL delayed_insert_limit = 9;
 | 
						|
** Connection default **
 | 
						|
SET GLOBAL delayed_insert_limit = 9;
 | 
						|
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 t1 WRITE;
 | 
						|
** Connection con1 **
 | 
						|
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 **
 | 
						|
SELECT * FROM t1;|
 | 
						|
** Connection default **
 | 
						|
Waiting for 1 sec
 | 
						|
UNLOCK TABLES;
 | 
						|
** Connection con0 **
 | 
						|
a
 | 
						|
1
 | 
						|
2
 | 
						|
3
 | 
						|
4
 | 
						|
5
 | 
						|
6
 | 
						|
7
 | 
						|
8
 | 
						|
9
 | 
						|
10
 | 
						|
11
 | 
						|
12
 | 
						|
13
 | 
						|
14
 | 
						|
15
 | 
						|
16
 | 
						|
'Bug#35386: insert delayed inserts 1 + limit rows instead of just limit rows'
 | 
						|
** Connection default **
 | 
						|
Waiting for 1 sec
 | 
						|
Checking if the delayed insert continued afterwards
 | 
						|
SELECT * FROM t1;
 | 
						|
a
 | 
						|
1
 | 
						|
2
 | 
						|
3
 | 
						|
4
 | 
						|
5
 | 
						|
6
 | 
						|
7
 | 
						|
8
 | 
						|
9
 | 
						|
10
 | 
						|
11
 | 
						|
12
 | 
						|
13
 | 
						|
14
 | 
						|
15
 | 
						|
16
 | 
						|
17
 | 
						|
18
 | 
						|
19
 | 
						|
20
 | 
						|
21
 | 
						|
22
 | 
						|
DELETE FROM t1;
 | 
						|
'#--------------------FN_DYNVARS_25_02-------------------------#'
 | 
						|
SET GLOBAL delayed_insert_limit = 20;
 | 
						|
** Connection con0 **
 | 
						|
SET GLOBAL delayed_insert_limit = 20;
 | 
						|
** Connection con1 **
 | 
						|
SET GLOBAL delayed_insert_limit = 20;
 | 
						|
** Connection default **
 | 
						|
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 t1 WRITE;
 | 
						|
** 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 * FROM t1;|
 | 
						|
** Connection default **
 | 
						|
Waiting for 1 sec
 | 
						|
UNLOCK TABLES;
 | 
						|
** Connection con0 **
 | 
						|
Asynchronous execute result
 | 
						|
a
 | 
						|
1
 | 
						|
2
 | 
						|
3
 | 
						|
4
 | 
						|
5
 | 
						|
6
 | 
						|
7
 | 
						|
8
 | 
						|
9
 | 
						|
10
 | 
						|
11
 | 
						|
12
 | 
						|
13
 | 
						|
14
 | 
						|
15
 | 
						|
16
 | 
						|
17
 | 
						|
18
 | 
						|
19
 | 
						|
20
 | 
						|
21
 | 
						|
22
 | 
						|
** Connection default**
 | 
						|
Waiting for 1 sec
 | 
						|
Checking if the delayed insert gives the same result afterwards
 | 
						|
SELECT * FROM t1;
 | 
						|
a
 | 
						|
1
 | 
						|
2
 | 
						|
3
 | 
						|
4
 | 
						|
5
 | 
						|
6
 | 
						|
7
 | 
						|
8
 | 
						|
9
 | 
						|
10
 | 
						|
11
 | 
						|
12
 | 
						|
13
 | 
						|
14
 | 
						|
15
 | 
						|
16
 | 
						|
17
 | 
						|
18
 | 
						|
19
 | 
						|
20
 | 
						|
21
 | 
						|
22
 | 
						|
DELETE FROM t1;
 | 
						|
Switching to default
 | 
						|
Disconnecting from con1, con0
 | 
						|
DROP TABLE t1;
 | 
						|
SET @@GLOBAL.delayed_insert_limit = @global_delayed_insert_limit;
 |