mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-7850: Extend GTID Binlog Events with Thread Id
This patch augments Gtid_log_event with the user thread-id. In particular that compensates for the loss of this info in Rows_log_events. Gtid_log_event::thread_id gets visible in mysqlbinlog output like #231025 16:21:45 server id 1 end_log_pos 537 CRC32 0x1cf1d963 GTID 0-1-2 ddl thread_id=10 as 64 bit unsigned integer. While the size of Gtid event has grown by 8-9 bytes replication from OLD <-> NEW is not affected by it. This work was started by the late Sujatha Sivakumar. Brandon Nesterenko took it over, reviewed initial patches and extended the work. Reviewed-by: <andrei.elkin@mariadb.com>
This commit is contained in:
@@ -19,7 +19,7 @@ CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb;
|
||||
# MDEV-515 takes X-lock on the table for the first insert.
|
||||
# So concurrent insert won't happen on the table
|
||||
INSERT INTO t1 VALUES(9, "");
|
||||
let pos=`select $binlog_start_pos + 431`;
|
||||
let pos=`select $binlog_start_pos + 437`;
|
||||
--replace_result $pos <pos>
|
||||
SHOW MASTER STATUS;
|
||||
--replace_result $pos <pos>
|
||||
@@ -56,10 +56,10 @@ COMMIT;
|
||||
|
||||
connection default;
|
||||
SELECT * FROM t1 ORDER BY a,b;
|
||||
let pos=`select $binlog_start_pos + 974`;
|
||||
let pos=`select $binlog_start_pos + 989`;
|
||||
--replace_result $pos <pos>
|
||||
SHOW STATUS LIKE 'binlog_snapshot_%';
|
||||
let pos=`select $binlog_start_pos + 1350`;
|
||||
let pos=`select $binlog_start_pos + 1371`;
|
||||
--replace_result $pos <pos>
|
||||
SHOW MASTER STATUS;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
@@ -77,7 +77,7 @@ FLUSH LOGS;
|
||||
|
||||
connection default;
|
||||
SELECT * FROM t1 ORDER BY a,b;
|
||||
let pos=`select $binlog_start_pos + 974`;
|
||||
let pos=`select $binlog_start_pos + 989`;
|
||||
--replace_result $pos <pos>
|
||||
SHOW STATUS LIKE 'binlog_snapshot_%';
|
||||
let pos=`select $binlog_start_pos + 131`;
|
||||
|
Reference in New Issue
Block a user