Advanced MySQL Replication Techniques
Subject:   wrong master_log_pos, master_log_name
Date:   2006-05-03 11:16:01
From:   stardata
Response to: wrong master_log_pos, master_log_name

Hi, thanks for your comments.

Please have a look at the code in the Replication Playground, ( where there is a working sample (not perfect, but it should work in many cases).

As I said in the article, there are some bits that still prevent an all-SQL solution, namely the lack of slave related data from the information schema, without which it is impossible to set the slave to the current log file and position in the master.
However, with the technology at hand today, it is possible to ask the would be master to do a RESET MASTER (see the example in the replication playground).
According to my sources, this limitation should go away before MySQL 5.1 is released as generally available (I was promised a fix to the information schema by June). Thus, the techniques shown in this articles should be available for general consumption in a more reliable form.

I will post something in my blog as soon as this solution becomes available.