1
CREATE TABLE t1(a CHAR(255),
6
PRIMARY KEY(id)) ENGINE=InnoDB;
7
create table t2 like t1;
8
create procedure setcrash(IN i INT)
11
WHEN 1 THEN SET SESSION debug_dbug="d,crash_commit_after_prepare";
12
WHEN 2 THEN SET SESSION debug_dbug="d,crash_commit_after_log";
13
WHEN 3 THEN SET SESSION debug_dbug="d,crash_commit_before_unlog";
14
WHEN 4 THEN SET SESSION debug_dbug="d,crash_commit_after";
15
WHEN 5 THEN SET SESSION debug_dbug="d,crash_commit_before";
20
INSERT INTO t2(a, b, c, d, id) VALUES ('a', 'b', 'c', 'd', 9+1);
21
INSERT INTO t2(a, b, c, d, id) VALUES ('a', 'b', 'c', 'd', 8+1);
22
INSERT INTO t2(a, b, c, d, id) VALUES ('a', 'b', 'c', 'd', 7+1);
23
INSERT INTO t2(a, b, c, d, id) VALUES ('a', 'b', 'c', 'd', 6+1);
24
INSERT INTO t2(a, b, c, d, id) VALUES ('a', 'b', 'c', 'd', 5+1);
25
INSERT INTO t2(a, b, c, d, id) VALUES ('a', 'b', 'c', 'd', 4+1);
26
INSERT INTO t2(a, b, c, d, id) VALUES ('a', 'b', 'c', 'd', 3+1);
27
INSERT INTO t2(a, b, c, d, id) VALUES ('a', 'b', 'c', 'd', 2+1);
28
INSERT INTO t2(a, b, c, d, id) VALUES ('a', 'b', 'c', 'd', 1+1);
29
INSERT INTO t2(a, b, c, d, id) VALUES ('a', 'b', 'c', 'd', 0+1);
30
SET binlog_format= mixed;
33
insert into t1 select * from t2;
36
Got one of the listed errors
37
SELECT * FROM t1 ORDER BY id;
39
SHOW BINLOG EVENTS LIMIT 2,1;
40
Log_name Pos Event_type Server_id End_log_pos Info
42
SET binlog_format= mixed;
45
insert into t1 select * from t2;
48
Got one of the listed errors
49
SELECT * FROM t1 ORDER BY id;
61
SHOW BINLOG EVENTS LIMIT 2,1;
62
Log_name Pos Event_type Server_id End_log_pos Info
63
master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t2
65
SET binlog_format= mixed;
68
insert into t1 select * from t2;
71
Got one of the listed errors
72
SELECT * FROM t1 ORDER BY id;
84
SHOW BINLOG EVENTS LIMIT 2,1;
85
Log_name Pos Event_type Server_id End_log_pos Info
86
master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t2
88
SET binlog_format= mixed;
91
insert into t1 select * from t2;
94
Got one of the listed errors
95
SELECT * FROM t1 ORDER BY id;
107
SHOW BINLOG EVENTS LIMIT 2,1;
108
Log_name Pos Event_type Server_id End_log_pos Info
109
master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t2
111
SET binlog_format= mixed;
114
insert into t1 select * from t2;
117
Got one of the listed errors
118
SELECT * FROM t1 ORDER BY id;
120
SHOW BINLOG EVENTS LIMIT 2,1;
121
Log_name Pos Event_type Server_id End_log_pos Info
125
DROP PROCEDURE setcrash;