Kristian,
andrei.elkin@pp.inet.fi writes:
Mike,
Hello,
I realize that in general replication from a newer master to an older slave is typically not recommended. This said, does anyone have an experience replicating from MariaDB 10.2 to MySQL 5.6?
A problem that is evident at once is 10.2 GTID events can not be handled by 5.6. So at least some filtering should be devised.
10.2 does not send GTID to a slave that does not understand it (they are rewritten on-the-fly to BEGIN query events). So GTID events should not cause 5.6 slave to break.
Thanks for correcting! The gtid filtering meant is therefore already in the server :-).
More generally, the code in MariaDB (at least the code that I wrote) detects what capabilities the slave has, and avoids sending stuff from the master that an old slave will not understand. See MARIA_SLAVE_CAPABILITY_* in log_event.h.
So the intention is that replication to old slave should work. However, this still requires that applications restrict themselves from using any SQL not supported on the old slave. And it is only poorly tested, if at all. Hence the recommendation to avoid new master->old slave.
To detail on that for the statement-based replication the old slave may ignore a part of execution context that the new master records into events, typically into Query-log-event. While ignorance is bliss it can lead to inconsistency in this case. Cheers, Andrei