chusiang / mysql-master-master

Automatically exported from code.google.com/p/mysql-master-master
GNU General Public License v2.0
1 stars 1 forks source link

mmm_clone broke replication on the source server #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. On broken_master, run this:
mmm_clone --host running_master --clone-mode master-master

What is the expected output? What do you see instead?

I expected mmm_clone to CHANGE MASTER TO the new logfile/pos on the
broken_master after giving it a fresh copy of data.  But it did this instead:

[2008-05-19 11:08:25]: MYSQL EXEC: STOP SLAVE
[2008-05-19 11:08:25]: MYSQL EXEC: CHANGE MASTER TO  
MASTER_HOST='running_master',  MASTER_PORT=3306,  MASTER_USER='repl', 
MASTER_PASSWORD='p4ss',  MASTER_LOG_FILE='mysql-bin.000097', 
MASTER_LOG_POS=30953263
[2008-05-19 11:08:26]: MYSQL EXEC: START SLAVE
[2008-05-19 11:08:26]: Changing master info for peer server...
[2008-05-19 11:08:26]: MYSQL EXEC: STOP SLAVE
[2008-05-19 11:08:26]: MYSQL EXEC: CHANGE MASTER TO  
MASTER_HOST='broken_master',  MASTER_PORT=3306,  MASTER_USER='repl', 
MASTER_PASSWORD='p4ss'
[2008-05-19 11:08:26]: Error: Can't set master for peer server: ERROR: SQL
Query Error: Could not initialize master info structure; more error
messages can be found in the MySQL error log

The issue is that there was no MASTER_LOG_FILE and MASTER_LOG_POS in the
CHANGE MASTER TO command.  It needed to be set at mysql-bin.000001,
position 98 so running_master would throw away its relay logs.  Instead,
running_master tried to keep replicating from an old relay log.

What version of the product are you using? On what operating system?

MMM 1.0
MySQL 5.0.45
Debian

Original issue reported on code.google.com by baron.schwartz on 19 May 2008 at 3:44

GoogleCodeExporter commented 9 years ago
Maybe mmm_clone should issue a 'RESET SLAVE' on the source server before the 
CHANGE
MASTER?

Original comment by m...@pascalhofmann.de on 16 Oct 2008 at 12:29

GoogleCodeExporter commented 9 years ago
Fixed in r122

Original comment by m...@pascalhofmann.de on 28 Oct 2008 at 3:34