I have a setup with two MariaDB masters, each being the slave of the other. Some Some tables are ignored, with the configuration option replicate-ignore-table : "database.prefix_temp_%".
replicate-ignore-table = moodle.mdl_temp_%
My problem is when a statisticsstatistic batch is run against one of the server : a a CREATE TABLE followed by a CREATE INDEX is issued, and the last statement is replicated (looking at the binlogs the CREATE TABLE is effectively not replicated), which broke the replication on the other server. Who
Who to avoid the CREATE INDEX being replicated ?
[EDIT] Here is the error on the second server when the statistic batch is ran on the first server.
Error 'Table 'moodle.mdl_temp_stats_daily' doesn't exist' on query. Default database: 'moodle'. Query: 'CREATE INDEX mdl_tempstatdail_cou_ix ON mdl_temp_stats_daily (courseid)
And when I take a look at the binlogs, there's no "CREATE TABLE" but there is still the CREATE INDEX :
# mysqlbinlog /var/lib/mysql/binlog/mysql-bin.000101 | grep -i create
CREATE INDEX mdl_tempstatdail_cou_ix ON mdl_temp_stats_daily (courseid)
CREATE INDEX mdl_tempstatdail_tim_ix ON mdl_temp_stats_daily (timeend)
CREATE INDEX mdl_tempstatdail_rol_ix ON mdl_temp_stats_daily (roleid)
[...]