-
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":1084,"ttfb":426.89999985694885,"pageVisibility":"visible","entityId":129159,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"bd124162-5241-4c3f-be15-dcf7cf2d26e6","navigationType":0,"readyForUser":1166.3999998569489,"redirectCount":0,"resourceLoadedEnd":810.8999998569489,"resourceLoadedStart":433.89999985694885,"resourceTiming":[{"duration":23.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":433.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":433.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":457.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":34,"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":434.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":434.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":468.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":262.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":434.39999985694885,"connectEnd":434.39999985694885,"connectStart":434.39999985694885,"domainLookupEnd":434.39999985694885,"domainLookupStart":434.39999985694885,"fetchStart":434.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":476.19999980926514,"responseEnd":697,"responseStart":490.69999980926514,"secureConnectionStart":434.39999985694885},{"duration":376.2999999523163,"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":434.59999990463257,"connectEnd":434.59999990463257,"connectStart":434.59999990463257,"domainLookupEnd":434.59999990463257,"domainLookupStart":434.59999990463257,"fetchStart":434.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":480.5,"responseEnd":810.8999998569489,"responseStart":498,"secureConnectionStart":434.59999990463257},{"duration":68.79999995231628,"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":434.7999999523163,"connectEnd":434.7999999523163,"connectStart":434.7999999523163,"domainLookupEnd":434.7999999523163,"domainLookupStart":434.7999999523163,"fetchStart":434.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":481.39999985694885,"responseEnd":503.59999990463257,"responseStart":502.09999990463257,"secureConnectionStart":434.7999999523163},{"duration":70.89999985694885,"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":435,"connectEnd":435,"connectStart":435,"domainLookupEnd":435,"domainLookupStart":435,"fetchStart":435,"redirectEnd":0,"redirectStart":0,"requestStart":481.69999980926514,"responseEnd":505.89999985694885,"responseStart":504,"secureConnectionStart":435},{"duration":74.5,"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":435.09999990463257,"connectEnd":435.09999990463257,"connectStart":435.09999990463257,"domainLookupEnd":435.09999990463257,"domainLookupStart":435.09999990463257,"fetchStart":435.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":482.5,"responseEnd":509.59999990463257,"responseStart":507.09999990463257,"secureConnectionStart":435.09999990463257},{"duration":46.299999952316284,"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":435.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":435.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":481.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":74.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":435.5,"connectEnd":435.5,"connectStart":435.5,"domainLookupEnd":435.5,"domainLookupStart":435.5,"fetchStart":435.5,"redirectEnd":0,"redirectStart":0,"requestStart":484.5,"responseEnd":509.7999999523163,"responseStart":508.09999990463257,"secureConnectionStart":435.5},{"duration":46.60000014305115,"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":435.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":435.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":482.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":78.20000004768372,"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":435.7999999523163,"connectEnd":435.7999999523163,"connectStart":435.7999999523163,"domainLookupEnd":435.7999999523163,"domainLookupStart":435.7999999523163,"fetchStart":435.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":484.7999999523163,"responseEnd":514,"responseStart":508.7999999523163,"secureConnectionStart":435.7999999523163},{"duration":360.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":441.19999980926514,"connectEnd":441.19999980926514,"connectStart":441.19999980926514,"domainLookupEnd":441.19999980926514,"domainLookupStart":441.19999980926514,"fetchStart":441.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":519.2999999523163,"responseEnd":801.5999999046326,"responseStart":792.0999999046326,"secureConnectionStart":441.19999980926514},{"duration":337.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":466.09999990463257,"connectEnd":466.09999990463257,"connectStart":466.09999990463257,"domainLookupEnd":466.09999990463257,"domainLookupStart":466.09999990463257,"fetchStart":466.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":566.3999998569489,"responseEnd":803.5,"responseStart":796.0999999046326,"secureConnectionStart":466.09999990463257},{"duration":136.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":841.8999998569489,"connectEnd":841.8999998569489,"connectStart":841.8999998569489,"domainLookupEnd":841.8999998569489,"domainLookupStart":841.8999998569489,"fetchStart":841.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":940.5,"responseEnd":978.7999999523163,"responseStart":978.1999998092651,"secureConnectionStart":841.8999998569489}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":221,"responseStart":426,"responseEnd":465,"domLoading":430,"domInteractive":1298,"domContentLoadedEventStart":1298,"domContentLoadedEventEnd":1365,"domComplete":1990,"loadEventStart":1990,"loadEventEnd":1991,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1247.6999998092651},{"name":"bigPipe.sidebar-id.end","time":1248.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.start","time":1248.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1256.8999998569489},{"name":"activityTabFullyLoaded","time":1384}],"measures":[],"correlationId":"dbd2f35935fe5f","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":131,"dbReadsTimeInMs":21,"dbConnsTimeInMs":31,"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>