1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +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:
Brandon Nesterenko
2023-07-10 18:53:19 +03:00
parent 8bf9f21855
commit c37b2087b4
34 changed files with 1006 additions and 785 deletions

View File

@@ -430,7 +430,9 @@ START SLAVE IO_THREAD;
--let $pos_until= 3130
--let $file_rl= slave-relay-bin.000018
--let $pos_gtid = 2987
# Todo: change to compute the explicit postion as it may may further change
# with events evolution.
--let $pos_gtid = 2993
--let $info= query_get_value(SHOW RELAYLOG EVENTS IN '$file_rl' FROM $pos_gtid LIMIT 1, Info, 1)
if (`SELECT "$info" != "BEGIN GTID 0-1-23"`)
@@ -438,7 +440,8 @@ if (`SELECT "$info" != "BEGIN GTID 0-1-23"`)
--echo *** Unexpected offset. Refine it to point to the correct GTID!
--die
}
--let $pos_event = 3120
# Todo: ditto
--let $pos_event = 3129
--let $type= query_get_value(SHOW RELAYLOG EVENTS IN '$file_rl' FROM $pos_event LIMIT 1, Event_type, 1)
if (`SELECT "$type" != "Delete_rows_v1"`)
{