mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +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:
@ -534,11 +534,18 @@ typedef struct system_variables
|
||||
ulong tx_isolation;
|
||||
ulong updatable_views_with_limit;
|
||||
int max_user_connections;
|
||||
ulong server_id;
|
||||
/**
|
||||
In slave thread we need to know in behalf of which
|
||||
thread the query is being run to replicate temp tables properly
|
||||
*/
|
||||
my_thread_id pseudo_thread_id;
|
||||
/**
|
||||
When replicating an event group with GTID, keep these values around so
|
||||
slave binlog can receive the same GTID as the original.
|
||||
*/
|
||||
uint32 gtid_domain_id;
|
||||
uint64 gtid_seq_no;
|
||||
/**
|
||||
Place holders to store Multi-source variables in sys_var.cc during
|
||||
update and show of variables.
|
||||
@ -1701,7 +1708,6 @@ public:
|
||||
first byte of the packet in do_command()
|
||||
*/
|
||||
enum enum_server_command command;
|
||||
uint32 server_id;
|
||||
uint32 file_id; // for LOAD DATA INFILE
|
||||
/* remote (peer) port */
|
||||
uint16 peer_port;
|
||||
@ -1778,7 +1784,7 @@ public:
|
||||
MY_BITMAP const* cols, size_t colcnt,
|
||||
const uchar *old_data, const uchar *new_data);
|
||||
|
||||
void set_server_id(uint32 sid) { server_id = sid; }
|
||||
void set_server_id(uint32 sid) { variables.server_id = sid; }
|
||||
|
||||
/*
|
||||
Member functions to handle pending event for row-level logging.
|
||||
|
Reference in New Issue
Block a user