~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/r/concurrent_insert_func.result

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists t1;
 
2
## Creating new table ##
 
3
CREATE TABLE t1
 
4
(
 
5
name varchar(30)
 
6
);
 
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');
 
13
## locking table ##
 
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');
 
18
SELECT * from t1;
 
19
name
 
20
Record_1
 
21
Record_2
 
22
Record_3
 
23
Record_4
 
24
## unlocking tables ##
 
25
unlock 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');
 
36
SELECT * from t1;
 
37
name
 
38
Record_1
 
39
Record_3
 
40
Record_4
 
41
Record_5
 
42
SELECT @@concurrent_insert;
 
43
@@concurrent_insert
 
44
2
 
45
## Switching to default connection ##
 
46
## Unlocking table ##
 
47
unlock tables;
 
48
SELECT * from t1;
 
49
name
 
50
Record_1
 
51
Record_3
 
52
Record_4
 
53
Record_5
 
54
## Inserting new row, this should go in the hole ##
 
55
INSERT into t1(name) values('Record_6');
 
56
SELECT * from t1;
 
57
name
 
58
Record_1
 
59
Record_6
 
60
Record_3
 
61
Record_4
 
62
Record_5
 
63
## connection test_con1 ##
 
64
DELETE from t1 where name ='Record_3';
 
65
SELECT * from t1;
 
66
name
 
67
Record_1
 
68
Record_6
 
69
Record_4
 
70
Record_5
 
71
## Dropping table ##
 
72
DROP table t1;
 
73
## Disconnecting connection ##