Comment 1 for bug 1404484

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Verified with MariaDB 10 and Xtrabackup 2.2.7.

root@desktop:/home/nilnandan/backup/2014-12-31_14-45-42# cat xtrabackup_slave_info
CHANGE MASTER TO master_use_gtid = slave_pos
root@desktop:/home/nilnandan/backup/2014-12-31_14-45-42#

With PS 5.6.21 and Xtrabackup 2.2.7, we can see like this.

root@desktop:/home/nilnandan/backup/2014-12-31_15-07-20# cat xtrabackup_slave_info
SET GLOBAL gtid_purged='2c827228-90cf-11e4-b877-00224db1c503:1-2';
CHANGE MASTER TO MASTER_AUTO_POSITION=1
root@desktop:/home/nilnandan/backup/2014-12-31_15-07-20#

Actually, in MariaDB, we need master binlog file and position to get GTID, also from backup, we can get the GTID.
i.e

nilnandan@desktop:~$ sudo innobackupex --user=root --password=msandbox --socket=/tmp/mysql_sandbox24026.sock --defaults-file=/home/nilnandan/sandboxes/rsandbox_mariadb-10_0_15/node1/my.sandbox.cnf --slave-info /home/nilnandan/backup/

...

innobackupex: Backup created in directory '/home/nilnandan/backup/2014-12-31_14-45-42'
innobackupex: MySQL binlog position: filename 'mysql-bin.000001', position 312, GTID of the last change '0-1-12'
innobackupex: MySQL slave binlog position: master host '127.0.0.1', gtid_slave_pos 0-1-12
141231 14:45:45 innobackupex: Connection to database server closed
141231 14:45:45 innobackupex: completed OK!
nilnandan@desktop:~$

So the slave_info should be,

SET GLOBAL gtid_slave_pos = '0-1-12';
CHANGE MASTER TO master_use_gtid=slave_pos;

Find more information here. https://mariadb.com/blog/enabling-gtids-server-replication-mariadb-100