I have a MySQL master machine, and several slaves. One of the slaves is only replicating two tables. I've set this up in my.cnf using:
replicate-do-table = db.table_old
replicate-do-table = db.table_new
Now, I understand only queries effecting table_old and table_new will be reflected on this server. That's what I want. However, now I need to swap table1 and table2. I do this using a 3 step rename:
RENAME table_old TO table_tmp, table_new TO table_old, table_tmp TO table_new
This works fine under normal replication, but I'm concerned that the table_tmp TO table_new
portion won't be replicated considering it doesn't concern table_new as the table being renamed? Or, is MySQL start enough to know that this is a table swap and all should be done?