1
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
2
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
3
INSERT INTO t2 VALUES (1),(2),(3);
4
**** Truncate of empty table shall be logged
7
show binlog events from <binlog_start>;
8
Log_name Pos Event_type Server_id End_log_pos Info
9
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
10
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
12
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
13
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
14
INSERT INTO t2 VALUES (1),(2),(3);
15
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
16
**** Truncate of empty table shall be logged
18
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
20
show binlog events from <binlog_start>;
21
Log_name Pos Event_type Server_id End_log_pos Info
22
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
23
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
25
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
26
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
27
INSERT INTO t2 VALUES (1),(2),(3);
28
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
29
**** Truncate of empty table shall be logged
31
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
33
show binlog events from <binlog_start>;
34
Log_name Pos Event_type Server_id End_log_pos Info
35
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
36
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
38
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
39
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
40
INSERT INTO t2 VALUES (1),(2),(3);
41
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
42
**** Truncate of empty table shall be logged
44
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
46
show binlog events from <binlog_start>;
47
Log_name Pos Event_type Server_id End_log_pos Info
48
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
49
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
51
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
52
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
53
INSERT INTO t2 VALUES (1),(2),(3);
54
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
55
**** Truncate of empty table shall be logged
57
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
59
show binlog events from <binlog_start>;
60
Log_name Pos Event_type Server_id End_log_pos Info
61
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
62
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2