In this example, JSON_ARRAYAGG changes Unicode character 0xC2A0 (non-breaking space) to 0xA0:
MariaDB [t]> CREATE TABLE `t1` (`a` text);
|
Query OK, 0 rows affected (0.001 sec)
|
|
MariaDB [t]> INSERT INTO `t1` (`a`) VALUES (UNHEX('58C2A059')); -- X Y
|
Query OK, 1 row affected (0.000 sec)
|
|
MariaDB [t]> SELECT HEX(`a`) FROM `t1`;
|
+----------+
|
| HEX(`a`) |
|
+----------+
|
| 58C2A059 |
|
+----------+
|
1 row in set (0.000 sec)
|
|
MariaDB [t]> SELECT `a` FROM `t1`;
|
+------+
|
| a |
|
+------+
|
| X Y |
|
+------+
|
1 row in set (0.000 sec)
|
|
MariaDB [t]> SELECT HEX(JSON_ARRAY(`a`)) FROM `t1`;
|
+----------------------+
|
| HEX(JSON_ARRAY(`a`)) |
|
+----------------------+
|
| 5B2258C2A059225D |
|
+----------------------+
|
1 row in set (0.000 sec)
|
|
MariaDB [t]> SELECT JSON_ARRAY(`a`) FROM `t1`;
|
+-----------------+
|
| JSON_ARRAY(`a`) |
|
+-----------------+
|
| ["X Y"] |
|
+-----------------+
|
1 row in set (0.000 sec)
|
|
MariaDB [t]> SELECT HEX(JSON_ARRAYAGG(`a`)) FROM `t1`;
|
+-------------------------+
|
| HEX(JSON_ARRAYAGG(`a`)) |
|
+-------------------------+
|
| 5B2258A059225D |
|
+-------------------------+
|
1 row in set (0.000 sec)
|
|
MariaDB [t]> SELECT JSON_ARRAYAGG(`a`) FROM `t1`;
|
+--------------------+
|
| JSON_ARRAYAGG(`a`) |
|
+--------------------+
|
| ["X?Y"] |
|
+--------------------+
|
1 row in set (0.000 sec)
|
{"report":{"fcp":1843.3000001907349,"ttfb":324.40000009536743,"pageVisibility":"visible","entityId":130288,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"3fe4bc38-df62-4c52-955b-ea7050b68be6","navigationType":0,"readyForUser":1961.8000001907349,"redirectCount":0,"resourceLoadedEnd":1528.5,"resourceLoadedStart":346.09999990463257,"resourceTiming":[{"duration":227,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":346.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":346.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":573.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":241.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":346.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":346.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":588,"responseStart":0,"secureConnectionStart":0},{"duration":756.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":346.59999990463257,"connectEnd":346.59999990463257,"connectStart":346.59999990463257,"domainLookupEnd":346.59999990463257,"domainLookupStart":346.59999990463257,"fetchStart":346.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":593,"responseEnd":1102.9000000953674,"responseStart":607.5999999046326,"secureConnectionStart":346.59999990463257},{"duration":1167.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":346.80000019073486,"connectEnd":346.80000019073486,"connectStart":346.80000019073486,"domainLookupEnd":346.80000019073486,"domainLookupStart":346.80000019073486,"fetchStart":346.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":593.4000000953674,"responseEnd":1514.5,"responseStart":608.9000000953674,"secureConnectionStart":346.80000019073486},{"duration":264.7000002861023,"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":347,"connectEnd":347,"connectStart":347,"domainLookupEnd":347,"domainLookupStart":347,"fetchStart":347,"redirectEnd":0,"redirectStart":0,"requestStart":593.7000002861023,"responseEnd":611.7000002861023,"responseStart":610.4000000953674,"secureConnectionStart":347},{"duration":264.5,"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":347.2000002861023,"connectEnd":347.2000002861023,"connectStart":347.2000002861023,"domainLookupEnd":347.2000002861023,"domainLookupStart":347.2000002861023,"fetchStart":347.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":593.5999999046326,"responseEnd":611.7000002861023,"responseStart":609.7000002861023,"secureConnectionStart":347.2000002861023},{"duration":272.30000019073486,"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":347.40000009536743,"connectEnd":347.40000009536743,"connectStart":347.40000009536743,"domainLookupEnd":347.40000009536743,"domainLookupStart":347.40000009536743,"fetchStart":347.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":596.0999999046326,"responseEnd":619.7000002861023,"responseStart":611.8000001907349,"secureConnectionStart":347.40000009536743},{"duration":241.39999961853027,"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":347.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":347.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":589.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":272.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":347.90000009536743,"connectEnd":347.90000009536743,"connectStart":347.90000009536743,"domainLookupEnd":347.90000009536743,"domainLookupStart":347.90000009536743,"fetchStart":347.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":596.3000001907349,"responseEnd":620.2000002861023,"responseStart":614.9000000953674,"secureConnectionStart":347.90000009536743},{"duration":241.40000009536743,"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":348,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":348,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":589.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":274.5,"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":348.2000002861023,"connectEnd":348.2000002861023,"connectStart":348.2000002861023,"domainLookupEnd":348.2000002861023,"domainLookupStart":348.2000002861023,"fetchStart":348.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":596.7000002861023,"responseEnd":622.7000002861023,"responseStart":616.0999999046326,"secureConnectionStart":348.2000002861023},{"duration":1179.3000001907349,"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":349,"connectEnd":349,"connectStart":349,"domainLookupEnd":349,"domainLookupStart":349,"fetchStart":349,"redirectEnd":0,"redirectStart":0,"requestStart":910.3000001907349,"responseEnd":1528.3000001907349,"responseStart":1521.9000000953674,"secureConnectionStart":349},{"duration":1175,"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":353.5,"connectEnd":353.5,"connectStart":353.5,"domainLookupEnd":353.5,"domainLookupStart":353.5,"fetchStart":353.5,"redirectEnd":0,"redirectStart":0,"requestStart":913.3000001907349,"responseEnd":1528.5,"responseStart":1522.4000000953674,"secureConnectionStart":353.5},{"duration":373.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1269.0999999046326,"connectEnd":1269.0999999046326,"connectStart":1269.0999999046326,"domainLookupEnd":1269.0999999046326,"domainLookupStart":1269.0999999046326,"fetchStart":1269.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1609.7000002861023,"responseEnd":1643,"responseStart":1641.4000000953674,"secureConnectionStart":1269.0999999046326},{"duration":331,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1767.9000000953674,"connectEnd":1767.9000000953674,"connectStart":1767.9000000953674,"domainLookupEnd":1767.9000000953674,"domainLookupStart":1767.9000000953674,"fetchStart":1767.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":2065.0999999046326,"responseEnd":2098.9000000953674,"responseStart":2098.300000190735,"secureConnectionStart":1767.9000000953674}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":139,"responseStart":324,"responseEnd":351,"domLoading":343,"domInteractive":2109,"domContentLoadedEventStart":2109,"domContentLoadedEventEnd":2172,"domComplete":2636,"loadEventStart":2636,"loadEventEnd":2637,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2070.300000190735},{"name":"bigPipe.sidebar-id.end","time":2071.2000002861023},{"name":"bigPipe.activity-panel-pipe-id.start","time":2071.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":2080},{"name":"activityTabFullyLoaded","time":2186.0999999046326}],"measures":[],"correlationId":"5b60e3663eb083","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":94,"dbReadsTimeInMs":10,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I'm not seeing this on 10.5, 10.6, 10.11 (below), 11.4 https://sqlize.online/sql/mariadb114/10c1f8e4ab2be588741941f1a3393ac8/ or very latest ( 11.8.0 beta)
MariaDB [test]> SELECT HEX(JSON_ARRAYAGG(`a`)) FROM `t1`;
+-------------------------+
| HEX(JSON_ARRAYAGG(`a`)) |
+-------------------------+
| 5B2258C2A059225D |
+-------------------------+
1 row in set (0.003 sec)
MariaDB [test]> SELECT JSON_ARRAYAGG(`a`) FROM `t1`;
+--------------------+
| JSON_ARRAYAGG(`a`) |
+--------------------+
| ["X Y"] |
+--------------------+
1 row in set (0.002 sec)
MariaDB [test]> \s
--------------
client/mariadb Ver 15.1 Distrib 10.11.11-MariaDB, for Linux (x86_64) using EditLine wrapper
Connection id: 3
Current database: test
Current user: dan@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 10.11.11-MariaDB Source distribution
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8mb3
Conn. characterset: utf8mb3
So I'm assuming its been fixed in our maintained versions. If there's a charset/aggregation setting having an effect please reopen this.