Type:
New Feature
Priority:
Minor
Resolution:
Unresolved
Fix Version/s:
None
Identifier names can't contain characters outside of BMP, i.e they are restricted to utf8mb3
Here is a relevant part of Slack discussion on why it is so, and on possible fix
... discussion on character_set_system and why it is utf8mb3...
....
bar Oct 13th, 2021 at 4:23 PM
@wlad yes, it's hard-coded. I think the biggest problem is to implement table-name-to-file-name encoding for non-BMP characters. Should be doable but needs some time.
5 replies
wlad 3 months ago
so, a surrogate pair won't do? like, @d801@dc37
bar 3 months ago
for characters that do not have lower/upper variants, it will do.
bar 3 months ago
It will actually do for characters that have lower/upper variants as well.
bar 3 months ago
Thanks for the good idea.
Table name to file name extensions overview
We need to extend the encoding to support:
new case folding in the BMP range appeared between Unicode-3.0.0 (used in the first version of the encoding) and Unicode-14.0.0 (the current version in MariaDB).
non-BMP characters in the range U+010000 to U+10FFFF without case folding
non-BMP characters in the range U+010000 to U+10FFFF with case folding
Various proposals go in separate comments below.
Unicode planes allowed in identifiers
As of version 14.0.0 (and 16.0.0) Unicode plane assignment looks as follow:
PlaneN Code Range Abbr Name
------ ------------ ---- --------------------------------------
0 0000-FFFF BMP Basic Multilingual Plane
1 10000-1FFFF SMP Supplementary Multilingual Plane
2 20000-2FFFF SIP Supplementary Ideographic Plane
3 30000-3FFFF TIP Tertiary Ideographic Plane
4-13 40000-DFFFF --- unassigned
14 E0000-EFFFF SSP Supplementary Special-purpose Plane
15-16 F0000-10FFFF SPUA-A/B Supplementary Private Use Area planes
It is an open question whether we should support unassigned planes in identifiers (and in table file name encoding), or should limit to assigned planes only.
Characters with unsafe casefolding
Since the version 3.0.0, Unicode added casefolding rules for a few characters which is not round trip safe: UPPER(ch)<>UPPER(LOWER(ch))
These characters can be extracted using the following script:
CREATE OR REPLACE VIEW v1 AS
SELECT
seq,
char (seq using utf32) collate utf32_uca1400_ai_ci AS ch
FROM seq_1_to_1114111;
SELECT
ch,
hex(ch) AS cu,
upper (ch) AS u,
hex( upper (ch)) AS uc,
upper ( lower (ch)) u2,
hex( upper ( lower (ch))) AS u2c
FROM v1
WHERE upper (ch) collate utf32_bin<> upper ( lower (ch)) collate utf32_bin;
+------+----------+------+----------+------+----------+
| ch | cu | u | uc | u2 | u2c |
+------+----------+------+----------+------+----------+
| İ | 00000130 | İ | 00000130 | I | 00000049 | LATIN CAPITAL LETTER I WITH DOT ABOVE
| ϴ | 000003F4 | ϴ | 000003F4 | Θ | 00000398 | GREEK CAPITAL THETA SYMBOL
| ẞ | 00001E9E | ẞ | 00001E9E | ß | 000000DF | LATIN CAPITAL LETTER SHARP S
| Ω | 00002126 | Ω | 00002126 | Ω | 000003A9 | OHM SIGN
| K | 0000212A | K | 0000212A | K | 0000004B | KELVIN SIGN
| â„« | 0000212B | â„« | 0000212B | Ã… | 000000C5 | ANGSTROM SIGN
+------+----------+------+----------+------+----------+
Let's consider this pair as an example:
UPPER(U+2126 OHM SIGN) = U+2126 OHM SIGN
UPPER(LOWER(U+2126 OHM SIGN)) = U+03A9 GREEK CAPITAL LETTER OMEGA
There are two options how to encode these characters
As not having case folding. It will preserve the exact character OHM SIGN. But OHM SIGN and GREEK SMALL LETTER OMEGA will be two distinct characters even on a case insensitive file system.
As having case folding. In this case OHM SIGN will be replaced GREEK CAPITAL LETTER OMEGA. It will equal to GREEK SMALL LETTER OMEGA on a case insensitive file system.
{"report":{"fcp":770.1000001430511,"ttfb":178.29999995231628,"pageVisibility":"visible","entityId":106732,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"7f1ea962-f2a9-4ef4-ac1b-be6e69349a35","navigationType":0,"readyForUser":861,"redirectCount":0,"resourceLoadedEnd":899.9000000953674,"resourceLoadedStart":184.29999995231628,"resourceTiming":[{"duration":116,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":184.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":184.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":300.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":115.69999980926514,"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":184.60000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":184.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":300.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":124.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":184.60000014305115,"connectEnd":184.60000014305115,"connectStart":184.60000014305115,"domainLookupEnd":184.60000014305115,"domainLookupStart":184.60000014305115,"fetchStart":184.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":184.60000014305115,"responseEnd":309.2999999523163,"responseStart":309.2999999523163,"secureConnectionStart":184.60000014305115},{"duration":192.30000019073486,"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":184.79999995231628,"connectEnd":184.79999995231628,"connectStart":184.79999995231628,"domainLookupEnd":184.79999995231628,"domainLookupStart":184.79999995231628,"fetchStart":184.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":184.79999995231628,"responseEnd":377.10000014305115,"responseStart":377.10000014305115,"secureConnectionStart":184.79999995231628},{"duration":195.79999995231628,"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":184.90000009536743,"connectEnd":184.90000009536743,"connectStart":184.90000009536743,"domainLookupEnd":184.90000009536743,"domainLookupStart":184.90000009536743,"fetchStart":184.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":184.90000009536743,"responseEnd":380.7000000476837,"responseStart":380.60000014305115,"secureConnectionStart":184.90000009536743},{"duration":196.40000009536743,"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":185,"connectEnd":185,"connectStart":185,"domainLookupEnd":185,"domainLookupStart":185,"fetchStart":185,"redirectEnd":0,"redirectStart":0,"requestStart":185,"responseEnd":381.40000009536743,"responseStart":381.40000009536743,"secureConnectionStart":185},{"duration":197.59999990463257,"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":185.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":185.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":382.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":196.89999985694885,"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":185.10000014305115,"connectEnd":185.10000014305115,"connectStart":185.10000014305115,"domainLookupEnd":185.10000014305115,"domainLookupStart":185.10000014305115,"fetchStart":185.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":185.10000014305115,"responseEnd":382,"responseStart":382,"secureConnectionStart":185.10000014305115},{"duration":197.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":185.29999995231628,"connectEnd":185.29999995231628,"connectStart":185.29999995231628,"domainLookupEnd":185.29999995231628,"domainLookupStart":185.29999995231628,"fetchStart":185.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":185.29999995231628,"responseEnd":382.7000000476837,"responseStart":382.7000000476837,"secureConnectionStart":185.29999995231628},{"duration":198,"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":185.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":185.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":383.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":197.89999985694885,"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":185.60000014305115,"connectEnd":185.60000014305115,"connectStart":185.60000014305115,"domainLookupEnd":185.60000014305115,"domainLookupStart":185.60000014305115,"fetchStart":185.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":185.60000014305115,"responseEnd":383.5,"responseStart":383.5,"secureConnectionStart":185.60000014305115},{"duration":534.0999999046326,"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":187.20000004768372,"connectEnd":187.20000004768372,"connectStart":187.20000004768372,"domainLookupEnd":187.20000004768372,"domainLookupStart":187.20000004768372,"fetchStart":187.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":187.20000004768372,"responseEnd":721.2999999523163,"responseStart":721.2999999523163,"secureConnectionStart":187.20000004768372},{"duration":534.9000000953674,"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":187.20000004768372,"connectEnd":187.20000004768372,"connectStart":187.20000004768372,"domainLookupEnd":187.20000004768372,"domainLookupStart":187.20000004768372,"fetchStart":187.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":187.20000004768372,"responseEnd":722.1000001430511,"responseStart":722.1000001430511,"secureConnectionStart":187.20000004768372},{"duration":133.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":524,"connectEnd":524,"connectStart":524,"domainLookupEnd":524,"domainLookupStart":524,"fetchStart":524,"redirectEnd":0,"redirectStart":0,"requestStart":524,"responseEnd":657.9000000953674,"responseStart":657.9000000953674,"secureConnectionStart":524},{"duration":173.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/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":721.1000001430511,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":721.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":894.6000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":173.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":722,"connectEnd":722,"connectStart":722,"domainLookupEnd":722,"domainLookupStart":722,"fetchStart":722,"redirectEnd":0,"redirectStart":0,"requestStart":722,"responseEnd":895.2000000476837,"responseStart":895.2000000476837,"secureConnectionStart":722},{"duration":177.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/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.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":722.4000000953674,"connectEnd":722.4000000953674,"connectStart":722.4000000953674,"domainLookupEnd":722.4000000953674,"domainLookupStart":722.4000000953674,"fetchStart":722.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":722.4000000953674,"responseEnd":899.9000000953674,"responseStart":899.9000000953674,"secureConnectionStart":722.4000000953674},{"duration":157.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":752.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":752.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":909.7999999523163,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":18,"responseStart":178,"responseEnd":182,"domLoading":181,"domInteractive":951,"domContentLoadedEventStart":951,"domContentLoadedEventEnd":989,"domComplete":1700,"loadEventStart":1700,"loadEventEnd":1702,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":913.1000001430511},{"name":"bigPipe.sidebar-id.end","time":913.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":913.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":916.2999999523163},{"name":"activityTabFullyLoaded","time":1001.2999999523163}],"measures":[],"correlationId":"18bd98ea5879d8","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":93,"dbReadsTimeInMs":26,"dbConnsTimeInMs":34,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}