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:
@@ -132,8 +132,15 @@ DELIMITER /*!*/;
|
||||
#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
|
||||
ROLLBACK/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Gtid list []
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1
|
||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
use `test`/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
@@ -151,6 +158,9 @@ c2 VARCHAR(20)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET latin1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-2
|
||||
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
CREATE TABLE t2 (
|
||||
@@ -159,8 +169,8 @@ c2 VARCHAR(20)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET latin1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-3
|
||||
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
@@ -216,18 +226,24 @@ BEGIN
|
||||
#010909 4:46:40 server id 1 end_log_pos # Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-4
|
||||
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-5
|
||||
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-6
|
||||
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
@@ -252,8 +268,8 @@ SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-7
|
||||
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
@@ -287,8 +303,8 @@ SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-8
|
||||
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
@@ -305,8 +321,8 @@ SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-9
|
||||
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
@@ -362,18 +378,24 @@ BEGIN
|
||||
#010909 4:46:40 server id 1 end_log_pos # Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-10
|
||||
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-11
|
||||
/*!100001 SET @@session.gtid_seq_no=11*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t2
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-12
|
||||
/*!100001 SET @@session.gtid_seq_no=12*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
@@ -398,8 +420,8 @@ SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-13
|
||||
/*!100001 SET @@session.gtid_seq_no=13*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
@@ -433,8 +455,8 @@ SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-14
|
||||
/*!100001 SET @@session.gtid_seq_no=14*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
@@ -451,11 +473,17 @@ SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-15
|
||||
/*!100001 SET @@session.gtid_seq_no=15*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-16
|
||||
/*!100001 SET @@session.gtid_seq_no=16*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t2
|
||||
|
Reference in New Issue
Block a user