views:

17

answers:

1

I have a master-master replication setup and just found out that sometime during the initial testing (2 years ago) two extra rows where inserted in to only one host and now I'd like to remove them so that the DB's are fully in sync. Can I just issue a delete of those rows on the host in question without replication going crazy because of missing rows on the other host? Or should I somehow skip replication for the delete command?

+1  A: 

I think you can safely run the DELETE. If a WHERE - clause in a DELETE-statement does not match any rows of data, zero rows are deleted, but MySQL does not throw an error. That's why your DELETE-statement is perfectly valid on both servers, deleting two rows on one server and zero rows on the second server.

titanoboa
Thanks, that's what I was thinking too, just wanted to get a second opinion in case there's some hidden catch. Just ran the delete with no problems. Problem solved.
peku