List:Internals« Previous MessageNext Message »
From:Kristian Nielsen Date:May 9 2011 7:19am
Subject:WL#2540, binlog checksums, interoperability between different versions
View as plain text  
In MariaDB, we backported the WL#2540 (binlog checksums) from MySQL 5.6 into
MariaDB 5.3. Due to the way WL#2540 is designed, this requires some changes in
MySQL 5.6 to fully interoperate with MariaDB. So I wanted to make MySQL@Oracle
developers aware of this issue.

This WL#2540 feature is a bit special, in that the slave needs to parse the
server version string in the format description event to correctly interpret
the following event data.

So the problem occurs when a MySQL 5.6 slave replicates against a MariaDB 5.3
(or any version < 5.6.1, which is the point at which the feature is considered
enabled in MySQL 5.6 code). Currently, the MySQL 5.6 slave will notify the
master that it understands checksums, but the slave does not realise that the
master also understands checksums. So the MySQL 5.6 slave will wrongly
interpret the last four checksum bytes as part of the payload of events. Which
is not good.

In MariaDB, I handle this issue by having two version points, one for MariaDB
(where checksums are supported for >=5.3.0), and one for MySQL (>= 5.6.1). So
MariaDB slave on MySQL master works, but the other direction requires changes
in MySQL that I cannot do, of course. See lp:maria/5.3, file sql/log_event.cc,
function Format_description_log_event::is_version_before_checksum() and
related code for how this should be done, if interested.

There is some more documentation of the interoperability issues in MWL#180:

    http://askmonty.org/worklog/Server-Sprint/?tid=180

But the only issue that requires changes in MySQL (that I know of) is this
MariaDB master -> MySQL slave.

Now, it could be argued that it is rather inconvenient that a slave needs to
understand which versions of every master out there implements WL#2540, and I
would agree :-). So if there is interest we could discuss ways to change the
WL#2540 design to detect presense or absense of checksums in a better way, I
will be happy to participate in such discussion. But for now I just wanted to
make MySQL@Oracle developers aware of the issue so they have a chance to make
the case MariaDB master -> MySQL slave work, if they want.

Hope this helps,

 - Kristian.
Thread
WL#2540, binlog checksums, interoperability between different versionsKristian Nielsen9 May
  • Re: WL#2540, binlog checksums, interoperability between differentversionsMats Kindahl9 May
    • Re: WL#2540, binlog checksums, interoperability between different versionsKristian Nielsen9 May
      • Re: WL#2540, binlog checksums, interoperability between differentversionsMats Kindahl13 May
  • Re: WL#2540, binlog checksums, interoperability between different versionsAndrei Elkin11 May