Replication error from Mariadb 10.1 to Mysql 5.1/5.0/5/5 when master’s logging format is set to row based

Posted on

Question :

While replicating from Mariadb 10.1 to MySQL (5.0, 5.1, 5.5) or Mariadb (5.2, 5.5) lower versions, if master’s binlog_format is set to row, the replication failure occurs with the following message at slave (show slave status G;):

Last_Error: Table definition on master and slave does not match: Column 18 type mismatch – received type 19, rtmariadb10.empdetails
has type 11

Here

Master: Mariadb 10.1,binlog_format: row ; 
Slave : Mysql 5.1, binlog_format=statement/row/mixed(any one of these) 

Can someone please help to solve this issue?

Answer :

You have encountered one of the reasons for saying that replication must not go from a newer Master to an older Slave.

Would you care to explain the ultimate goal; maybe we can discuss a workaround.

Consider the BLACKHOLE engine in a “relay” server. I don’t now the specifics for your situation, but look at:

Master — new version –>
Relay — intermediate version –>
Slave — old version

The Relay would receive the data and pass it on to the Slave without even storing it (“Blackhole”). The hope is that with a suitable intermediate version and/or using SBR on one side and RBR on the other, you can avoid your problem.

Leave a Reply

Your email address will not be published. Required fields are marked *