We run a RDS MySQL master-slave replication setup and quite regularly add another replica (replicating from the slave) for maintenance, testing, analytics, etc.
However, I currently cannot create a new instance that replicates from the slave. When it starts replicating, error 1032 occurs:
Could not execute Update_rows event on table x.y; Can't find record in 'y', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin-changelog.083465, end_log_pos 260523
When I create a new instance that replicates from the master, everything works as usual.
During recent maintenance we created a new table
y_temp, filled it with a subset of rows from
y, and then renamed
y. It seems very likely that this has caused the state we're seeing, but I don't understand how. During the maintenance, slave was replicating from master as usual and it now has the same rows in
y as master.
I have not been able to find any reports that match our situation. I would prefer to have new instances replicate from slave instead of master. Should we recreate the slave instance?
This is RDS MySQL 5.6.35 and I use the RDS console to add the read replica.