summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r/binlog_consistent.result
blob: 47f9900c449196032b1c62b590f84ee76e2f1993 (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
RESET MASTER;
# Connection default
CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb;
SHOW MASTER STATUS;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	486		
SHOW STATUS LIKE 'binlog_snapshot_%';
Variable_name	Value
Binlog_snapshot_file	master-bin.000001
Binlog_snapshot_position	486
BEGIN;
INSERT INTO t1 VALUES (0, "");
# Connection con1
BEGIN;
INSERT INTO t1 VALUES (1, "");
# Connection con2
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam;
BEGIN;
INSERT INTO t1 VALUES (2, "first");
INSERT INTO t2 VALUES (2);
INSERT INTO t1 VALUES (2, "second");
# Connection default
COMMIT;
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
# Connection con3
BEGIN;
INSERT INTO t1 VALUES (3, "");
INSERT INTO t2 VALUES (3);
# Connection con4
BEGIN;
INSERT INTO t1 VALUES (4, "");
COMMIT;
# Connection default
SELECT * FROM t1 ORDER BY a,b;
a	b
0	
SHOW STATUS LIKE 'binlog_snapshot_%';
Variable_name	Value
Binlog_snapshot_file	master-bin.000001
Binlog_snapshot_position	988
SHOW MASTER STATUS;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	1340		
SELECT * FROM t2 ORDER BY a;
a
2
3
# Connection con1
COMMIT;
# Connection con2
COMMIT;
# Connection con3
COMMIT;
FLUSH LOGS;
# Connection default
SELECT * FROM t1 ORDER BY a,b;
a	b
0	
SHOW STATUS LIKE 'binlog_snapshot_%';
Variable_name	Value
Binlog_snapshot_file	master-bin.000001
Binlog_snapshot_position	988
SHOW MASTER STATUS;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000002	367		
COMMIT;
SHOW STATUS LIKE 'binlog_snapshot_%';
Variable_name	Value
Binlog_snapshot_file	master-bin.000002
Binlog_snapshot_position	367
SHOW MASTER STATUS;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000002	367		
SHOW BINLOG EVENTS;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	248	Server ver: #, Binlog ver: #
master-bin.000001	248	Gtid_list	1	273	[]
master-bin.000001	273	Binlog_checkpoint	1	313	master-bin.000001
master-bin.000001	313	Gtid	1	351	GTID 0-1-1
master-bin.000001	351	Query	1	486	use `test`; CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb
master-bin.000001	486	Gtid	1	524	GTID 0-1-2
master-bin.000001	524	Query	1	636	use `test`; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam
master-bin.000001	636	Gtid	1	674	BEGIN GTID 0-1-3
master-bin.000001	674	Query	1	762	use `test`; INSERT INTO t2 VALUES (2)
master-bin.000001	762	Query	1	831	COMMIT
master-bin.000001	831	Gtid	1	869	BEGIN GTID 0-1-4
master-bin.000001	869	Query	1	961	use `test`; INSERT INTO t1 VALUES (0, "")
master-bin.000001	961	Xid	1	988	COMMIT /* XID */
master-bin.000001	988	Gtid	1	1026	BEGIN GTID 0-1-5
master-bin.000001	1026	Query	1	1114	use `test`; INSERT INTO t2 VALUES (3)
master-bin.000001	1114	Query	1	1183	COMMIT
master-bin.000001	1183	Gtid	1	1221	BEGIN GTID 0-1-6
master-bin.000001	1221	Query	1	1313	use `test`; INSERT INTO t1 VALUES (4, "")
master-bin.000001	1313	Xid	1	1340	COMMIT /* XID */
master-bin.000001	1340	Gtid	1	1378	BEGIN GTID 0-1-7
master-bin.000001	1378	Query	1	1470	use `test`; INSERT INTO t1 VALUES (1, "")
master-bin.000001	1470	Xid	1	1497	COMMIT /* XID */
master-bin.000001	1497	Gtid	1	1535	BEGIN GTID 0-1-8
master-bin.000001	1535	Query	1	1632	use `test`; INSERT INTO t1 VALUES (2, "first")
master-bin.000001	1632	Query	1	1730	use `test`; INSERT INTO t1 VALUES (2, "second")
master-bin.000001	1730	Xid	1	1757	COMMIT /* XID */
master-bin.000001	1757	Gtid	1	1795	BEGIN GTID 0-1-9
master-bin.000001	1795	Query	1	1887	use `test`; INSERT INTO t1 VALUES (3, "")
master-bin.000001	1887	Xid	1	1914	COMMIT /* XID */
master-bin.000001	1914	Rotate	1	1958	master-bin.000002;pos=4
*** MDEV-7310: last_commit_pos_offset set to wrong value after binlog rotate in group commit ***
SET @old_size= @@GLOBAL.max_binlog_size;
SET GLOBAL max_binlog_size=4096;
CREATE TABLE t3 (a INT PRIMARY KEY, b VARBINARY(8192)) ENGINE=MyISAM;
INSERT INTO t3 VALUES (10, '');
INSERT INTO t3 VALUES (11, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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