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
{"report":{"fcp":831.7999999821186,"ttfb":224.5,"pageVisibility":"visible","entityId":50323,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"67f92501-d724-44bd-975f-be11e0194928","navigationType":0,"readyForUser":898,"redirectCount":0,"resourceLoadedEnd":580.1999999880791,"resourceLoadedStart":244.69999998807907,"resourceTiming":[{"duration":7.4000000059604645,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":244.69999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":244.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":252.09999999403954,"responseStart":0,"secureConnectionStart":0},{"duration":7.5,"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":245,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":245,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":252.5,"responseStart":0,"secureConnectionStart":0},{"duration":208.80000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":245.19999998807907,"connectEnd":245.19999998807907,"connectStart":245.19999998807907,"domainLookupEnd":245.19999998807907,"domainLookupStart":245.19999998807907,"fetchStart":245.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":258.09999999403954,"responseEnd":454,"responseStart":279.7999999821186,"secureConnectionStart":245.19999998807907},{"duration":334.40000000596046,"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":245.7999999821186,"connectEnd":255.39999997615814,"connectStart":255.39999997615814,"domainLookupEnd":255.39999997615814,"domainLookupStart":255.39999997615814,"fetchStart":245.7999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":255.7999999821186,"responseEnd":580.1999999880791,"responseStart":268,"secureConnectionStart":255.39999997615814},{"duration":40.89999997615814,"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":246,"connectEnd":246,"connectStart":246,"domainLookupEnd":246,"domainLookupStart":246,"fetchStart":246,"redirectEnd":0,"redirectStart":0,"requestStart":258.5,"responseEnd":286.89999997615814,"responseStart":283,"secureConnectionStart":246},{"duration":40.5,"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":246.19999998807907,"connectEnd":246.19999998807907,"connectStart":246.19999998807907,"domainLookupEnd":246.19999998807907,"domainLookupStart":246.19999998807907,"fetchStart":246.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":258.7999999821186,"responseEnd":286.69999998807907,"responseStart":282.19999998807907,"secureConnectionStart":246.19999998807907},{"duration":35.400000005960464,"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":246.2999999821186,"connectEnd":246.2999999821186,"connectStart":246.2999999821186,"domainLookupEnd":246.2999999821186,"domainLookupStart":246.2999999821186,"fetchStart":246.2999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":259.7999999821186,"responseEnd":281.69999998807907,"responseStart":278.89999997615814,"secureConnectionStart":246.2999999821186},{"duration":12.899999976158142,"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":246.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":246.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":259.39999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":41,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":246.59999999403954,"connectEnd":246.59999999403954,"connectStart":246.59999999403954,"domainLookupEnd":246.59999999403954,"domainLookupStart":246.59999999403954,"fetchStart":246.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":261.2999999821186,"responseEnd":287.59999999403954,"responseStart":284,"secureConnectionStart":246.59999999403954},{"duration":13.900000005960464,"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":246.69999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":246.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":260.59999999403954,"responseStart":0,"secureConnectionStart":0},{"duration":41.20000001788139,"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":246.89999997615814,"connectEnd":246.89999997615814,"connectStart":246.89999997615814,"domainLookupEnd":246.89999997615814,"domainLookupStart":246.89999997615814,"fetchStart":246.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":263.09999999403954,"responseEnd":288.09999999403954,"responseStart":285.19999998807907,"secureConnectionStart":246.89999997615814},{"duration":319.7999999821186,"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":254.59999999403954,"connectEnd":254.59999999403954,"connectStart":254.59999999403954,"domainLookupEnd":254.59999999403954,"domainLookupStart":254.59999999403954,"fetchStart":254.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":300.09999999403954,"responseEnd":574.3999999761581,"responseStart":567.1999999880791,"secureConnectionStart":254.59999999403954},{"duration":319.59999999403954,"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":254.59999999403954,"connectEnd":254.59999999403954,"connectStart":254.59999999403954,"domainLookupEnd":254.59999999403954,"domainLookupStart":254.59999999403954,"fetchStart":254.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":297.39999997615814,"responseEnd":574.1999999880791,"responseStart":566.0999999940395,"secureConnectionStart":254.59999999403954},{"duration":118.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":594.5999999940395,"connectEnd":594.5999999940395,"connectStart":594.5999999940395,"domainLookupEnd":594.5999999940395,"domainLookupStart":594.5999999940395,"fetchStart":594.5999999940395,"redirectEnd":0,"redirectStart":0,"requestStart":678.5,"responseEnd":713.0999999940395,"responseStart":711.6999999880791,"secureConnectionStart":594.5999999940395}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":67,"responseStart":225,"responseEnd":254,"domLoading":228,"domInteractive":983,"domContentLoadedEventStart":983,"domContentLoadedEventEnd":1025,"domComplete":2185,"loadEventStart":2185,"loadEventEnd":2185,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":965.5},{"name":"bigPipe.sidebar-id.end","time":966.2999999821186},{"name":"bigPipe.activity-panel-pipe-id.start","time":966.3999999761581},{"name":"bigPipe.activity-panel-pipe-id.end","time":968.6999999880791},{"name":"activityTabFullyLoaded","time":1035.199999988079}],"measures":[],"correlationId":"ed95be3363f26d","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":89,"dbReadsTimeInMs":9,"dbConnsTimeInMs":16,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}