mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-26: Global transaction ID. First alpha release.
Merge of 10.0-mdev26 feature tree into 10.0-base. Global transaction ID is prepended to each event group in the binlog. Slave connect can request to start from GTID position instead of specifying file name/offset of master binlog. This facilitates easy switch to a new master. Slave GTID state is stored in a table mysql.rpl_slave_state, which can be InnoDB to get crash-safe slave state. GTID includes a replication domain ID, allowing to keep track of distinct positions for each of multiple masters.
This commit is contained in:
@@ -20,6 +20,7 @@ master-bin.000004 #
|
||||
show binlog events in 'master-bin.00000<binlog_start>' from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.00000<binlog_start> # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.00000<binlog_start> # Gtid_list # # [#-#-#]
|
||||
master-bin.00000<binlog_start> # Binlog_checkpoint # # master-bin.000001
|
||||
SET DEBUG_SYNC= "execute_command_after_close_tables SIGNAL reset_master_done";
|
||||
RESET MASTER;
|
||||
@@ -34,6 +35,7 @@ master-bin.000001 #
|
||||
show binlog events in 'master-bin.000001' from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.000001 # Gtid_list # # []
|
||||
master-bin.000001 # Binlog_checkpoint # # master-bin.000001
|
||||
*** Test that binlog N is active, and commit checkpoint for (N-1) is
|
||||
*** done while there is still a pending commit checkpoint for (N-2).
|
||||
@@ -51,8 +53,9 @@ master-bin.000003 #
|
||||
show binlog events in 'master-bin.000001' from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.000001 # Gtid_list # # []
|
||||
master-bin.000001 # Binlog_checkpoint # # master-bin.000001
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
@@ -60,8 +63,9 @@ master-bin.000001 # Rotate # # master-bin.000002;pos=<binlog_start>
|
||||
show binlog events in 'master-bin.000002' from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.000002 # Gtid_list # # [#-#-#]
|
||||
master-bin.000002 # Binlog_checkpoint # # master-bin.000001
|
||||
master-bin.000002 # Query # # BEGIN
|
||||
master-bin.000002 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000002 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000002 # Xid # # COMMIT /* XID */
|
||||
@@ -69,6 +73,7 @@ master-bin.000002 # Rotate # # master-bin.000003;pos=<binlog_start>
|
||||
show binlog events in 'master-bin.000003' from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.000003 # Gtid_list # # [#-#-#]
|
||||
master-bin.000003 # Binlog_checkpoint # # master-bin.000001
|
||||
SET DEBUG_SYNC= "RESET";
|
||||
SET @old_dbug= @@global.DEBUG_DBUG;
|
||||
@@ -81,12 +86,14 @@ SET DEBUG_SYNC= "RESET";
|
||||
show binlog events in 'master-bin.000003' from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.000003 # Gtid_list # # [#-#-#]
|
||||
master-bin.000003 # Binlog_checkpoint # # master-bin.000001
|
||||
SET DEBUG_SYNC= "now SIGNAL con1_continue";
|
||||
No commit checkpoints are pending, a new binlog checkpoint should have been logged.
|
||||
show binlog events in 'master-bin.000003' from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.000003 # Gtid_list # # [#-#-#]
|
||||
master-bin.000003 # Binlog_checkpoint # # master-bin.000001
|
||||
master-bin.000003 # Binlog_checkpoint # # master-bin.000003
|
||||
*** MDEV-4322: Broken XID counting during binlog rotation ***
|
||||
|
Reference in New Issue
Block a user