I create a file with a UTF8MB4 string:
SELECT CONCAT('aaa',0xF09F988E,'bbb') INTO OUTFILE '/tmp/test.txt';
|
where 0xF09F988E is UTF8MB4 encoding for the character "U+1F60E SMILING FACE WITH SUNGLASSES".
Now I load this file:
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
|
LOAD DATA INFILE '/tmp/test.txt' INTO TABLE t1 CHARACTER SET utf8;
|
SHOW WARNINGS;
|
SELECT * FROM t1;
|
Notice, the CHARACTER SET utf8 clause is wrong. It should be CHARACTER SET utf8mb4 instead. But the problem is that in 10.0.24 it loaded the data with a warning, and in 10.0.28 it fails with an error.
Results in 10.0.24:
MariaDB [test]> DROP TABLE IF EXISTS t1;
|
Query OK, 0 rows affected (0.01 sec)
|
|
MariaDB [test]> CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
|
Query OK, 0 rows affected (0.01 sec)
|
|
MariaDB [test]> LOAD DATA INFILE '/tmp/test.txt' INTO TABLE t1 CHARACTER SET utf8;
|
Query OK, 1 row affected, 1 warning (0.00 sec)
|
Records: 1 Deleted: 0 Skipped: 0 Warnings: 1
|
|
MariaDB [test]> SHOW WARNINGS;
|
+---------+------+-------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+-------------------------------------------------------------------------+
|
| Warning | 1366 | Incorrect string value: '\xF0\x9F\x98\x8Ebb...' for column 'a' at row 1 |
|
+---------+------+-------------------------------------------------------------------------+
|
1 row in set (0.00 sec)
|
|
MariaDB [test]> SELECT * FROM t1;
|
+------+
|
| a |
|
+------+
|
| aaa |
|
+------+
|
Results in 10.0.28:
MariaDB [test]> DROP TABLE IF EXISTS t1;
|
Query OK, 0 rows affected (0.02 sec)
|
|
MariaDB [test]> CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
|
Query OK, 0 rows affected (0.05 sec)
|
|
MariaDB [test]> LOAD DATA INFILE '/tmp/test.txt' INTO TABLE t1 CHARACTER SET utf8;
|
ERROR 1300 (HY000): Invalid utf8 character string: 'aaa'
|
MariaDB [test]> SHOW WARNINGS;
|
+-------+------+--------------------------------------+
|
| Level | Code | Message |
|
+-------+------+--------------------------------------+
|
| Error | 1300 | Invalid utf8 character string: 'aaa' |
|
+-------+------+--------------------------------------+
|
1 row in set (0.00 sec)
|
|
MariaDB [test]> SELECT * FROM t1;
|
Empty set (0.00 sec)
|
As a result, replication from a 10.0.24 master to a 10.0.28 slave stops with an error.
The bug was likely introduced after merging this commit from MySQL:
commit 9f7288e2e0179db478d20c74f57b5c7d6c95f793
|
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
|
Date: Mon Jun 20 11:35:43 2016 +0530
|
|
BUG#23080148 - BACKPORT BUG 14653594 AND BUG 20683959 TO
|
MYSQL-5.5
|
|
The bug asks for a backport of bug#1463594 and bug#20682959. This
|
is required because of the fact that if replication is enabled, master
|
transaction can commit whereas slave can't commit due to not exact
|
'enviroment'. This manifestation is seen in bug#22024200.
|
- relates to
-
MDEV-11343
LOAD DATA INFILE fails to load data with an escape character followed by a multi-byte character
-
-
Closed
{"report":{"fcp":3710.5,"ttfb":574.6000003814697,"pageVisibility":"visible","entityId":58788,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"f038a828-106a-4d4c-858e-5fd1dfc9aad3","navigationType":0,"readyForUser":3724.1000003814697,"redirectCount":0,"resourceLoadedEnd":3176,"resourceLoadedStart":614.1000003814697,"resourceTiming":[{"duration":337,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":614.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":614.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":951.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":336.7999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":614.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":614.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":951.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":1853.1999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":614.7000002861023,"connectEnd":614.7000002861023,"connectStart":614.7000002861023,"domainLookupEnd":614.7000002861023,"domainLookupStart":614.7000002861023,"fetchStart":614.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":955.4000000953674,"responseEnd":2467.9000000953674,"responseStart":1305.7000002861023,"secureConnectionStart":614.7000002861023},{"duration":2560.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":615.1000003814697,"connectEnd":615.1000003814697,"connectStart":615.1000003814697,"domainLookupEnd":615.1000003814697,"domainLookupStart":615.1000003814697,"fetchStart":615.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":958.2000002861023,"responseEnd":3176,"responseStart":1425.5,"secureConnectionStart":615.1000003814697},{"duration":962.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":615.3000001907349,"connectEnd":615.3000001907349,"connectStart":615.3000001907349,"domainLookupEnd":615.3000001907349,"domainLookupStart":615.3000001907349,"fetchStart":615.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":959,"responseEnd":1578.2000002861023,"responseStart":1497.9000000953674,"secureConnectionStart":615.3000001907349},{"duration":963.2000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":615.4000000953674,"connectEnd":615.4000000953674,"connectStart":615.4000000953674,"domainLookupEnd":615.4000000953674,"domainLookupStart":615.4000000953674,"fetchStart":615.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":959.2000002861023,"responseEnd":1578.6000003814697,"responseStart":1553.2000002861023,"secureConnectionStart":615.4000000953674},{"duration":963.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":615.6000003814697,"connectEnd":615.6000003814697,"connectStart":615.6000003814697,"domainLookupEnd":615.6000003814697,"domainLookupStart":615.6000003814697,"fetchStart":615.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":961.4000000953674,"responseEnd":1579,"responseStart":1559.7000002861023,"secureConnectionStart":615.6000003814697},{"duration":342.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":615.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":615.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":958.5,"responseStart":0,"secureConnectionStart":0},{"duration":1113.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":616.1000003814697,"connectEnd":616.1000003814697,"connectStart":616.1000003814697,"domainLookupEnd":616.1000003814697,"domainLookupStart":616.1000003814697,"fetchStart":616.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":962,"responseEnd":1729.4000000953674,"responseStart":1580.6000003814697,"secureConnectionStart":616.1000003814697},{"duration":344.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":616.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":616.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":960.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":1113.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":616.3000001907349,"connectEnd":616.3000001907349,"connectStart":616.3000001907349,"domainLookupEnd":616.3000001907349,"domainLookupStart":616.3000001907349,"fetchStart":616.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":966.5,"responseEnd":1729.6000003814697,"responseStart":1581.6000003814697,"secureConnectionStart":616.3000001907349},{"duration":2403.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":626.4000000953674,"connectEnd":626.4000000953674,"connectStart":626.4000000953674,"domainLookupEnd":626.4000000953674,"domainLookupStart":626.4000000953674,"fetchStart":626.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1198.9000000953674,"responseEnd":3029.5,"responseStart":2791.5,"secureConnectionStart":626.4000000953674},{"duration":2404.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":626.5,"connectEnd":626.5,"connectStart":626.5,"domainLookupEnd":626.5,"domainLookupStart":626.5,"fetchStart":626.5,"redirectEnd":0,"redirectStart":0,"requestStart":1423.9000000953674,"responseEnd":3031.1000003814697,"responseStart":3025.4000000953674,"secureConnectionStart":626.5},{"duration":349.69999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":2691.800000190735,"connectEnd":2691.800000190735,"connectStart":2691.800000190735,"domainLookupEnd":2691.800000190735,"domainLookupStart":2691.800000190735,"fetchStart":2691.800000190735,"redirectEnd":0,"redirectStart":0,"requestStart":2691.800000190735,"responseEnd":3041.5,"responseStart":3041.5,"secureConnectionStart":2691.800000190735}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":76,"responseStart":574,"responseEnd":671,"domLoading":587,"domInteractive":3791,"domContentLoadedEventStart":3791,"domContentLoadedEventEnd":3845,"domComplete":5307,"loadEventStart":5307,"loadEventEnd":5309,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":3769.300000190735},{"name":"bigPipe.sidebar-id.end","time":3770.1000003814697},{"name":"bigPipe.activity-panel-pipe-id.start","time":3770.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":3773},{"name":"activityTabFullyLoaded","time":3849.800000190735}],"measures":[],"correlationId":"5687aeb20a3882","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":110,"dbReadsTimeInMs":9,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}