MDEV-6336: mysqldump --master-data does not work with GTID setups
MDEV-6344: mysqldump issues FLUSH TABLES, which gets written into binlog and replicated Add a --gtid option (for compatibility, the original behaviour is preserved when --gtid is not used). With --gtid, --master-data and --dump-slave output the GTID position (the old-style file/offset position is still output, but commented out). Also, a CHANGE MASTER TO master_use_gtid=slave_pos is output to ensure a provisioned slave is configured in GTID, as requested. Without --gtid, the GTID position is still output, if available, but commented out. Also fix MDEV-6344, to avoid FLUSH TABLES getting into the binlog. Otherwise a mysqldump on a slave server will silently inject a GTID which does not exist on the master, which is highly undesirable. Also fix an incorrect error handling around obtaining binlog position with --master-data (was probably unlikely to trigger in most cases).
Showing
This diff is collapsed.
Please register or sign in to comment