-
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
Ramesh Sivaraman
made changes -
Field |
Original Value |
New Value |
Summary
|
JSON_EXTRACT function prints the output as NULL when setting character sets with mbminlen > 1
|
Some JSON functions print the output as NULL/incorrect when character-sets is set with mbminlen > 1
|
Ramesh Sivaraman
made changes -
Assignee
|
Rucha Deodhar
[ rucha174
]
|
Alexey Botchkov
[ holyfoot
]
|
Julien Fritsch
made changes -
Fix Version/s
|
11.3
[ 28565
]
|
|
Rucha Deodhar
made changes -
Assignee
|
Alexey Botchkov
[ holyfoot
]
|
Alexander Barkov
[ bar
]
|
Julien Fritsch
made changes -
Fix Version/s
|
11.1
[ 28549
]
|
|
Julien Fritsch
made changes -
Fix Version/s
|
11.2(EOL)
[ 28603
]
|
|
{"report":{"fcp":1213.7999999523163,"ttfb":342.2999999523163,"pageVisibility":"visible","entityId":129159,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"f8714b22-a39a-45cb-bb45-bd9af280a670","navigationType":0,"readyForUser":1331.6000001430511,"redirectCount":0,"resourceLoadedEnd":1326.2999999523163,"resourceLoadedStart":382.10000014305115,"resourceTiming":[{"duration":181.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":382.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":382.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":563.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":181.70000004768372,"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":382.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":382.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":564.1000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":248.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":382.60000014305115,"connectEnd":382.60000014305115,"connectStart":382.60000014305115,"domainLookupEnd":382.60000014305115,"domainLookupStart":382.60000014305115,"fetchStart":382.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":382.60000014305115,"responseEnd":631.1000001430511,"responseStart":631.1000001430511,"secureConnectionStart":382.60000014305115},{"duration":371.60000014305115,"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":382.7999999523163,"connectEnd":382.7999999523163,"connectStart":382.7999999523163,"domainLookupEnd":382.7999999523163,"domainLookupStart":382.7999999523163,"fetchStart":382.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":382.7999999523163,"responseEnd":754.4000000953674,"responseStart":754.4000000953674,"secureConnectionStart":382.7999999523163},{"duration":402.90000009536743,"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":383,"connectEnd":383,"connectStart":383,"domainLookupEnd":383,"domainLookupStart":383,"fetchStart":383,"redirectEnd":0,"redirectStart":0,"requestStart":383,"responseEnd":785.9000000953674,"responseStart":785.9000000953674,"secureConnectionStart":383},{"duration":406.59999990463257,"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":383.2000000476837,"connectEnd":383.2000000476837,"connectStart":383.2000000476837,"domainLookupEnd":383.2000000476837,"domainLookupStart":383.2000000476837,"fetchStart":383.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":383.2000000476837,"responseEnd":789.7999999523163,"responseStart":789.7999999523163,"secureConnectionStart":383.2000000476837},{"duration":425.40000009536743,"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":383.2999999523163,"connectEnd":383.2999999523163,"connectStart":383.2999999523163,"domainLookupEnd":383.2999999523163,"domainLookupStart":383.2999999523163,"fetchStart":383.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":383.2999999523163,"responseEnd":808.7000000476837,"responseStart":808.7000000476837,"secureConnectionStart":383.2999999523163},{"duration":469,"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":383.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":383.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":852.5,"responseStart":0,"secureConnectionStart":0},{"duration":426.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":383.7000000476837,"connectEnd":383.7000000476837,"connectStart":383.7000000476837,"domainLookupEnd":383.7000000476837,"domainLookupStart":383.7000000476837,"fetchStart":383.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":383.7000000476837,"responseEnd":810.5,"responseStart":810.5,"secureConnectionStart":383.7000000476837},{"duration":469,"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":383.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":383.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":852.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":427.7000000476837,"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":384,"connectEnd":384,"connectStart":384,"domainLookupEnd":384,"domainLookupStart":384,"fetchStart":384,"redirectEnd":0,"redirectStart":0,"requestStart":384,"responseEnd":811.7000000476837,"responseStart":811.7000000476837,"secureConnectionStart":384},{"duration":868.5999999046326,"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":384.90000009536743,"connectEnd":384.90000009536743,"connectStart":384.90000009536743,"domainLookupEnd":384.90000009536743,"domainLookupStart":384.90000009536743,"fetchStart":384.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":384.90000009536743,"responseEnd":1253.5,"responseStart":1253.5,"secureConnectionStart":384.90000009536743},{"duration":917.5,"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":408.7999999523163,"connectEnd":408.7999999523163,"connectStart":408.7999999523163,"domainLookupEnd":408.7999999523163,"domainLookupStart":408.7999999523163,"fetchStart":408.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":408.7999999523163,"responseEnd":1326.2999999523163,"responseStart":1326.2999999523163,"secureConnectionStart":408.7999999523163},{"duration":365.89999985694885,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":902.1000001430511,"connectEnd":902.1000001430511,"connectStart":902.1000001430511,"domainLookupEnd":902.1000001430511,"domainLookupStart":902.1000001430511,"fetchStart":902.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":902.1000001430511,"responseEnd":1268,"responseStart":1268,"secureConnectionStart":902.1000001430511},{"duration":227.90000009536743,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1206.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1206.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1434.2000000476837,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":147,"responseStart":342,"responseEnd":408,"domLoading":378,"domInteractive":1557,"domContentLoadedEventStart":1557,"domContentLoadedEventEnd":1638,"domComplete":1923,"loadEventStart":1924,"loadEventEnd":1924,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1499.1000001430511},{"name":"bigPipe.sidebar-id.end","time":1500},{"name":"bigPipe.activity-panel-pipe-id.start","time":1500.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1509},{"name":"activityTabFullyLoaded","time":1667.4000000953674}],"measures":[],"correlationId":"2bae35cd66849a","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":131,"dbReadsTimeInMs":17,"dbConnsTimeInMs":26,"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>