1
drop table if exists t1;
2
## Creating new table ##
7
'#--------------------FN_DYNVARS_018_01-------------------------#'
8
## Setting initial value of variable to 1 ##
9
SET @@global.concurrent_insert = 1;
10
INSERT into t1(name) values('Record_1');
11
INSERT into t1(name) values('Record_2');
12
INSERT into t1(name) values('Record_3');
14
lock table t1 read local;
15
## Creating new connection to insert some rows in table ##
16
## New records should come at the end of all rows ##
17
INSERT into t1(name) values('Record_4');
24
## unlocking tables ##
26
## deleting record to create hole in table ##
27
DELETE from t1 where name ='Record_2';
28
'#--------------------FN_DYNVARS_018_02-------------------------#'
29
'#--------------------FN_DYNVARS_018_03-------------------------#'
30
## lock table and connect with connection1 ##
31
lock table t1 read local;
32
## setting value of concurrent_insert to 2 ##
33
SET @@global.concurrent_insert=2;
34
## Inserting record in table, record should go at the end of the table ##
35
INSERT into t1(name) values('Record_5');
42
SELECT @@concurrent_insert;
45
## Switching to default connection ##
54
## Inserting new row, this should go in the hole ##
55
INSERT into t1(name) values('Record_6');
63
## connection test_con1 ##
64
DELETE from t1 where name ='Record_3';
73
## Disconnecting connection ##