SET @base_seq = (SELECT CAST(variable_value AS UNSIGNED) FROM performance_schema.global_status WHERE variable_name = 'Lizard_commit_gcn'); SHOW VARIABLES LIKE "gcn_write_event"; Variable_name Value gcn_write_event ON SHOW STATUS LIKE "%gcn%"; Variable_name Value Lizard_commit_gcn 1024 Lizard_snapshot_gcn 1024 Lizard_purged_gcn 1024 Lizard_buffer_pool_txn_lookup_gcn_read_sees 0 create database mydb; use mydb; create table t1 (a int, b int, primary key(a)); set innodb_snapshot_seq = @base_seq +10000; select * from t1; a b insert into t1 values (0,0); xa begin 'x1'; insert into t1 values (1,1); xa end 'x1'; xa commit 'x1' one phase; xa begin 'x2'; insert into t1 values (2,2); xa end 'x2'; xa prepare 'x2'; set innodb_commit_seq = 10001; xa commit 'x2'; alter table t1 engine='innodb'; show binlog events in 'binlog.000001' from 1857 limit 6; Log_name Pos Event_type Server_id End_log_pos Info binlog.000001 1857 Gcn 1 32 # binlog.000001 1889 Anonymous_Gtid 1 111 # binlog.000001 1968 Query 1 186 # binlog.000001 2043 Table_map 1 235 # binlog.000001 2092 Write_rows 1 279 # binlog.000001 2136 Xid 1 310 # show binlog events in 'binlog.000001' from 3453 limit 3; Log_name Pos Event_type Server_id End_log_pos Info binlog.000001 3453 Gcn 1 32 # binlog.000001 3485 Anonymous_Gtid 1 109 # binlog.000001 3562 Query 1 227 # delete from t1; flush logs; # restart: --gcn_write_event=false SET @base_seq = (SELECT CAST(variable_value AS UNSIGNED) FROM performance_schema.global_status WHERE variable_name = 'Lizard_commit_gcn'); set innodb_snapshot_seq = @base_seq +20000; select * from t1; a b insert into t1 values (20,20); xa begin 'x1'; insert into t1 values (21,21); xa end 'x1'; xa commit 'x1' one phase; xa begin 'x2'; insert into t1 values (22,22); xa end 'x2'; xa prepare 'x2'; set innodb_commit_seq = @base_seq +20001; xa commit 'x2'; alter table t1 engine='innodb'; show binlog events in 'binlog.000002' from 393 limit 5; Log_name Pos Event_type Server_id End_log_pos Info binlog.000002 393 Anonymous_Gtid 1 79 # binlog.000002 472 Query 1 154 # binlog.000002 547 Table_map 1 203 # binlog.000002 596 Write_rows 1 247 # binlog.000002 640 Xid 1 278 # show binlog events in 'binlog.000002' from 1861 limit 2; Log_name Pos Event_type Server_id End_log_pos Info binlog.000002 1861 Anonymous_Gtid 1 77 # binlog.000002 1938 Query 1 195 # # restart: drop database mydb;