mariadb/mysql-test/suite/mariabackup/rpl_slave_info.result
Alexander Barkov b314f7b642 MDEV-18931 Rename Mariabackup's xtrabackup_* files to mariadb_backup_*
Renaming the default MariaDB backup directory from
xtrabackup_backupfiles to mariadb_backup_files.

Renaming files:
- xtrabackup_binlog_info to mariadb_backup_binlog_info
- xtrabackup_checkpoints to mariadb_backup_checkpoints
- xtrabackup_galera_info to mariadb_backup_galera_info
- xtrabackup_info to mariadb_backup_info
- xtrabackup_slave_info to mariadb_backup_slave_info
2023-03-10 12:41:58 +01:00

44 lines
1.4 KiB
Text

include/master-slave.inc
[connection master]
connection slave;
###############
# If Using_Gtid != 'No', backup gtid_slave_pos
########################
include/stop_slave.inc
change master to master_use_gtid=slave_pos;
include/start_slave.inc
connection master;
CREATE TABLE t(i INT);
connection slave;
"using_gtid: Slave_Pos"
FOUND 1 /gtid_slave_pos/ in mariadb_backup_slave_info
NOT FOUND /MASTER_LOG_FILE/ in mariadb_backup_slave_info
lineno line
1 SET GLOBAL gtid_slave_pos = '<NUM-NUM-NUM>';
2 CHANGE MASTER TO master_use_gtid = slave_pos;
###############
# If Using_Gtid != 'No' and !gtid_slave_pos, backup master position
########################
include/stop_slave.inc
SET GLOBAL gtid_slave_pos="";
NOT FOUND /gtid_slave_pos/ in mariadb_backup_slave_info
FOUND 1 /MASTER_LOG_FILE/ in mariadb_backup_slave_info
lineno line
1 CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=<NUM>;
###############
# If Using_Gtid == 'No', backup Exec_Master_Log_Pos
########################
change master to master_use_gtid=no;
include/start_slave.inc
connection master;
INSERT INTO t VALUES(1);
connection slave;
"using_gtid: No"
NOT FOUND /gtid_slave_pos/ in mariadb_backup_slave_info
FOUND 1 /MASTER_LOG_FILE/ in mariadb_backup_slave_info
lineno line
1 CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=<NUM>;
connection master;
DROP TABLE t;
connection slave;
include/rpl_end.inc