[MDEV-25272] Wrong function name in error messages upon ST_GeomFromGeoJSON call Created: 2021-03-26  Updated: 2021-03-27  Resolved: 2021-03-27

Status: Closed
Project: MariaDB Server
Component/s: GIS
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: 10.2.38, 10.3.29, 10.4.19, 10.5.10

Type: Bug Priority: Trivial
Reporter: Elena Stepanova Assignee: Anel Husakovic
Resolution: Fixed Votes: 0
Labels: None


 Description   

This is a literal quote from gis-json.result:

10.2 da26e2e673

SELECT ST_AsText(SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',5));
ERROR HY000: Incorrect option value: '5' for function ST_GeometryFromJSON
SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',1));
ERROR 22023: Invalid GIS data provided to function ST_GeometryFromJSON.
('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',5));
ERROR HY000: Incorrect option value: '5' for function ST_GeometryFromJSON
SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',1));
ERROR 22023: Invalid GIS data provided to function ST_GeometryFromJSON.

So, the function name is ST_GeomFromGeoJSON, but the error messages say ST_GeometryFromJSON instead. And it is not even a synonym:

MariaDB [test]> SELECT ST_GeometryFromJSON('{}',1);
ERROR 1305 (42000): FUNCTION test.ST_GeometryFromJSON does not exist



 Comments   
Comment by Anel Husakovic [ 2021-03-27 ]

holyfoot pushed with https://github.com/MariaDB/server/commit/5eda18f0cac6e6520cc1bbeec28c7c653da737df to the same branch as MDEV-13467.
https://github.com/MariaDB/server/tree/bb-10.2-anel-MDEV-13467-gis-feature-v1
However since protected branches are enabled, I had to rebuild all even if there are failures not related to the patch (couldn't push MDEV-13467).

Comment by Anel Husakovic [ 2021-03-27 ]

Pushed with 5eda18f0cac6e6520cc1bbeec2 after passing all checks in protected-branch

Generated at Thu Feb 08 09:36:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.