JSON paths with dashes in them are reported as syntax errors inside procedures. If they are free-standing, they work fine.
DROP PROCEDURE IF EXISTS my_proc;
|
|
DELIMITER $$
|
CREATE PROCEDURE my_proc()
|
BEGIN
|
DECLARE result TEXT;
|
SET result = JSON_EXTRACT('{ "my-key": 1 }', '$."my-key"');
|
END $$
|
DELIMITER ;
|
|
CALL my_proc();
|
--------------
|
CALL my_proc()
|
--------------
|
|
ERROR 4042 (HY000) at line 11: Syntax error in JSON path in argument 2 to function 'json_extract' at position 6
|
This syntax works in procedures on MariaDB 10.8.4 and prior.
More about the environment:
$ cat /etc/os-release
|
NAME='EndeavourOS'
|
PRETTY_NAME='EndeavourOS'
|
ID=endeavouros
|
ID_LIKE=arch
|
BUILD_ID=2021.04.17
|
ANSI_COLOR="38;2;23;147;209"
|
HOME_URL='https://endeavouros.com'
|
DOCUMENTATION_URL='https://discovery.endeavouros.com'
|
SUPPORT_URL='https://forum.endeavouros.com'
|
BUG_REPORT_URL='https://forum.endeavouros.com/c/arch-based-related-questions/bug-reports'
|
LOGO=endeavouros
|
Dockerized MariaDB:
Server version: 10.9.2-MariaDB-1:10.9.2+maria~ubu2204 mariadb.org binary distribution
|
$ mysql --version
|
mysql Ver 15.1 Distrib 10.8.4-MariaDB, for Linux (x86_64) using readline 5.1
|
But also tested with the client included in the docker container, same result:
$ docker exec -it 97795998875c bin/mysql --version
|
bin/mysql Ver 15.1 Distrib 10.9.2-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
|
{"report":{"fcp":712.8999999910593,"ttfb":217.29999999701977,"pageVisibility":"visible","entityId":114157,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":16,"apdex":1,"journeyId":"2c992674-ad2e-4b41-b7d5-bd0f32dc929f","navigationType":0,"readyForUser":786,"redirectCount":0,"resourceLoadedEnd":852.1999999880791,"resourceLoadedStart":224.3999999910593,"resourceTiming":[{"duration":4,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/-ibdlr7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":224.3999999910593,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":224.3999999910593,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":228.3999999910593,"responseStart":0,"secureConnectionStart":0},{"duration":4.299999997019768,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/-ibdlr7/820016/12ta74/32773c163862cc5905c5590f9caabd2c/_/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":224.59999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":224.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":228.8999999910593,"responseStart":0,"secureConnectionStart":0},{"duration":56.400000005960464,"initiatorType":"script","name":"https://jira.mariadb.org/s/ba6988544fdb0e194d1fd7143a97326f-CDN/-ibdlr7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":224.8999999910593,"connectEnd":224.8999999910593,"connectStart":224.8999999910593,"domainLookupEnd":224.8999999910593,"domainLookupStart":224.8999999910593,"fetchStart":224.8999999910593,"redirectEnd":0,"redirectStart":0,"requestStart":231.59999999403954,"responseEnd":281.29999999701977,"responseStart":244.19999998807907,"secureConnectionStart":224.8999999910593},{"duration":86.79999999701977,"initiatorType":"script","name":"https://jira.mariadb.org/s/8abf0fe473bddb892cee106824a6c70e-CDN/-ibdlr7/820016/12ta74/32773c163862cc5905c5590f9caabd2c/_/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":225.09999999403954,"connectEnd":225.09999999403954,"connectStart":225.09999999403954,"domainLookupEnd":225.09999999403954,"domainLookupStart":225.09999999403954,"fetchStart":225.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":232.69999998807907,"responseEnd":311.8999999910593,"responseStart":282.29999999701977,"secureConnectionStart":225.09999999403954},{"duration":23.799999997019768,"initiatorType":"script","name":"https://jira.mariadb.org/s/47dd7b18197fe6400466412777004ffa-CDN/-ibdlr7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":225.29999999701977,"connectEnd":225.29999999701977,"connectStart":225.29999999701977,"domainLookupEnd":225.29999999701977,"domainLookupStart":225.29999999701977,"fetchStart":225.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":232.3999999910593,"responseEnd":249.09999999403954,"responseStart":248.5,"secureConnectionStart":225.29999999701977},{"duration":56.79999999701977,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-ibdlr7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":225.3999999910593,"connectEnd":225.3999999910593,"connectStart":225.3999999910593,"domainLookupEnd":225.3999999910593,"domainLookupStart":225.3999999910593,"fetchStart":225.3999999910593,"redirectEnd":0,"redirectStart":0,"requestStart":233.8999999910593,"responseEnd":282.19999998807907,"responseStart":281.59999999403954,"secureConnectionStart":225.3999999910593},{"duration":41.70000000298023,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-ibdlr7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":225.59999999403954,"connectEnd":225.59999999403954,"connectStart":225.59999999403954,"domainLookupEnd":225.59999999403954,"domainLookupStart":225.59999999403954,"fetchStart":225.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":234.3999999910593,"responseEnd":267.29999999701977,"responseStart":266.69999998807907,"secureConnectionStart":225.59999999403954},{"duration":8.599999994039536,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/-ibdlr7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":225.79999999701977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":225.79999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":234.3999999910593,"responseStart":0,"secureConnectionStart":0},{"duration":48.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/f66960d7757d5f06891021cb34673e32/shortcuts.js?context=issuenavigation&context=issueaction","startTime":225.8999999910593,"connectEnd":225.8999999910593,"connectStart":225.8999999910593,"domainLookupEnd":225.8999999910593,"domainLookupStart":225.8999999910593,"fetchStart":225.8999999910593,"redirectEnd":0,"redirectStart":0,"requestStart":236.5,"responseEnd":274.3999999910593,"responseStart":273.8999999910593,"secureConnectionStart":225.8999999910593},{"duration":9.299999997019768,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/-ibdlr7/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":226.09999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":226.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":235.3999999910593,"responseStart":0,"secureConnectionStart":0},{"duration":51.900000005960464,"initiatorType":"script","name":"https://jira.mariadb.org/s/da6d607a203f2674ccfb3cffe16d847f-CDN/-ibdlr7/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":226.19999998807907,"connectEnd":226.19999998807907,"connectStart":226.19999998807907,"domainLookupEnd":226.19999998807907,"domainLookupStart":226.19999998807907,"fetchStart":226.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":237.59999999403954,"responseEnd":278.09999999403954,"responseStart":277.5,"secureConnectionStart":226.19999998807907},{"duration":32.79999999701977,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-ibdlr7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":242.29999999701977,"connectEnd":247.19999998807907,"connectStart":247.19999998807907,"domainLookupEnd":247.19999998807907,"domainLookupStart":247.19999998807907,"fetchStart":242.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":247.59999999403954,"responseEnd":275.09999999403954,"responseStart":273.3999999910593,"secureConnectionStart":247.19999998807907},{"duration":18.399999991059303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-ibdlr7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":242.5,"connectEnd":242.5,"connectStart":242.5,"domainLookupEnd":242.5,"domainLookupStart":242.5,"fetchStart":242.5,"redirectEnd":0,"redirectStart":0,"requestStart":247.79999999701977,"responseEnd":260.8999999910593,"responseStart":260,"secureConnectionStart":242.5},{"duration":148.70000000298023,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":487.09999999403954,"connectEnd":487.09999999403954,"connectStart":487.09999999403954,"domainLookupEnd":487.09999999403954,"domainLookupStart":487.09999999403954,"fetchStart":487.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":603.6999999880791,"responseEnd":635.7999999970198,"responseStart":634.8999999910593,"secureConnectionStart":487.09999999403954},{"duration":135.6000000089407,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":688.6999999880791,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":688.6999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":824.2999999970198,"responseStart":0,"secureConnectionStart":0},{"duration":43.8999999910593,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":704.5,"connectEnd":704.5,"connectStart":704.5,"domainLookupEnd":704.5,"domainLookupStart":704.5,"fetchStart":704.5,"redirectEnd":0,"redirectStart":0,"requestStart":716,"responseEnd":748.3999999910593,"responseStart":747.6999999880791,"secureConnectionStart":704.5},{"duration":25.599999994039536,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-ibdlr7/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":826.5999999940395,"connectEnd":826.5999999940395,"connectStart":826.5999999940395,"domainLookupEnd":826.5999999940395,"domainLookupStart":826.5999999940395,"fetchStart":826.5999999940395,"redirectEnd":0,"redirectStart":0,"requestStart":837.6999999880791,"responseEnd":852.1999999880791,"responseStart":849.5,"secureConnectionStart":826.5999999940395}],"fetchStart":1,"domainLookupStart":4,"domainLookupEnd":13,"connectStart":13,"connectEnd":35,"secureConnectionStart":22,"requestStart":35,"responseStart":218,"responseEnd":242,"domLoading":221,"domInteractive":854,"domContentLoadedEventStart":854,"domContentLoadedEventEnd":898,"domComplete":934,"loadEventStart":934,"loadEventEnd":935,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":828.8999999910593},{"name":"bigPipe.sidebar-id.end","time":829.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":829.6999999880791},{"name":"bigPipe.activity-panel-pipe-id.end","time":831.0999999940395},{"name":"activityTabFullyLoaded","time":913.5}],"measures":[],"correlationId":"aef66bdb6960ef","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":110,"dbReadsTimeInMs":15,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Caused by
commit dfcbb30a92c2f1d33ceefb56a1d3fa13f8d0ce67
Date: Mon Nov 22 22:59:30 2021 +0530
MDEV-22224: Support JSON Path negative index