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
Transition |
Time In Source Status |
Execution Times |
Open |
|
In Progress |
|
195d 7h 15m
|
1
|
In Progress |
|
Closed |
|
47m 48s
|
1
|
{"report":{"fcp":951.0999999642372,"ttfb":274.7999999523163,"pageVisibility":"visible","entityId":61184,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"d8181e4d-8bd2-4c29-9618-a778557e0586","navigationType":0,"readyForUser":1025.2999999523163,"redirectCount":0,"resourceLoadedEnd":662.1999999880791,"resourceLoadedStart":282.5,"resourceTiming":[{"duration":98.89999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":282.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":282.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":381.39999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":99.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":282.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":282.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":381.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":253.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":282.89999997615814,"connectEnd":282.89999997615814,"connectStart":282.89999997615814,"domainLookupEnd":282.89999997615814,"domainLookupStart":282.89999997615814,"fetchStart":282.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":385,"responseEnd":536,"responseStart":400.19999998807907,"secureConnectionStart":282.89999997615814},{"duration":379.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":283.0999999642372,"connectEnd":283.0999999642372,"connectStart":283.0999999642372,"domainLookupEnd":283.0999999642372,"domainLookupStart":283.0999999642372,"fetchStart":283.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":387.39999997615814,"responseEnd":662.1999999880791,"responseStart":403.89999997615814,"secureConnectionStart":283.0999999642372},{"duration":127.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":283.2999999523163,"connectEnd":283.2999999523163,"connectStart":283.2999999523163,"domainLookupEnd":283.2999999523163,"domainLookupStart":283.2999999523163,"fetchStart":283.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":388.39999997615814,"responseEnd":410.5,"responseStart":406.39999997615814,"secureConnectionStart":283.2999999523163},{"duration":127.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":283.5,"connectEnd":283.5,"connectStart":283.5,"domainLookupEnd":283.5,"domainLookupStart":283.5,"fetchStart":283.5,"redirectEnd":0,"redirectStart":0,"requestStart":389,"responseEnd":410.7999999523163,"responseStart":408.39999997615814,"secureConnectionStart":283.5},{"duration":128.80000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":283.69999998807907,"connectEnd":283.69999998807907,"connectStart":283.69999998807907,"domainLookupEnd":283.69999998807907,"domainLookupStart":283.69999998807907,"fetchStart":283.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":389.5,"responseEnd":412.5,"responseStart":411.19999998807907,"secureConnectionStart":283.69999998807907},{"duration":103.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":283.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":283.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":387,"responseStart":0,"secureConnectionStart":0},{"duration":132.30000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":284.0999999642372,"connectEnd":284.0999999642372,"connectStart":284.0999999642372,"domainLookupEnd":284.0999999642372,"domainLookupStart":284.0999999642372,"fetchStart":284.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":393.7999999523163,"responseEnd":416.39999997615814,"responseStart":414.39999997615814,"secureConnectionStart":284.0999999642372},{"duration":106.70000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":284.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":284.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":391,"responseStart":0,"secureConnectionStart":0},{"duration":134.30000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":284.39999997615814,"connectEnd":284.39999997615814,"connectStart":284.39999997615814,"domainLookupEnd":284.39999997615814,"domainLookupStart":284.39999997615814,"fetchStart":284.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":395.19999998807907,"responseEnd":418.69999998807907,"responseStart":416.69999998807907,"secureConnectionStart":284.39999997615814},{"duration":339.9000000357628,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":287.2999999523163,"connectEnd":287.2999999523163,"connectStart":287.2999999523163,"domainLookupEnd":287.2999999523163,"domainLookupStart":287.2999999523163,"fetchStart":287.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":474.69999998807907,"responseEnd":627.1999999880791,"responseStart":619.8999999761581,"secureConnectionStart":287.2999999523163},{"duration":341.19999998807907,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":287.39999997615814,"connectEnd":287.39999997615814,"connectStart":287.39999997615814,"domainLookupEnd":287.39999997615814,"domainLookupStart":287.39999997615814,"fetchStart":287.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":547.6999999880791,"responseEnd":628.5999999642372,"responseStart":623.3999999761581,"secureConnectionStart":287.39999997615814},{"duration":71.19999998807907,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":673.6999999880791,"connectEnd":673.6999999880791,"connectStart":673.6999999880791,"domainLookupEnd":673.6999999880791,"domainLookupStart":673.6999999880791,"fetchStart":673.6999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":708.5999999642372,"responseEnd":744.8999999761581,"responseStart":744.1999999880791,"secureConnectionStart":673.6999999880791}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":89,"responseStart":275,"responseEnd":283,"domLoading":278,"domInteractive":1077,"domContentLoadedEventStart":1077,"domContentLoadedEventEnd":1122,"domComplete":1743,"loadEventStart":1743,"loadEventEnd":1743,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1060.0999999642372},{"name":"bigPipe.sidebar-id.end","time":1060.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":1060.8999999761581},{"name":"bigPipe.activity-panel-pipe-id.end","time":1061.7999999523163},{"name":"activityTabFullyLoaded","time":1139.7999999523163}],"measures":[],"correlationId":"4d18197b5afd4f","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":95,"dbReadsTimeInMs":15,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}