In Linux console, I run
SET NAMES utf8;
|
SELECT CHAR(0xDF USING latin1);
|
+-------------------------+
|
| CHAR(0xDF USING latin1) |
|
+-------------------------+
|
| ß |
|
+-------------------------+
|
Notice, it correctly returned LATIN SMALL LETTER SHARP S.
Now I put the same expression into a view and query the view:
CREATE OR REPLACE VIEW v1 AS SELECT CHAR(0xDF USING latin1) AS c;
|
SELECT * FROM v1;
|
+---+
|
| c |
|
+---+
|
| � |
|
+---+
|
Notice, it returned some garbage (Linux console changed garbage to U+FFFD REPLACEMENT CHARACTER).
Looks wrong. The expected result is to return the same SHARP S character.
The problem is that Item_func_char::print() does not display the USING clause:
+------+------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
| View | Create View | character_set_client | collation_connection |
|
+------+------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
| v1 | CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select char(0xdf) AS `c` | utf8 | utf8_general_ci |
|
+------+------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
Notice, it prints:
It should print:
- relates to
-
MDEV-12680
Crash when CREATE TABLE t1 AS SELECT char(100 using filename)
-
-
Closed
There are no comments yet on this issue.
{"report":{"fcp":1119.7000000476837,"ttfb":295.5,"pageVisibility":"visible","entityId":61184,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"930ae4b0-55c9-493f-bb1c-dc30ac52ee3f","navigationType":0,"readyForUser":1222.8999998569489,"redirectCount":0,"resourceLoadedEnd":860.5999999046326,"resourceLoadedStart":304.09999990463257,"resourceTiming":[{"duration":62.700000047683716,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":304.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":366.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":68.20000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":304.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":372.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":431.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":304.7000000476837,"connectEnd":304.7000000476837,"connectStart":304.7000000476837,"domainLookupEnd":304.7000000476837,"domainLookupStart":304.7000000476837,"fetchStart":304.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":380.7000000476837,"responseEnd":735.7999999523163,"responseStart":399.7000000476837,"secureConnectionStart":304.7000000476837},{"duration":543.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":304.7999999523163,"connectEnd":304.7999999523163,"connectStart":304.7999999523163,"domainLookupEnd":304.7999999523163,"domainLookupStart":304.7999999523163,"fetchStart":304.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":381.39999985694885,"responseEnd":848.0999999046326,"responseStart":394.2000000476837,"secureConnectionStart":304.7999999523163},{"duration":101.5,"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":305.09999990463257,"connectEnd":305.09999990463257,"connectStart":305.09999990463257,"domainLookupEnd":305.09999990463257,"domainLookupStart":305.09999990463257,"fetchStart":305.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":386.2000000476837,"responseEnd":406.59999990463257,"responseStart":403.2999999523163,"secureConnectionStart":305.09999990463257},{"duration":102,"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":305.2000000476837,"connectEnd":305.2000000476837,"connectStart":305.2000000476837,"domainLookupEnd":305.2000000476837,"domainLookupStart":305.2000000476837,"fetchStart":305.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":386.7000000476837,"responseEnd":407.2000000476837,"responseStart":404.2999999523163,"secureConnectionStart":305.2000000476837},{"duration":106.89999985694885,"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":305.5,"connectEnd":305.5,"connectStart":305.5,"domainLookupEnd":305.5,"domainLookupStart":305.5,"fetchStart":305.5,"redirectEnd":0,"redirectStart":0,"requestStart":387.89999985694885,"responseEnd":412.39999985694885,"responseStart":409.39999985694885,"secureConnectionStart":305.5},{"duration":80.39999985694885,"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":305.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":305.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":386.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":106.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":305.7999999523163,"connectEnd":305.7999999523163,"connectStart":305.7999999523163,"domainLookupEnd":305.7999999523163,"domainLookupStart":305.7999999523163,"fetchStart":305.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":388.89999985694885,"responseEnd":412.5,"responseStart":410.09999990463257,"secureConnectionStart":305.7999999523163},{"duration":81.5,"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":306,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":306,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":387.5,"responseStart":0,"secureConnectionStart":0},{"duration":114.40000009536743,"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":306.09999990463257,"connectEnd":306.09999990463257,"connectStart":306.09999990463257,"domainLookupEnd":306.09999990463257,"domainLookupStart":306.09999990463257,"fetchStart":306.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":389.5,"responseEnd":420.5,"responseStart":410.59999990463257,"secureConnectionStart":306.09999990463257},{"duration":540.8999998569489,"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":314,"connectEnd":314,"connectStart":314,"domainLookupEnd":314,"domainLookupStart":314,"fetchStart":314,"redirectEnd":0,"redirectStart":0,"requestStart":564.3999998569489,"responseEnd":854.8999998569489,"responseStart":851,"secureConnectionStart":314},{"duration":545.3999998569489,"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":315.2000000476837,"connectEnd":315.2000000476837,"connectStart":315.2000000476837,"domainLookupEnd":315.2000000476837,"domainLookupStart":315.2000000476837,"fetchStart":315.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":679,"responseEnd":860.5999999046326,"responseStart":855.7999999523163,"secureConnectionStart":315.2000000476837},{"duration":219.89999985694885,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":871.7000000476837,"connectEnd":871.7000000476837,"connectStart":871.7000000476837,"domainLookupEnd":871.7000000476837,"domainLookupStart":871.7000000476837,"fetchStart":871.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1058,"responseEnd":1091.5999999046326,"responseStart":1090.8999998569489,"secureConnectionStart":871.7000000476837}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":120,"responseStart":295,"responseEnd":315,"domLoading":299,"domInteractive":1278,"domContentLoadedEventStart":1278,"domContentLoadedEventEnd":1321,"domComplete":2854,"loadEventStart":2854,"loadEventEnd":2854,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1262.2000000476837},{"name":"bigPipe.sidebar-id.end","time":1263},{"name":"bigPipe.activity-panel-pipe-id.start","time":1263.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":1263.5999999046326},{"name":"activityTabFullyLoaded","time":1328.5999999046326}],"measures":[],"correlationId":"178461ec2a89d8","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":94,"dbReadsTimeInMs":12,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}