In MySQL 5.7, ST_GeomFromGeoJSON has an option argument (1-4):
https://dev.mysql.com/doc/refman/5.7/en/spatial-geojson-functions.html#function_st-geomfromgeojson
SET @j = '{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}';
|
Query OK, 0 rows affected (0.00 sec)
|
|
mysql [localhost] {msandbox} ((none)) > SELECT ST_AsText(ST_GeomFromGeoJSON(@j,5));
|
ERROR 1411 (HY000): Incorrect option value: '5' for function st_geomfromgeojson
|
|
mysql [localhost] {msandbox} ((none)) > SELECT ST_AsText(ST_GeomFromGeoJSON(@j,4));
|
+-------------------------------------+
|
| ST_AsText(ST_GeomFromGeoJSON(@j,4)) |
|
+-------------------------------------+
|
| POINT(5.3 15) |
|
+-------------------------------------+
|
1 row in set (0.01 sec)
|
|
mysql [localhost] {msandbox} ((none)) > SELECT ST_AsText(ST_GeomFromGeoJSON(@j,1));
|
ERROR 3073 (HY000): Unsupported number of coordinate dimensions in function st_geomfromgeojson: Found 3, expected 2
|
In MariaDB, the option argument is accepted but appears to make no difference to anything. Is it intended that MariaDB match MySQL's behaviour? If so, this is a bug, if not, it needs to be documented what the argument does.
SET @j = '{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}';
|
Query OK, 0 rows affected (0.00 sec)
|
|
mysql [localhost] {msandbox} ((none)) > SELECT ST_AsText(ST_GeomFromGeoJSON(@j,2));
|
+-------------------------------------+
|
| ST_AsText(ST_GeomFromGeoJSON(@j,2)) |
|
+-------------------------------------+
|
| POINT(5.3 15) |
|
+-------------------------------------+
|
1 row in set (0.00 sec)
|
|
mysql [localhost] {msandbox} ((none)) > SELECT ST_AsText(ST_GeomFromGeoJSON(@j,1));
|
+-------------------------------------+
|
| ST_AsText(ST_GeomFromGeoJSON(@j,1)) |
|
+-------------------------------------+
|
| POINT(5.3 15) |
|
+-------------------------------------+
|
1 row in set (0.00 sec)
|
|
mysql [localhost] {msandbox} ((none)) > SELECT ST_AsText(ST_GeomFromGeoJSON(@j,3));
|
+-------------------------------------+
|
| ST_AsText(ST_GeomFromGeoJSON(@j,3)) |
|
+-------------------------------------+
|
| POINT(5.3 15) |
|
+-------------------------------------+
|
1 row in set (0.00 sec)
|
|
mysql [localhost] {msandbox} ((none)) > SELECT ST_AsText(ST_GeomFromGeoJSON(@j,4));
|
+-------------------------------------+
|
| ST_AsText(ST_GeomFromGeoJSON(@j,4)) |
|
+-------------------------------------+
|
| POINT(5.3 15) |
|
+-------------------------------------+
|
1 row in set (0.00 sec)
|
|
mysql [localhost] {msandbox} ((none)) > SELECT ST_AsText(ST_GeomFromGeoJSON(@j,5));
|
+-------------------------------------+
|
| ST_AsText(ST_GeomFromGeoJSON(@j,5)) |
|
+-------------------------------------+
|
| POINT(5.3 15) |
|
+-------------------------------------+
|
1 row in set (0.00 sec)
|
|
mysql [localhost] {msandbox} ((none)) > SELECT ST_AsText(ST_GeomFromGeoJSON(@j,6));
|
+-------------------------------------+
|
| ST_AsText(ST_GeomFromGeoJSON(@j,6)) |
|
+-------------------------------------+
|
| POINT(5.3 15) |
|
+-------------------------------------+
|
1 row in set (0.00 sec)
|
{"report":{"fcp":853.3000001907349,"ttfb":186.2000002861023,"pageVisibility":"visible","entityId":60438,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"aa32f2c0-8cc1-4f65-b732-09d8aeac5f8b","navigationType":0,"readyForUser":953,"redirectCount":0,"resourceLoadedEnd":969.0999999046326,"resourceLoadedStart":192.80000019073486,"resourceTiming":[{"duration":62.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":192.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":192.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":255,"responseStart":0,"secureConnectionStart":0},{"duration":62.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":193.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":193.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":255.5,"responseStart":0,"secureConnectionStart":0},{"duration":113.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":193.30000019073486,"connectEnd":193.30000019073486,"connectStart":193.30000019073486,"domainLookupEnd":193.30000019073486,"domainLookupStart":193.30000019073486,"fetchStart":193.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":193.30000019073486,"responseEnd":307.2000002861023,"responseStart":307.2000002861023,"secureConnectionStart":193.30000019073486},{"duration":226.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":193.5,"connectEnd":193.5,"connectStart":193.5,"domainLookupEnd":193.5,"domainLookupStart":193.5,"fetchStart":193.5,"redirectEnd":0,"redirectStart":0,"requestStart":193.5,"responseEnd":419.59999990463257,"responseStart":419.59999990463257,"secureConnectionStart":193.5},{"duration":229.69999980926514,"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":193.80000019073486,"connectEnd":193.80000019073486,"connectStart":193.80000019073486,"domainLookupEnd":193.80000019073486,"domainLookupStart":193.80000019073486,"fetchStart":193.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":193.80000019073486,"responseEnd":423.5,"responseStart":423.5,"secureConnectionStart":193.80000019073486},{"duration":230.19999980926514,"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":193.90000009536743,"connectEnd":193.90000009536743,"connectStart":193.90000009536743,"domainLookupEnd":193.90000009536743,"domainLookupStart":193.90000009536743,"fetchStart":193.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":193.90000009536743,"responseEnd":424.09999990463257,"responseStart":424.09999990463257,"secureConnectionStart":193.90000009536743},{"duration":230.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":194.09999990463257,"connectEnd":194.09999990463257,"connectStart":194.09999990463257,"domainLookupEnd":194.09999990463257,"domainLookupStart":194.09999990463257,"fetchStart":194.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":194.09999990463257,"responseEnd":424.5,"responseStart":424.5,"secureConnectionStart":194.09999990463257},{"duration":266.90000009536743,"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":194.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":194.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":461.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":230.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":194.40000009536743,"connectEnd":194.40000009536743,"connectStart":194.40000009536743,"domainLookupEnd":194.40000009536743,"domainLookupStart":194.40000009536743,"fetchStart":194.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":194.40000009536743,"responseEnd":425,"responseStart":425,"secureConnectionStart":194.40000009536743},{"duration":266.80000019073486,"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":194.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":194.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":461.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":231,"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":194.7000002861023,"connectEnd":194.7000002861023,"connectStart":194.7000002861023,"domainLookupEnd":194.7000002861023,"domainLookupStart":194.7000002861023,"fetchStart":194.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":194.7000002861023,"responseEnd":425.7000002861023,"responseStart":425.7000002861023,"secureConnectionStart":194.7000002861023},{"duration":380.6000003814697,"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":195.59999990463257,"connectEnd":195.59999990463257,"connectStart":195.59999990463257,"domainLookupEnd":195.59999990463257,"domainLookupStart":195.59999990463257,"fetchStart":195.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":195.59999990463257,"responseEnd":576.2000002861023,"responseStart":576.2000002861023,"secureConnectionStart":195.59999990463257},{"duration":708.1000003814697,"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":195.59999990463257,"connectEnd":195.59999990463257,"connectStart":195.59999990463257,"domainLookupEnd":195.59999990463257,"domainLookupStart":195.59999990463257,"fetchStart":195.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":195.59999990463257,"responseEnd":903.7000002861023,"responseStart":903.7000002861023,"secureConnectionStart":195.59999990463257},{"duration":103.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":473.5,"connectEnd":473.5,"connectStart":473.5,"domainLookupEnd":473.5,"domainLookupStart":473.5,"fetchStart":473.5,"redirectEnd":0,"redirectStart":0,"requestStart":473.5,"responseEnd":576.5999999046326,"responseStart":576.5999999046326,"secureConnectionStart":473.5},{"duration":225.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/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":744,"connectEnd":744,"connectStart":744,"domainLookupEnd":744,"domainLookupStart":744,"fetchStart":744,"redirectEnd":0,"redirectStart":0,"requestStart":744,"responseEnd":969.0999999046326,"responseStart":969.0999999046326,"secureConnectionStart":744},{"duration":153.40000009536743,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":847,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":847,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1000.4000000953674,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":21,"responseStart":187,"responseEnd":191,"domLoading":191,"domInteractive":1025,"domContentLoadedEventStart":1025,"domContentLoadedEventEnd":1080,"domComplete":1752,"loadEventStart":1752,"loadEventEnd":1754,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1005.7000002861023},{"name":"bigPipe.sidebar-id.end","time":1006.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1006.7000002861023},{"name":"bigPipe.activity-panel-pipe-id.end","time":1014.7000002861023},{"name":"activityTabFullyLoaded","time":1107.5}],"measures":[],"correlationId":"1093ff3e49586b","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}