What happened: A long running query on a slave had to be killed and skipped in order to get critical reporting back up to date. We needed to diff the tables between master and slave and fill in the holes on the slave. The table in question has an auto-increment PK, so it was an excellent candidate to use the Maatkit table sync script.
Get the tool:
chmod +x mk-table-sync
I ran it from the slave db like this:
./mk-table-sync --print --user=foo --ask-pass --tables=db.table_to_fix --nocheck-triggers --sync-to-master slave_db_name
I used --print to generate a list of sql statements to run. I could have used --execute to simply have them run, but I wanted to look at the changes that would be made first. --nocheck-triggers was used because the table had triggers on it. I verified that inserting the missing rows would not affect what the triggers did, so I felt comfortable using that option.
The script very intelligently examined the table on both master and slave in small chunks to determine missing rows. There was no adverse affect in my case on either master or slave. The end result was a list of about 1400 REPLACE statement that I verified and then used to fix the problem.