summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/maria/rollback.result
blob: 2e58387ce57e47feb844c1fc578f24c1ce138c58 (plain)
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
reset master;
call mtr.add_suppression("Table was marked as crashed");
call mtr.add_suppression("Checking table: .*");
create table t1 (a int primary key auto_increment, b int) engine=aria transactional= 1;
create table t2 (a int primary key auto_increment, b int) engine=aria transactional= 0;
create sequence s1 cache=2 engine=aria;
insert into t1 (b) values (1),(2),(3),(4);
insert into t2 (b) values (1),(2),(3),(4);
select NEXT VALUE for s1,seq from seq_1_to_4;
NEXT VALUE for s1	seq
1	1
2	2
3	3
4	4
begin;
insert into t1 (b) values (5),(6);
insert into t1 (b) values (7),(8);
insert into t2 (b) values (5),(6);
insert into t2 (b) values (7),(8);
commit;
begin;
insert into t1 (b) values (10),(11),(12);
update t1 set b=100 where a=2;
delete from t1 where a between 3 and 4;
insert into t2 (b) values (10),(11),(12);
update t2 set b=100 where a=2;
delete from t2 where a between 3 and 4;
select NEXT VALUE for s1,seq from seq_1_to_4;
NEXT VALUE for s1	seq
5	1
6	2
7	3
8	4
# Kill and restart
select * from t1 order by a;
a	b
1	1
2	100
5	5
6	6
7	7
8	8
9	10
10	11
11	12
select * from t2 order by a;
a	b
1	1
2	100
5	5
6	6
7	7
8	8
9	10
10	11
11	12
Warnings:
Error	145	Got error '145 "Table was marked as crashed and should be repaired"' for './test/t2'
Warning	1034	1 client is using or hasn't closed the table properly
Note	1034	Table is fixed
insert into t1 (b) values (100),(200);
insert into t2 (b) values (100),(200);
select * from t1 order by a;
a	b
1	1
2	100
5	5
6	6
7	7
8	8
9	10
10	11
11	12
12	100
13	200
select * from t2 order by a;
a	b
1	1
2	100
5	5
6	6
7	7
8	8
9	10
10	11
11	12
12	100
13	200
select NEXT VALUE for s1,seq from seq_1_to_4;
NEXT VALUE for s1	seq
9	1
10	2
11	3
12	4
Warnings:
Error	145	Got error '145 "Table was marked as crashed and should be repaired"' for './test/s1'
Warning	1034	1 client is using or hasn't closed the table properly
Note	1034	Table is fixed
drop table t1,t2;
drop sequence s1;
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Table was marked as crashed' COLLATE 'latin1_swedish_ci'))
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Checking table: .*' COLLATE 'latin1_swedish_ci'))
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int primary key auto_increment, b int) engine=aria transactional= 1
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t2 (a int primary key auto_increment, b int) engine=aria transactional= 0
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create sequence s1 cache=2 engine=aria
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=1
master-bin.000001	#	Query	#	#	use `test`; insert into t1 (b) values (1),(2),(3),(4)
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=1
master-bin.000001	#	Query	#	#	use `test`; insert into t2 (b) values (1),(2),(3),(4)
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Annotate_rows	#	#	select NEXT VALUE for s1,seq from seq_1_to_4
master-bin.000001	#	Table_map	#	#	table_id: # (test.s1)
master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=5
master-bin.000001	#	Query	#	#	use `test`; insert into t1 (b) values (5),(6)
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=7
master-bin.000001	#	Query	#	#	use `test`; insert into t1 (b) values (7),(8)
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=5
master-bin.000001	#	Query	#	#	use `test`; insert into t2 (b) values (5),(6)
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=7
master-bin.000001	#	Query	#	#	use `test`; insert into t2 (b) values (7),(8)
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=9
master-bin.000001	#	Query	#	#	use `test`; insert into t1 (b) values (10),(11),(12)
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; update t1 set b=100 where a=2
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; delete from t1 where a between 3 and 4
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Intvar	#	#	INSERT_ID=9
master-bin.000001	#	Query	#	#	use `test`; insert into t2 (b) values (10),(11),(12)
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; update t2 set b=100 where a=2
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; delete from t2 where a between 3 and 4
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Annotate_rows	#	#	select NEXT VALUE for s1,seq from seq_1_to_4
master-bin.000001	#	Table_map	#	#	table_id: # (test.s1)
master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	#	#	COMMIT
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000002	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000002	#	Intvar	#	#	INSERT_ID=12
master-bin.000002	#	Query	#	#	use `test`; insert into t1 (b) values (100),(200)
master-bin.000002	#	Query	#	#	COMMIT
master-bin.000002	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000002	#	Intvar	#	#	INSERT_ID=12
master-bin.000002	#	Query	#	#	use `test`; insert into t2 (b) values (100),(200)
master-bin.000002	#	Query	#	#	COMMIT
master-bin.000002	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000002	#	Annotate_rows	#	#	select NEXT VALUE for s1,seq from seq_1_to_4
master-bin.000002	#	Table_map	#	#	table_id: # (test.s1)
master-bin.000002	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
master-bin.000002	#	Query	#	#	COMMIT
master-bin.000002	#	Gtid	#	#	GTID #-#-#
master-bin.000002	#	Query	#	#	use `test`; DROP TABLE `t1`,`t2` /* generated by server */
master-bin.000002	#	Gtid	#	#	GTID #-#-#
master-bin.000002	#	Query	#	#	use `test`; DROP SEQUENCE `s1` /* generated by server */