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
|
#---------------------------
# ten threads inserting simultaneously with increment > 1
# Issue #390
#---------------------------
CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY, thr INT) ENGINE=rocksdb;
connect con$i, localhost, root,,;
SET auto_increment_increment = 100;
SET auto_increment_offset = 9 + 1;
connect con$i, localhost, root,,;
SET auto_increment_increment = 100;
SET auto_increment_offset = 8 + 1;
connect con$i, localhost, root,,;
SET auto_increment_increment = 100;
SET auto_increment_offset = 7 + 1;
connect con$i, localhost, root,,;
SET auto_increment_increment = 100;
SET auto_increment_offset = 6 + 1;
connect con$i, localhost, root,,;
SET auto_increment_increment = 100;
SET auto_increment_offset = 5 + 1;
connect con$i, localhost, root,,;
SET auto_increment_increment = 100;
SET auto_increment_offset = 4 + 1;
connect con$i, localhost, root,,;
SET auto_increment_increment = 100;
SET auto_increment_offset = 3 + 1;
connect con$i, localhost, root,,;
SET auto_increment_increment = 100;
SET auto_increment_offset = 2 + 1;
connect con$i, localhost, root,,;
SET auto_increment_increment = 100;
SET auto_increment_offset = 1 + 1;
connect con$i, localhost, root,,;
SET auto_increment_increment = 100;
SET auto_increment_offset = 0 + 1;
connection default;
connection con9;
LOAD DATA INFILE <input_file> INTO TABLE t1;
connection con8;
LOAD DATA INFILE <input_file> INTO TABLE t1;
connection con7;
LOAD DATA INFILE <input_file> INTO TABLE t1;
connection con6;
LOAD DATA INFILE <input_file> INTO TABLE t1;
connection con5;
LOAD DATA INFILE <input_file> INTO TABLE t1;
connection con4;
LOAD DATA INFILE <input_file> INTO TABLE t1;
connection con3;
LOAD DATA INFILE <input_file> INTO TABLE t1;
connection con2;
LOAD DATA INFILE <input_file> INTO TABLE t1;
connection con1;
LOAD DATA INFILE <input_file> INTO TABLE t1;
connection con0;
LOAD DATA INFILE <input_file> INTO TABLE t1;
connection default;
connection con9;
connection con8;
connection con7;
connection con6;
connection con5;
connection con4;
connection con3;
connection con2;
connection con1;
connection con0;
connection default;
SELECT COUNT(*) FROM t1;
COUNT(*)
1000000
SELECT thr, COUNT(pk) FROM t1 GROUP BY thr;
thr COUNT(pk)
0 100000
1 100000
2 100000
3 100000
4 100000
5 100000
6 100000
7 100000
8 100000
9 100000
disconnect con9;
disconnect con8;
disconnect con7;
disconnect con6;
disconnect con5;
disconnect con4;
disconnect con3;
disconnect con2;
disconnect con1;
disconnect con0;
SELECT * FROM t1 ORDER BY pk INTO OUTFILE <output_file>;
Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
All pk values matched their expected values
DROP TABLE t1;
|