[MDEV-14338] BINLOG_GTID_POS() is empty on fresh database Created: 2017-11-09  Updated: 2017-11-09  Resolved: 2017-11-09

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.2.10
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Oli Sennhauser Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

If I want to set-up a MariaDB Master/Master GTID based Replication from a fresh created empty instance this is not possible because BINLOG_GTID_POS() return empty set.
I have to add data to the database to get my first GTID!
This is especially evil on a DBaaS platform where you want to provide an empty M/M set-up...

reset master;
show master status;
------------------------------------------------------+

File Position Binlog_Do_DB Binlog_Ignore_DB

------------------------------------------------------+

binlog-m1.000001 328    

------------------------------------------------------+
select BINLOG_GTID_POS("binlog-m1.000001", 328);
------------------------------------------

BINLOG_GTID_POS("binlog-m1.000001", 328)

------------------------------------------

 

------------------------------------------
show global variables like 'gtid%';
-----------------------------+

Variable_name Value

-----------------------------+

gtid_binlog_pos  
gtid_binlog_state  
gtid_current_pos 2-2-1
gtid_domain_id 1
gtid_ignore_duplicates OFF
gtid_slave_pos 2-2-1
gtid_strict_mode ON

-----------------------------+
insert into test.test values (null, 'some data', null);
show master status;
------------------------------------------------------+

File Position Binlog_Do_DB Binlog_Ignore_DB

------------------------------------------------------+

binlog-m1.000001 555    

------------------------------------------------------+
select BINLOG_GTID_POS("binlog-m1.000001", 555);
------------------------------------------

BINLOG_GTID_POS("binlog-m1.000001", 555)

------------------------------------------

1-1-1

------------------------------------------
show global variables like 'gtid%';
-----------------------------------+

Variable_name Value

-----------------------------------+

gtid_binlog_pos 1-1-1
gtid_binlog_state 1-1-1
gtid_current_pos 1-1-1,2-2-1
gtid_domain_id 1
gtid_ignore_duplicates OFF
gtid_slave_pos 2-2-1
gtid_strict_mode ON

-----------------------------------+



 Comments   
Comment by Oli Sennhauser [ 2017-11-09 ]

I found the docu finally...
Starting with an empty server

The simplest way for testing purposes is probably to setup a new, empty slave server and replicate all of the master's binlogs from the start (this is usually not feasible in a realistic production setup, as the initial binlog files will probably have been purged or take too long to apply).
But not how to close the bug. Eventum was much better...

Generated at Thu Feb 08 08:12:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.