Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Mariabackup's --slave-info option writes a CHANGE MASTER command to xtrabackup_slave_info:
https://mariadb.com/kb/en/library/mariabackup-options/#-slave-info
https://mariadb.com/kb/en/library/files-created-by-mariabackup/#xtrabackup_slave_info
This does not currently fully support MariaDB's GTID implementation. It only fully supports MySQL's GTID implementation.
It *does* write the CHANGE MASTER command to use master_use_gtid=slave_pos if the gtid_slave_pos system variable is non-empty. However, just because gtid_slave_pos is non-empty, that does not mean that the current slave thread has master_use_gtid=slave_pos set.
For MySQL's GTID, it parses the SHOW SLAVE STATUS output to determine if Executed_Gtid_Set is non-empty. If it is non-empty, then it uses MySQL's GTID in the CHANGE MASTER command. This check does guarantee that the current slave thread is using GTID.
If we wanted to make the MariaDB GTID checks as thorough as the MySQL GTID check, then we would parse SHOW SLAVE STATUS output for the "Using_Gtid" column. If the value were "no", then we would use the old log file and position. If the value were either "Slave_Pos" or "Current_Pos", then we would use GTID.
https://mariadb.com/kb/en/library/show-slave-status/
See here:
https://github.com/MariaDB/server/blob/mariadb-10.4.4/extra/mariabackup/backup_mysql.cc#L1056
https://github.com/MariaDB/server/blob/mariadb-10.4.4/extra/mariabackup/backup_mysql.cc#L1095
https://github.com/MariaDB/server/blob/mariadb-10.4.4/extra/mariabackup/backup_mysql.cc#L1115
We should probably change it to remove MySQL's GTID implementation and better support MariaDB's GTID implementation at some point.
Attachments
Issue Links
- is duplicated by
-
MDEV-21157 --slave-info only contains gtid information of master and not binlog file and position with mariabackup
- Closed
- relates to
-
MDEV-14746 mariabackup doesn't read [mariabackup] option group in configuration file
- Closed
-
MDEV-18347 mariabackup doesn't read all server option groups from configuration files
- Closed
-
MDEV-18405 Add Mariabackup option to set gtid_slave_pos to original server's gtid_current_pos during prepare
- Stalled
-
MDEV-18917 Don't create xtrabackup_binlog_pos_innodb with Mariabackup
- Closed
-
MDEV-18931 Rename Mariabackup's xtrabackup_* files to mariadb_backup_*
- Closed
-
MDEV-18985 Remove support for XtraDB's changed page bitmap from Mariabackup in 10.2+
- Closed
-
MDEV-19246 Change database and table used for Mariabackup's history
- Closed
-
MDEV-20552 Remove innobackupex mode from Mariabackup
- Stalled
-
MDEV-20556 Remove references to "xtrabackup" and "innobackupex" executables in mariabackup option descriptions
- Closed