MySQL Forums
Forum List  »  Replication

Re: Getting consistent backup of slave that has foreign keys
Posted by: Peter Brawley
Date: March 01, 2016 12:02PM

"within a couple seconds", it's a catchup error and suggests the slave was stopped mid-transaction. (Presumably you checked another error to ensure it's not always this one table.)

You have a test case (you might want two or three). Now you need to troll the binary log for the history of that referenced ivr_agentcallqueue key value 599489558.

5.1 is pretty old. Baron Schwartz wrote http://www.xaprb.com/blog/2007/01/20/how-to-make-mysql-replication-reliable/ about that version.

Did you try this to see what happens? On the master, do ...

FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;

Record the log file name and position from the latter command, then on the slave execute ...

SELECT MASTER_POS_WAIT( 'name_of_log_file', log_file_offset );

When replication catches up, this will return. Then on the master execute ...

UNLOCK TABLES;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Getting consistent backup of slave that has foreign keys
860
March 01, 2016 12:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.