This is more of an informational question than a problem that needs a solution. We have master and slave MySQL servers configured to perform statement-based replication. Currently, the replication is multiple days behind because someone forgot to ignore the temporary DBs/tables that are created/modified/destroyed when preparing standalone copies of the DBs (and we did a LOT of those last week). I have now configured the slave to ignore the relevant DBs, but there are a bunch of statements for those ignored DBs already in the relay files.
My question is this: Does the ignore get applied when the slave copies the statements from the master’s binlog to its relay log, OR are statements in the relay log run against the ignore constraints? If it’s the former, it means it’ll take longer for us to catch up; if the latter, we will catch up by leaps and bounds when the slave reaches those statements.
Stated another way: Which thread takes the db/table ignores into account, the io thread or the sql thread?
Looks like it’s the sql thread, so statements replicated to the slave that have not yet been executed will be checked against the ignore rules.