Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-8685

MariaDB fails to decode Anonymous_GTID entries

Details

    Description

      When trying to replicate from 5.7.8 to 10.1.5:

                     Last_SQL_Errno: 1594
                     Last_SQL_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.

      Also mysqlbinlog from 10.1.5 fails:

      ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 61, event_type: 34

      From 5.7.8 mysqlbinlog output

      # at 327
      #150827 10:25:04 server id 5708  end_log_pos 388 	Anonymous_GTID	last_committed=1	sequence_number=2
      SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/;

      mysql-5.7.8> show global variables like '%gtid%';
      +----------------------------------+-------+
      | Variable_name                    | Value |
      +----------------------------------+-------+
      | binlog_gtid_simple_recovery      | ON    |
      | enforce_gtid_consistency         | OFF   |
      | gtid_executed                    |       |
      | gtid_executed_compression_period | 1000  |
      | gtid_mode                        | OFF   |
      | gtid_owned                       |       |
      | gtid_purged                      |       |
      | session_track_gtids              | OFF   |
      +----------------------------------+-------+
      8 rows in set (0.00 sec)

      It would be nice if replication from 5.7.8 (w/o GTID) to 10.1 would work.

      Attachments

        Issue Links

          Activity

            I tried slave_skip_errors=1594, but that failed. (and needs a restart )
            Also sql_slave_skip_counter=1 failed.

            The only working work-around is

            STOP SLAVE;
            CHANGE MASTER TO MASTER_LOG_POS=<Exec_Master_Log_Pos+61>;
            START SLAVE;

            Maybe something like this could work?
            SET GLOBAL slave_skip_event_types='34';
            It would be nice if slave_skip_errors and sql_slave_skip_counter would work in this case.

            dveeden Daniël van Eeden added a comment - I tried slave_skip_errors=1594, but that failed. (and needs a restart ) Also sql_slave_skip_counter=1 failed. The only working work-around is STOP SLAVE; CHANGE MASTER TO MASTER_LOG_POS=<Exec_Master_Log_Pos+61>; START SLAVE; Maybe something like this could work? SET GLOBAL slave_skip_event_types='34'; It would be nice if slave_skip_errors and sql_slave_skip_counter would work in this case.

            We still have MDEV-4487 open, for 5.6 GTID => MariaDB replication. I highly doubt the problem with anonymous GTIDs from 5.7 can be resolved sooner.

            elenst Elena Stepanova added a comment - We still have MDEV-4487 open, for 5.6 GTID => MariaDB replication. I highly doubt the problem with anonymous GTIDs from 5.7 can be resolved sooner.

            This should now be fixed as MDEV-4487 is fixed.
            (Did only test MySQL 5.6 -> MariaDB 10.0)

            monty Michael Widenius added a comment - This should now be fixed as MDEV-4487 is fixed. (Did only test MySQL 5.6 -> MariaDB 10.0)

            I'd like to verify if this is really fixed. Which commit/branch/etc should I test against?

            dveeden Daniël van Eeden added a comment - I'd like to verify if this is really fixed. Which commit/branch/etc should I test against?

            This is the commit for the 10.0 branch. It looks like this didn't yet made it into the 10.1 branch

            commit a69a6ddac8175a611d97711d167e26ad5d1f9dc8
            Author: Monty <monty@mariadb.org>
            Date:   Thu Oct 8 10:45:09 2015 +0300
             
                MDEV-4487 Allow replication from MySQL 5.6+ when GTID is enabled on the master
                MDEV-8685 MariaDB fails to decode Anonymous_GTID entries
                MDEV-5705 Replication testing: 5.6->10.0
                
                - Ignoring GTID events from MySQL 5.6+ (Allows replication from MySQL 5.6+ with GTID enabled)
                - Added ignorable events from MySQL 5.6
                - mysqlbinlog now writes information about GTID and ignorable events.
                - Added more information in error message when replication stops because of wrong information in binary log.
                - Fixed wrong test when write_on_release() should flush cache.

            https://github.com/MariaDB/server/commit/a69a6ddac8175a611d97711d167e26ad5d1f9dc8

            dveeden Daniël van Eeden added a comment - This is the commit for the 10.0 branch. It looks like this didn't yet made it into the 10.1 branch commit a69a6ddac8175a611d97711d167e26ad5d1f9dc8 Author: Monty <monty@mariadb.org> Date: Thu Oct 8 10:45:09 2015 +0300   MDEV-4487 Allow replication from MySQL 5.6+ when GTID is enabled on the master MDEV-8685 MariaDB fails to decode Anonymous_GTID entries MDEV-5705 Replication testing: 5.6->10.0 - Ignoring GTID events from MySQL 5.6+ (Allows replication from MySQL 5.6+ with GTID enabled) - Added ignorable events from MySQL 5.6 - mysqlbinlog now writes information about GTID and ignorable events. - Added more information in error message when replication stops because of wrong information in binary log. - Fixed wrong test when write_on_release() should flush cache. https://github.com/MariaDB/server/commit/a69a6ddac8175a611d97711d167e26ad5d1f9dc8

            daniëlvaneeden, it should be in 10.1 as well now, the merge happened a couple of days ago.

            elenst Elena Stepanova added a comment - daniëlvaneeden , it should be in 10.1 as well now, the merge happened a couple of days ago.

            Tested with repliation from 5.7.9 to MariaDB 10.1.8 (git 3723c70) and it works

            dveeden Daniël van Eeden added a comment - Tested with repliation from 5.7.9 to MariaDB 10.1.8 (git 3723c70) and it works

            People

              monty Michael Widenius
              dveeden Daniël van Eeden
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.