[MDEV-8685] MariaDB fails to decode Anonymous_GTID entries Created: 2015-08-27  Updated: 2015-10-14  Resolved: 2015-10-09

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.1.5
Fix Version/s: 10.0.22, 10.1.8

Type: Bug Priority: Minor
Reporter: Daniël van Eeden Assignee: Michael Widenius
Resolution: Fixed Votes: 1
Labels: binlog, gtid, replication

Issue Links:
Blocks
is blocked by MDEV-4487 FR: Allow replication from MySQL 5.6+... Closed

 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.



 Comments   
Comment by Daniël van Eeden [ 2015-08-27 ]

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.

Comment by Elena Stepanova [ 2015-08-30 ]

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.

Comment by Michael Widenius [ 2015-10-09 ]

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

Comment by Daniël van Eeden [ 2015-10-09 ]

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

Comment by Daniël van Eeden [ 2015-10-14 ]

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

Comment by Elena Stepanova [ 2015-10-14 ]

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

Comment by Daniël van Eeden [ 2015-10-14 ]

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

Generated at Thu Feb 08 07:29:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.