[MDEV-6364] Migrate a slave from MySQL 5.6 to MariaDB 10 break replication Created: 2014-06-19  Updated: 2014-06-24  Resolved: 2014-06-24

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.12
Fix Version/s: 10.0.13

Type: Bug Priority: Critical
Reporter: Cédric PEINTRE Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: replication
Environment:

Ubuntu 12.04.4 LTS
Percona Server 5.6.16
MariaDB 10.0.12



 Description   

When migrate a slave from Percona server 5.6.16 to MariaDB 10.0.12 this error occurs when replication start :

140618 17:27:57 [ERROR] Failed to open the relay log '7' (relay_log_pos 0)
140618 17:27:57 [ERROR] Could not find target log during relay log initialization
140618 17:27:57 [ERROR] Failed to initialize the master info structure
140618 17:27:57 [ERROR] Failed to allocate memory for the Master Info structure

Here is an example of the relay-log.info file :

7
relay-bin.005602
253314865
mysql-bin.002783
253314702
0
0
1
1

Workaround :

  • Stop replication
  • Stop MySQL server
  • Delete the first line of the relay-log.info file (7)
  • Start MySQL and replication


 Comments   
Comment by Elena Stepanova [ 2014-06-19 ]

Apparently the format was changed as a part of WL:5125 which we didn't merge. The first line is the number of lines in the file.

Comment by Kristian Nielsen [ 2014-06-23 ]

Looks like this change was actually done as part of WL#344:

http://dev.mysql.com/worklog/task/?id=344

Comment by Kristian Nielsen [ 2014-06-23 ]

The WL#344 is mainly about adding CHANGE MASTER TO MASTER_DELAY=xxx.
This does not seem to be something that we should add in GA 10.0.

But I can merge the minimal changes from that feature into 10.0 to support the
changed file format.

Note that while this will make migration back and forth between MySQL 5.6 and
MariaDB 10.0 work (with respect to relay_log.info), this will introduce the
same problem for downgrades from MariaDB >=10.0.13 to MariaDB <= 10.0.12.

I would like to get a second opinion on whether this is desirable/acceptable.

Comment by Kristian Nielsen [ 2014-06-24 ]

Per suggestion from Elena, I will merge from WL#344 only the part that
recognises the new file format written in MySQL 5.6. I will not merge the part
that actually writes the new format.

This should fix the issue, MariaDB 10.0.13+ should be able to read a
relay-log.info generated by MySQL 5.6. At the same time, it should prevent
downgrade issues; MariaDB 10.0.13+ will still write the old format of
relay-log.info, so MariaDB <= 10.0.12 will be able to read it fine. And MySQL
5.6 should also be able to read it fine, as it understands the old format as
well as the new one.

Comment by Kristian Nielsen [ 2014-06-24 ]

Pushed to 10.0

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