Bug #82332 replication QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected
Submitted: 25 Jul 2016 8:11 Modified: 25 Jul 2017 14:13
Reporter: wu zejun Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.7.13 OS:CentOS (CentOS release 6.5 (Final))
Assigned to: CPU Architecture:Any

[25 Jul 2016 8:11] wu zejun
Description:
according to the http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-13.html

Replication: Slaves running MySQL 5.7 could not connect to a MySQL 5.5 master due to an error retrieving the server_uuid, which is not part of MySQL 5.5. This was caused by changes in the method of retrieving the server_uuid. (Bug #22748612)

References: This issue is a regression of: Bug #21455603.

when the master version is 5.0.92, the slave version is 5.7.13, the update binlog had been replicated to the slave, but the slave error log shown like that:

2016-07-25T12:56:00.525551+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 131517818.
2016-07-25T12:56:00.525661+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.525672+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 131520410.
2016-07-25T12:56:00.525742+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.525751+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 131522305.
2016-07-25T12:56:00.567397+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.567417+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 132826658.
2016-07-25T12:56:00.567499+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.567509+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 132828845.
2016-07-25T12:56:00.567647+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.567658+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 132832574.
2016-07-25T12:56:00.785479+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.785506+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 136175795.
2016-07-25T12:56:00.785726+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.785738+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 136182723.
2016-07-25T12:56:00.785815+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.785825+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 136184119.
2016-07-25T12:56:00.785881+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.785890+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 136185419.
2016-07-25T12:56:00.825792+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.825808+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 137558307.
2016-07-25T12:56:00.825977+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.825987+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 137562916.
2016-07-25T12:56:00.826202+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.826213+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 137568418.
2016-07-25T12:56:00.826321+08:00 1 [Warning] QUERY(COMMIT or ROLLBACK) or XID_LOG_EVENT is not expected in an event stream outside a transaction.
2016-07-25T12:56:00.826331+08:00 1 [Warning] An unexpected event sequence was detected by the IO thread while queuing the event received from master 'bin.001884' binary log file, at position 137571896.

How to repeat:
use the different mysql version for the replication

master:5.0.92
slave:5.7.13
[25 Jul 2017 14:13] MySQL Verification Team
Hi!

First of all, we do not support 5.0 version any more. We support only 5.5, 5.6 and 5.7.

Second, we do not support replication from 5.0 to 5.7.

The warnings that you see are there because 5.7 expects to read GTIDs and 5.0 can not generate GTIDs. You can find out about replication requirements of 5.7 in its Reference Manual.