Bug #83432 slave failes to start after inport of a logical dump from master
Submitted: 18 Oct 2016 20:07 Modified: 19 Oct 2016 10:11
Reporter: Ryan Masse Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.7.15, 5.7.16 OS:Any
Assigned to: CPU Architecture:Any
Tags: mysqldump relay_log relay_log_info_repository master_info_repository

[18 Oct 2016 20:07] Ryan Masse
Similarly to bug #81692 when performing a logical backup of a master if relay_log_info_repository=TABLE is set on both master and slave, then inevitably your slave will fail to start miserably with no logical reason as the relay log info from the master will pollute the configuration on the salve.

This is particularly offensive when setting up a slave of a slave.

[ERROR] Failed to open the relay log '/storage/mysql/mysql-relay-bin.000949' (relay_log_pos 58989116).
[ERROR] Could not find target log file mentioned in relay log info in the index file './mysql-relay-bin.index' during relay log initialization.

Temporary Workaround:

Disable relay_log_info_repository and master_info_repository config parameters on the slave.

How to repeat:
Master my.cnf


mysqldump -u root -p --skip-lock-tables --single-transaction --hex-blob --all-databases --triggers --routines --events

Slave my.cnf


Suggested fix:
Option #A
mysqldump should ignore select tables such as slave_relay_log_info when performing an -all-database backup

Option #B
add a new option to mysqldump for the express purposes of setting up a new slave that encompassed option #A

Option #C
If relay_log_info_repository=TABLE is set and a CHANGE MASTER is performed, truncate the mysql.slave_relay_log_info table
[19 Oct 2016 10:11] MySQL Verification Team
Hello Ryan Masse,

Thank you for the report.
Observed this with 5.7.16 build.