1RESET MASTER; 2connect con1,localhost,root,,; 3connect con2,localhost,root,,; 4connect con3,localhost,root,,; 5connect con4,localhost,root,,; 6connection default; 7CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb; 8SHOW MASTER STATUS; 9File Position Binlog_Do_DB Binlog_Ignore_DB 10master-bin.000001 <pos> 11SHOW STATUS LIKE 'binlog_snapshot_%'; 12Variable_name Value 13Binlog_snapshot_file master-bin.000001 14Binlog_snapshot_position <pos> 15BEGIN; 16INSERT INTO t1 VALUES (0, ""); 17connection con1; 18BEGIN; 19INSERT INTO t1 VALUES (1, ""); 20connection con2; 21CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam; 22BEGIN; 23INSERT INTO t1 VALUES (2, "first"); 24INSERT INTO t2 VALUES (2); 25INSERT INTO t1 VALUES (2, "second"); 26connection default; 27COMMIT; 28SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; 29START TRANSACTION WITH CONSISTENT SNAPSHOT; 30connection con3; 31BEGIN; 32INSERT INTO t1 VALUES (3, ""); 33INSERT INTO t2 VALUES (3); 34connection con4; 35BEGIN; 36INSERT INTO t1 VALUES (4, ""); 37COMMIT; 38connection default; 39SELECT * FROM t1 ORDER BY a,b; 40a b 410 42SHOW STATUS LIKE 'binlog_snapshot_%'; 43Variable_name Value 44Binlog_snapshot_file master-bin.000001 45Binlog_snapshot_position <pos> 46SHOW MASTER STATUS; 47File Position Binlog_Do_DB Binlog_Ignore_DB 48master-bin.000001 <pos> 49SELECT * FROM t2 ORDER BY a; 50a 512 523 53connection con1; 54COMMIT; 55connection con2; 56COMMIT; 57connection con3; 58COMMIT; 59FLUSH LOGS; 60connection default; 61SELECT * FROM t1 ORDER BY a,b; 62a b 630 64SHOW STATUS LIKE 'binlog_snapshot_%'; 65Variable_name Value 66Binlog_snapshot_file master-bin.000001 67Binlog_snapshot_position <pos> 68SHOW MASTER STATUS; 69File Position Binlog_Do_DB Binlog_Ignore_DB 70master-bin.000002 <pos> 71COMMIT; 72SHOW STATUS LIKE 'binlog_snapshot_%'; 73Variable_name Value 74Binlog_snapshot_file master-bin.000002 75Binlog_snapshot_position <pos> 76SHOW MASTER STATUS; 77File Position Binlog_Do_DB Binlog_Ignore_DB 78master-bin.000002 <pos> 79include/show_binlog_events.inc 80Log_name Pos Event_type Server_id End_log_pos Info 81master-bin.000001 # Gtid # # GTID #-#-# 82master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb 83master-bin.000001 # Gtid # # GTID #-#-# 84master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam 85master-bin.000001 # Gtid # # BEGIN GTID #-#-# 86master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (2) 87master-bin.000001 # Query # # COMMIT 88master-bin.000001 # Gtid # # BEGIN GTID #-#-# 89master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (0, "") 90master-bin.000001 # Xid # # COMMIT /* XID */ 91master-bin.000001 # Gtid # # BEGIN GTID #-#-# 92master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (3) 93master-bin.000001 # Query # # COMMIT 94master-bin.000001 # Gtid # # BEGIN GTID #-#-# 95master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4, "") 96master-bin.000001 # Xid # # COMMIT /* XID */ 97master-bin.000001 # Gtid # # BEGIN GTID #-#-# 98master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1, "") 99master-bin.000001 # Xid # # COMMIT /* XID */ 100master-bin.000001 # Gtid # # BEGIN GTID #-#-# 101master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2, "first") 102master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2, "second") 103master-bin.000001 # Xid # # COMMIT /* XID */ 104master-bin.000001 # Gtid # # BEGIN GTID #-#-# 105master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3, "") 106master-bin.000001 # Xid # # COMMIT /* XID */ 107master-bin.000001 # Rotate # # master-bin.000002;pos=POS 108*** MDEV-7310: last_commit_pos_offset set to wrong value after binlog rotate in group commit *** 109SET @old_size= @@GLOBAL.max_binlog_size; 110SET GLOBAL max_binlog_size=4096; 111CREATE TABLE t3 (a INT PRIMARY KEY, b VARBINARY(8192)) ENGINE=MyISAM; 112INSERT INTO t3 VALUES (10, ''); 113INSERT INTO t3 VALUES (11, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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