| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
connection slave; |
| 4 |
############### |
| 5 |
# If Using_Gtid != 'No', backup gtid_slave_pos |
| 6 |
######################## |
| 7 |
include/stop_slave.inc |
| 8 |
change master to master_use_gtid=slave_pos; |
| 9 |
include/start_slave.inc |
| 10 |
connection master; |
| 11 |
CREATE TABLE t(i INT); |
| 12 |
connection slave; |
| 13 |
"using_gtid: Slave_Pos" |
| 14 |
FOUND 1 /gtid_slave_pos/ in mariadb_backup_slave_info |
| 15 |
NOT FOUND /MASTER_LOG_FILE/ in mariadb_backup_slave_info |
| 16 |
lineno line |
| 17 |
1 SET GLOBAL gtid_slave_pos = '<NUM-NUM-NUM>'; |
| 18 |
2 CHANGE MASTER TO master_use_gtid = slave_pos; |
| 19 |
############### |
| 20 |
# If Using_Gtid != 'No' and !gtid_slave_pos, backup master position |
| 21 |
######################## |
| 22 |
include/stop_slave.inc |
| 23 |
SET GLOBAL gtid_slave_pos=""; |
| 24 |
NOT FOUND /gtid_slave_pos/ in mariadb_backup_slave_info |
| 25 |
FOUND 1 /MASTER_LOG_FILE/ in mariadb_backup_slave_info |
| 26 |
lineno line |
| 27 |
1 CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=<NUM>; |
| 28 |
############### |
| 29 |
# If Using_Gtid == 'No', backup Exec_Master_Log_Pos |
| 30 |
######################## |
| 31 |
change master to master_use_gtid=no; |
| 32 |
include/start_slave.inc |
| 33 |
connection master; |
| 34 |
INSERT INTO t VALUES(1); |
| 35 |
connection slave; |
| 36 |
"using_gtid: No" |
| 37 |
NOT FOUND /gtid_slave_pos/ in mariadb_backup_slave_info |
| 38 |
FOUND 1 /MASTER_LOG_FILE/ in mariadb_backup_slave_info |
| 39 |
lineno line |
| 40 |
1 CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=<NUM>; |
| 41 |
connection master; |
| 42 |
DROP TABLE t; |
| 43 |
connection slave; |
| 44 |
include/rpl_end.inc |