I'd like a slave to replicate all tables of a given database except for those starting with some pattern, eg. those with names starting with 'nc' (non-critical, redundant denormalized tables). So I thought that
replicate_wild_do_table = dbname.% replicate_wild_ignore_table = dbname.nc%
would do the job.
However, reading the
replication rules (http://dev.mysql.com/doc/refman/5.5/en/replication-rules-table-options.html)
it seems that the
replicate_wild_do_table rule has precedence over the
replicate_wild_do_table one, thus resulting in tables names
nc% being replicated.
Hence my question: How to replicate all tables (% wildcard) AND exclude those with a pattern?
An obvious workaround would be to give the complement pattern in
replicate_wild_do_table but that's not very elegant (we can't use regexp here, can we?).
Question 2: Is there an obvious reason why MySQL performs the
replicate-wild-do-table rules before the
replicate-wild-ignore-table ones? This order seems counter-intuitive to me.