Bug #65785 Slave SQL stops with error 1064 with valid SQL
Submitted: 2 Jul 2012 12:55 Modified: 20 Jul 2012 12:33
Reporter: Van Stokes Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.6.5.m8 OS:Linux (Ubuntu 12.04 x86_64)
Assigned to: CPU Architecture:Any
Tags: replication

[2 Jul 2012 12:55] Van Stokes
Description:
Master Server: 5.5.25 x64
OS: Ubuntu 12.04 x64

Slave Server: 5.6.m8 x32
OS: Ubuntu 12.04 x32
Configured as "slave-read-only"

Replication slave SQL stops running with error code 1064 claiming invalid SQL statement. However, the SQL statement executed correctly on the master and other replication slaves (others are 5.5.xx). Furthermore, if you issue "START SLAVE" on the 5.6.m8 slave it will (re)execute the SQL statement without error and continue as normal.

How to repeat:
Not sure. Here is the error message:

Error No: 1064

Error Message:
Error 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '',NULL,NULL,NULL,0,0),(2917257,'ACCRUALS','2011-12-15 04:04:31','auto','Transact' at line 1' on query. Default database: 'eci_lw_prod'. Query: 'INSERT INTO `transaction` VALUES (585206,'1970419G97268',NULL,'2012-03-29','2012-04-01 15:38:00',NULL,801.20,NULL,'12032345','25249',NULL,NULL,NULL,'ECU-LINE N.V.','ECUNVA0001','AP',0.00,NULL,NULL,NULL,NULL,NULL,NULL,'PY','2012-03-29','Y','1970419G97268',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,11344,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00,NULL,NULL,NULL,NULL,NULL,25249,NULL,NULL,'2012-04-23 15:39:38',574,'2012-05-11 09:47:45',129,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,0),(585207,'1970419G93759',NULL,'2012-03-29','2012-04-01 15:40:00',NULL,231.20,NULL,'12032453','25249',NULL,NULL,NULL,'ECU-LINE N.V.','ECUNVA0001','AP',0.00,NULL,NULL,NULL,NULL,NULL,NULL

Suggested fix:
not sure.
[2 Jul 2012 13:00] Van Stokes
Corrected MySQL version number.
[2 Jul 2012 19:55] Sveta Smirnova
Thank you for the report.

Please send us full version of query. You can obtain it from master binary log file.
[2 Jul 2012 20:34] Van Stokes
The amount of data you requested was quite large. The query if very large so rather than me attempt to piece-meal it together I FTP'd the binlog and the error.log,

Please check the FTP server for this file:
bug-data-65785.tar.gz

The error.log is from the 5.6.5m8 slave server. It contains the error message and the master-bin-log stop position.

The master-bin.000998 is from the master server (5.5.25).
[4 Jul 2012 17:31] Sveta Smirnova
Thank you for the file provided.

I can not repeat described behavior without table create statement, but I noticed query size is about default value of max_allowed_packet. Please increase this value, restart slave mysqld and inform us if it solves the issue.
[20 Jul 2012 12:33] Van Stokes
Increased value. No further anomalies at this time.