summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-04-15 10:55:27 +0200
committerunknown <knielsen@knielsen-hq.org>2013-04-15 10:55:27 +0200
commit665a31af2b7d0ecd66d5e54ed0544b5db3892732 (patch)
treed19eae18ae9ffff6e7b3d30b16cf7671c511700f /sql/sql_class.h
parent491047a24714be57409e42656057e56f99c65513 (diff)
parente5cbefeb899f6325fc99277c515a91f0843cdcd5 (diff)
downloadmariadb-git-665a31af2b7d0ecd66d5e54ed0544b5db3892732.tar.gz
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.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 9e550da4449..03dcdf482e5 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -534,12 +534,19 @@ 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.