-
Bug
-
-
Major
-
Resolution:
Unresolved
-
10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4, 11.5(EOL)
-
-
-
JSON_EXTRACT function prints the output as NULL when setting character sets with mbminlen > 1
Character sets with mbminlen > 1
11.5.0-dbg>set character_set_connection=ucs2;
|
Query OK, 0 rows affected (0.000 sec)
|
Actual result
11.5.0-dbg>SELECT JSON_EXTRACT('{"a": 1,"b": 2}','$.a');
|
+---------------------------------------+
|
| JSON_EXTRACT('{"a": 1,"b": 2}','$.a') |
|
+---------------------------------------+
|
| NULL |
|
+---------------------------------------+
|
1 row in set, 1 warning (0.000 sec)
|
|
11.5.0-dbg>
|
Expected result
11.5.0-dbg>SELECT JSON_EXTRACT('{"a": 1,"b": 2}','$.a');
|
+---------------------------------------+
|
| JSON_EXTRACT('{"a": 1,"b": 2}','$.a') |
|
+---------------------------------------+
|
| 1 |
|
+---------------------------------------+
|
1 row in set (0.000 sec)
|
|
11.5.0-dbg>
|
Character sets with mbminlen = 1
11.5.0-dbg>set character_set_connection=utf8;
|
Query OK, 0 rows affected (0.000 sec)
|
|
11.5.0-dbg>SELECT JSON_EXTRACT('{"a": 1,"b": 2}','$.a');
|
+---------------------------------------+
|
| JSON_EXTRACT('{"a": 1,"b": 2}','$.a') |
|
+---------------------------------------+
|
| 1 |
|
+---------------------------------------+
|
1 row in set (0.000 sec)
|
|
11.5.0-dbg>
|
- relates to
-
MDEV-34143
Server crashes when executing JSON_EXTRACT after setting non-default collation_connection
-
-
Closed
{"report":{"fcp":946.7999997138977,"ttfb":281,"pageVisibility":"visible","entityId":129159,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"e116ce1c-f076-4c87-b026-713b3ca1578c","navigationType":0,"readyForUser":1036.5999999046326,"redirectCount":0,"resourceLoadedEnd":657.5,"resourceLoadedStart":297.59999990463257,"resourceTiming":[{"duration":13.900000095367432,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":297.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":297.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":311.5,"responseStart":0,"secureConnectionStart":0},{"duration":14,"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":297.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":297.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":311.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":213.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":298.09999990463257,"connectEnd":298.09999990463257,"connectStart":298.09999990463257,"domainLookupEnd":298.09999990463257,"domainLookupStart":298.09999990463257,"fetchStart":298.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":321.5,"responseEnd":511.69999980926514,"responseStart":344.5,"secureConnectionStart":298.09999990463257},{"duration":358.80000019073486,"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":298.69999980926514,"connectEnd":298.69999980926514,"connectStart":298.69999980926514,"domainLookupEnd":298.69999980926514,"domainLookupStart":298.69999980926514,"fetchStart":298.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":321.59999990463257,"responseEnd":657.5,"responseStart":348.19999980926514,"secureConnectionStart":298.69999980926514},{"duration":54.19999980926514,"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":298.90000009536743,"connectEnd":298.90000009536743,"connectStart":298.90000009536743,"domainLookupEnd":298.90000009536743,"domainLookupStart":298.90000009536743,"fetchStart":298.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":323.5,"responseEnd":353.09999990463257,"responseStart":350.59999990463257,"secureConnectionStart":298.90000009536743},{"duration":53.90000009536743,"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":299.09999990463257,"connectEnd":299.09999990463257,"connectStart":299.09999990463257,"domainLookupEnd":299.09999990463257,"domainLookupStart":299.09999990463257,"fetchStart":299.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":322.7999997138977,"responseEnd":353,"responseStart":350.09999990463257,"secureConnectionStart":299.09999990463257},{"duration":54.09999990463257,"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":299.19999980926514,"connectEnd":299.19999980926514,"connectStart":299.19999980926514,"domainLookupEnd":299.19999980926514,"domainLookupStart":299.19999980926514,"fetchStart":299.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":325.40000009536743,"responseEnd":353.2999997138977,"responseStart":351,"secureConnectionStart":299.19999980926514},{"duration":20.59999990463257,"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":299.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":299.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":320,"responseStart":0,"secureConnectionStart":0},{"duration":53.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":299.59999990463257,"connectEnd":299.59999990463257,"connectStart":299.59999990463257,"domainLookupEnd":299.59999990463257,"domainLookupStart":299.59999990463257,"fetchStart":299.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":326.90000009536743,"responseEnd":353.2999997138977,"responseStart":351.40000009536743,"secureConnectionStart":299.59999990463257},{"duration":21.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":299.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":299.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":321.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":58.299999713897705,"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":299.90000009536743,"connectEnd":299.90000009536743,"connectStart":299.90000009536743,"domainLookupEnd":299.90000009536743,"domainLookupStart":299.90000009536743,"fetchStart":299.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":327.09999990463257,"responseEnd":358.19999980926514,"responseStart":351.90000009536743,"secureConnectionStart":299.90000009536743},{"duration":22.40000009536743,"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":339.5,"connectEnd":339.5,"connectStart":339.5,"domainLookupEnd":339.5,"domainLookupStart":339.5,"fetchStart":339.5,"redirectEnd":0,"redirectStart":0,"requestStart":339.5,"responseEnd":361.90000009536743,"responseStart":361.90000009536743,"secureConnectionStart":339.5},{"duration":31.40000009536743,"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":363.69999980926514,"connectEnd":363.69999980926514,"connectStart":363.69999980926514,"domainLookupEnd":363.69999980926514,"domainLookupStart":363.69999980926514,"fetchStart":363.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":363.69999980926514,"responseEnd":395.09999990463257,"responseStart":395.09999990463257,"secureConnectionStart":363.69999980926514},{"duration":103.7999997138977,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":661.4000000953674,"connectEnd":661.4000000953674,"connectStart":661.4000000953674,"domainLookupEnd":661.4000000953674,"domainLookupStart":661.4000000953674,"fetchStart":661.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":729.0999999046326,"responseEnd":765.1999998092651,"responseStart":764.4000000953674,"secureConnectionStart":661.4000000953674},{"duration":199.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":898.7999997138977,"connectEnd":898.7999997138977,"connectStart":898.7999997138977,"domainLookupEnd":898.7999997138977,"domainLookupStart":898.7999997138977,"fetchStart":898.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1059,"responseEnd":1098.0999999046326,"responseStart":1094,"secureConnectionStart":898.7999997138977},{"duration":195.60000038146973,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":938.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":938.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1134.4000000953674,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":34,"domainLookupEnd":43,"connectStart":43,"connectEnd":67,"secureConnectionStart":54,"requestStart":68,"responseStart":281,"responseEnd":363,"domLoading":284,"domInteractive":1217,"domContentLoadedEventStart":1217,"domContentLoadedEventEnd":1301,"domComplete":1536,"loadEventStart":1536,"loadEventEnd":1536,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1139.2999997138977},{"name":"bigPipe.sidebar-id.end","time":1140.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1140.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1147.5},{"name":"activityTabFullyLoaded","time":1320.0999999046326}],"measures":[],"correlationId":"7159ab74a480e","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":115,"dbReadsTimeInMs":17,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
rucha174 Following JSON functions also print NULL/incorrect value when character_sets is set with mbminlen > 1
JSON_ARRAY_APPEND
JSON_ARRAY_INTERSECT
JSON_INSERT
JSON_MERGE
JSON_MERGE_PRESERVE
JSON_OBJECT_FILTER_KEYS
JSON_OBJECT_TO_ARRAY
JSON_OVERLAPS
JSON_SCHEMA_VALID
JSON_SET
JSON_ARRAY_APPEND
------------------
10.6.18-dbg>
JSON_ARRAY_INTERSECT
--------------------
11.5.0-opt>
| json_array_intersect(@json1, @json2) |
JSON_INSERT
-----------
11.5.0-opt>
11.5.0-opt>
JSON_MERGE
----------
11.5.0-opt>
| JSON_MERGE(@json1,@json2) |
11.5.0-opt>
JSON_MERGE_PRESERVE
-------------------
| JSON_MERGE_PRESERVE(@json1,@json2) |
11.5.0-opt>
JSON_OBJECT_FILTER_KEYS
-----------------------
| JSON_OBJECT_FILTER_KEYS (@obj1, JSON_ARRAY_INTERSECT(JSON_KEYS(@obj1), JSON_KEYS(@obj2))) |
11.5.0-opt>
JSON_OBJECT_TO_ARRAY
--------------------
11.5.0-opt>
| JSON_OBJECT_TO_ARRAY(@obj1) |
11.5.0-opt>
JSON_OVERLAPS
--------------
| is_overlap |
| 1 |
| is_overlap |
| 0 |
11.5.0-opt>
JSON_SCHEMA_VALID
-----------------
Query OK, 0 rows affected (0.000 sec)
11.5.0-opt>
+----------------------------------------------------------------+
+----------------------------------------------------------------+
| 1 |
+----------------------------------------------------------------+
1 row in set (0.000 sec)
11.5.0-opt>set character_set_connection=default;
Query OK, 0 rows affected (0.000 sec)
11.5.0-opt>
| 0 |
11.5.0-opt>
JSON_SET
--------
11.5.0-opt>