Debian Codegraph @

mysql-test/suite/maria/maria-mvcc.result

raw
1 set global aria_page_checksum=1;
2 drop table if exists t1;
3 connect con1,localhost,root,,;
4 connection con1;
5 create table t1 (i int) engine=aria;
6 show create table t1;
7 Table Create Table
8 t1 CREATE TABLE `t1` (
9 `i` int(11) DEFAULT NULL
10 ) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
11 insert into t1 values (0);
12 lock tables t1 write concurrent;
13 insert into t1 values (1);
14 insert into t1 values (2);
15 /* should see 0, 1 and 2 */
16 select i from t1;
17 i
18 0
19 1
20 2
21 select count(*) from t1;
22 count(*)
23 3
24 connect con2,localhost,root,,;
25 connection con2;
26 /* should see 0 */
27 select i from t1;
28 i
29 0
30 select count(*) from t1;
31 count(*)
32 1
33 lock tables t1 write concurrent;
34 insert into t1 values (3);
35 insert into t1 values (4);
36 /* should see 0, 3 and 4 */
37 select i from t1;
38 i
39 0
40 3
41 4
42 select count(*) from t1;
43 count(*)
44 3
45 unlock tables;
46 lock tables t1 write concurrent;
47 insert into t1 values (5);
48 /* should see 0, 3, 4 and 5 */
49 select i from t1;
50 i
51 0
52 3
53 4
54 5
55 select count(*) from t1;
56 count(*)
57 4
58 connect con3,localhost,root,,;
59 connection con3;
60 lock tables t1 write concurrent;
61 /* should see 0, 3, 4 */
62 select i from t1;
63 i
64 0
65 3
66 4
67 select count(*) from t1;
68 count(*)
69 3
70 connection con1;
71 insert into t1 values (6);
72 /* Should see 0, 1, 2, 6 */
73 select i from t1;
74 i
75 0
76 1
77 2
78 6
79 select count(*) from t1;
80 count(*)
81 4
82 unlock tables;
83 lock tables t1 write concurrent;
84 /* Should see 0, 1, 2, 3, 4 and 6 */
85 select i from t1;
86 i
87 0
88 1
89 2
90 3
91 4
92 6
93 select count(*) from t1;
94 count(*)
95 6
96 connection con2;
97 /* should see 0, 3, 4, 5 */
98 select i from t1;
99 i
100 0
101 3
102 4
103 5
104 select count(*) from t1;
105 count(*)
106 4
107 unlock tables;
108 /* should see 0, 1, 2, 3, 4, 5, 6 */
109 select i from t1;
110 i
111 0
112 1
113 2
114 3
115 4
116 5
117 6
118 select count(*) from t1;
119 count(*)
120 7
121 connection con1;
122 unlock tables;
123 /* should see 0, 1, 2, 3, 4, 5, 6 */
124 select i from t1;
125 i
126 0
127 1
128 2
129 3
130 4
131 5
132 6
133 select count(*) from t1;
134 count(*)
135 7
136 connection con3;
137 insert into t1 values (7);
138 /* should see 0, 3, 4, 7 */
139 select i from t1;
140 i
141 0
142 3
143 4
144 7
145 select count(*) from t1;
146 count(*)
147 4
148 unlock tables;
149 /* should see 0, 1, 2, 3, 4, 5, 6, 7 */
150 select i from t1;
151 i
152 0
153 1
154 2
155 3
156 4
157 5
158 6
159 7
160 select count(*) from t1;
161 count(*)
162 8
163 connection default;
164 drop table t1;
165 CREATE TABLE t1 (fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, g GEOMETRY NOT NULL, SPATIAL KEY(g) ) transactional=1 row_format=page engine=aria;
166 lock tables t1 write concurrent, t1 as t2 write concurrent;
167 insert into t1 (fid,g) values (NULL,GeomFromText('LineString(0 0,1 1)'));
168 select fid from t1 as t2;
169 fid
170 1
171 select count(*) from t1 as t2;
172 count(*)
173 1
174 insert into t1 (fid,g) values (NULL,GeomFromText('LineString(0 0,1 1)'));
175 select fid from t1 as t2;
176 fid
177 1
178 2
179 select count(*) from t1 as t2;
180 count(*)
181 2
182 unlock tables;
183 drop table t1;