Bug #82755 Replication broken from mysql 5.6.31 to 5.6.32 for invalid utf8 char
Submitted: 28 Aug 2016 6:19 Modified: 28 Aug 2016 17:48
Reporter: Fakhruddin Hamid Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.6.32 OS:Red Hat (Amazon Linux (el6))
Assigned to: CPU Architecture:Any

[28 Aug 2016 6:19] Fakhruddin Hamid
Description:
We do statement based replication and server is running 5.6.31 version.
Slave was also running the same version but lost the slave and then we had to re-initialize it and that time it receive 5.6.32 version from mysql yum repo, data was on a EBS volume in aws so used the same copy as is, after this we started seeing below error in replication for "load data infile" statements though the same passes fine on master and other slaves running lower version of MySQL server (5.6.31 and 5.6.25)

Error 'Invalid utf8 character string: '"Marli Schößler'' on query. Default database: '********'. Query: 'LOAD DATA INFILE '/data/tmp/SQL_LOAD-ad1949c5-a002-11e4-9b98-22000a128c33-2-12594.data' IGNORE INTO  TABLE `**********` FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`Customer_Email`, `Customer_UUID`, `Customer_Name`, `Sub_Plan_Items`, `Product_SKU`, `Return_Notified_Date`, `Cancellation_Date`, `Day_Left`, `Valid_Till_Date`, `FT1`, `FT7`, `FT10`, `Last_GoodBye_Status`, `Last_GoodBye_Date`, `Last_GoodBye_Balance`)'

Though we tried to run the same query manually once using MySQL workbench and once local mysql prompt, both time the query passed with success.

mysql> use <database>
mysql> LOAD DATA INFILE '/data/tmp/SQL_LOAD-ad1949c5-a002-11e4-9b98-22000a128c33-2-12594.data' IGNORE INTO  TABLE `**********` FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`Customer_Email`, `Customer_UUID`, `Customer_Name`, `Sub_Plan_Items`, `Product_SKU`, `Return_Notified_Date`, `Cancellation_Date`, `Day_Left`, `Valid_Till_Date`, `FT1`, `FT7`, `FT10`, `Last_GoodBye_Status`, `Last_GoodBye_Date`, `Last_GoodBye_Balance`);

We checked the data file and the value it break on is:
"Marli Schößler"

Sorry but I won't be able to share the data file, but above is the string which broke the replication, so you could produce the testing data.

How to repeat:
Setup master using 5.6.31 or a lower version.
Setup replication on a slave using 5.6.32 and statement based.
Load values in a data file using "Marli Schößler" kind of data and then load this file in master.

The statement will break on slave.
[28 Aug 2016 17:28] MySQL Verification Team
Hello Fakhruddin,

Thank you for the report.
This is most likely duplicate of Bug #82641, please see Bug #82641.

Thanks,
Umesh
[28 Aug 2016 17:48] Fakhruddin Hamid
Thanks Umesh, yes it is same as 82641.
[28 Aug 2016 17:50] MySQL Verification Team
Thank you Fakhruddin for confirming.

Thanks,
Umesh