Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
None
This result is wrong:
mysql> SELECT HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312));
+------------------------------------------------+
| HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312)) |
+------------------------------------------------+
| A341 |
+------------------------------------------------+
1 row in set (1.15 sec)
0xA341 is not a well formed gb2312 byte sequence.
mysql> SELECT _gb2312 0xA341;
ERROR 1300 (HY000): Invalid gb2312 character string: 'A341'
0xA3 is a multi-byte head, but it is not followed by a valid multi-byte tails.
The expected result would be to replace the bad byte 0xA3 to '?' and return 0x3F41.
Additionally, badly formed sequences are converted to something strange during
character set conversion:
mysql> SELECT HEX(CONVERT(CAST(0xA341 AS CHAR CHARACTER SET gb2312) USING utf16));
+---------------------------------------------------------------------+
| HEX(CONVERT(CAST(0xA341 AS CHAR CHARACTER SET gb2312) USING utf16)) |
+---------------------------------------------------------------------+
| FF21 |
+---------------------------------------------------------------------+
1 row in set (0.00 sec)
A341 was converted to "U+FF21 FULLWIDTH LATIN CAPITAL LETTER A", which is wrong.
It seems A341 was erroneously taken as A3C1, which is the correct gb2312 for U+FF21.
is blocked by
MDEV-6566
Different INSERT behaviour on bad bytes with and without character set conversion
Closed
There are no comments yet on this issue.
{"report":{"fcp":794.5,"ttfb":179.39999997615814,"pageVisibility":"visible","entityId":50323,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"feeec86e-b9aa-4f65-bcd3-43e1bf18da37","navigationType":0,"readyForUser":862.3999999761581,"redirectCount":0,"resourceLoadedEnd":886.5,"resourceLoadedStart":184.7999999821186,"resourceTiming":[{"duration":113.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":184.7999999821186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":184.7999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":298.2999999821186,"responseStart":0,"secureConnectionStart":0},{"duration":113.59999999403954,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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","startTime":185,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":185,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":298.59999999403954,"responseStart":0,"secureConnectionStart":0},{"duration":121.80000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":185.19999998807907,"connectEnd":185.19999998807907,"connectStart":185.19999998807907,"domainLookupEnd":185.19999998807907,"domainLookupStart":185.19999998807907,"fetchStart":185.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":185.19999998807907,"responseEnd":307,"responseStart":307,"secureConnectionStart":185.19999998807907},{"duration":182.80000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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","startTime":185.39999997615814,"connectEnd":185.39999997615814,"connectStart":185.39999997615814,"domainLookupEnd":185.39999997615814,"domainLookupStart":185.39999997615814,"fetchStart":185.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":185.39999997615814,"responseEnd":368.19999998807907,"responseStart":368.19999998807907,"secureConnectionStart":185.39999997615814},{"duration":186.2999999821186,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":185.59999999403954,"connectEnd":185.59999999403954,"connectStart":185.59999999403954,"domainLookupEnd":185.59999999403954,"domainLookupStart":185.59999999403954,"fetchStart":185.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":185.59999999403954,"responseEnd":371.89999997615814,"responseStart":371.89999997615814,"secureConnectionStart":185.59999999403954},{"duration":187,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":185.7999999821186,"connectEnd":185.7999999821186,"connectStart":185.7999999821186,"domainLookupEnd":185.7999999821186,"domainLookupStart":185.7999999821186,"fetchStart":185.7999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":185.7999999821186,"responseEnd":372.7999999821186,"responseStart":372.7999999821186,"secureConnectionStart":185.7999999821186},{"duration":187.2999999821186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":186,"connectEnd":186,"connectStart":186,"domainLookupEnd":186,"domainLookupStart":186,"fetchStart":186,"redirectEnd":0,"redirectStart":0,"requestStart":186,"responseEnd":373.2999999821186,"responseStart":373.2999999821186,"secureConnectionStart":186},{"duration":258.59999999403954,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":186.19999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":186.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":444.7999999821186,"responseStart":0,"secureConnectionStart":0},{"duration":187.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":186.2999999821186,"connectEnd":186.2999999821186,"connectStart":186.2999999821186,"domainLookupEnd":186.2999999821186,"domainLookupStart":186.2999999821186,"fetchStart":186.2999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":186.2999999821186,"responseEnd":373.7999999821186,"responseStart":373.7999999821186,"secureConnectionStart":186.2999999821186},{"duration":258.39999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":186.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":186.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":444.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":187.90000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":186.59999999403954,"connectEnd":186.59999999403954,"connectStart":186.59999999403954,"domainLookupEnd":186.59999999403954,"domainLookupStart":186.59999999403954,"fetchStart":186.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":186.59999999403954,"responseEnd":374.5,"responseStart":374.5,"secureConnectionStart":186.59999999403954},{"duration":351.40000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":187.39999997615814,"connectEnd":187.39999997615814,"connectStart":187.39999997615814,"domainLookupEnd":187.39999997615814,"domainLookupStart":187.39999997615814,"fetchStart":187.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":187.39999997615814,"responseEnd":538.7999999821186,"responseStart":538.7999999821186,"secureConnectionStart":187.39999997615814},{"duration":638.8999999761581,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":187.5,"connectEnd":187.5,"connectStart":187.5,"domainLookupEnd":187.5,"domainLookupStart":187.5,"fetchStart":187.5,"redirectEnd":0,"redirectStart":0,"requestStart":187.5,"responseEnd":826.3999999761581,"responseStart":826.3999999761581,"secureConnectionStart":187.5},{"duration":83.59999999403954,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":455.69999998807907,"connectEnd":455.69999998807907,"connectStart":455.69999998807907,"domainLookupEnd":455.69999998807907,"domainLookupStart":455.69999998807907,"fetchStart":455.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":455.69999998807907,"responseEnd":539.2999999821186,"responseStart":539.2999999821186,"secureConnectionStart":455.69999998807907},{"duration":183.30000001192093,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":703.1999999880791,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":703.1999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":886.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":28,"responseStart":180,"responseEnd":181,"domLoading":183,"domInteractive":905,"domContentLoadedEventStart":905,"domContentLoadedEventEnd":940,"domComplete":1441,"loadEventStart":1441,"loadEventEnd":1441,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":897},{"name":"bigPipe.sidebar-id.end","time":897.6999999880791},{"name":"bigPipe.activity-panel-pipe-id.start","time":897.7999999821186},{"name":"bigPipe.activity-panel-pipe-id.end","time":898.2999999821186},{"name":"activityTabFullyLoaded","time":948}],"measures":[],"correlationId":"e47af22027b2fa","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":87,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}