1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-4989: Support for GTID in mysqlbinlog

This patch fixes two issues:

First, it fixes test failure due to GTID List events
having inconsistent ordering of domain ids. In
particular, this patch ensures that a GTID list log
event will have its GTIDs ordered by domain id
(ascending) followed by sequence number (ascending).

Second, it fixes an assert which could use an
unintialized variable.

Reviewed By:
============
Andrei Elkin <andrei.elkin@mariadb.com>
This commit is contained in:
Brandon Nesterenko
2022-01-30 15:32:56 -07:00
parent 0c5d1342ae
commit a64991df9d
10 changed files with 109 additions and 8 deletions

View File

@@ -0,0 +1,19 @@
RESET MASTER;
SET @@session.gtid_domain_id= 0;
SET @@session.server_id= 1;
CREATE TABLE t1 (a int);
SET @@session.gtid_domain_id= 1;
SET @@session.server_id= 2;
CREATE TABLE t2 (a int);
SET @@session.server_id= 1;
INSERT INTO t2 VALUES (1);
SET @@session.gtid_domain_id= 2;
SET @@session.server_id= 3;
CREATE TABLE t3 (a int);
FLUSH LOGS;
FLUSH LOGS;
# MYSQL_BINLOG MYSQLD_DATADIR/binlog_file > SEARCH_FILE
FOUND 1 /Gtid list \[0-1-1,\n# 1-2-1,\n# 1-1-2,\n# 2-3-1\]/ in tmp_binlog.out
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;