[MDEV-27639] Create better descriptive error message in case of wrong arguments for geometry types Created: 2022-01-27  Updated: 2022-01-27

Status: Open
Project: MariaDB Server
Component/s: GIS, Server
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Anel Husakovic Assignee: Alexey Botchkov
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-26161 crash in Gis_point::calculate_haversine Stalled

 Description   

When geometry is not well constructed we get the NULL, as documentation said.

SELECT polygon(point(0,0),point(0,1),point(1,1),point(1,0),point(0,0))
NULL

In case of MySQL an descriptive error message is raised:

SELECT polygon(point(0,0),point(0,1),point(1,1),point(1,0),point(0,0))
ERROR 1210 (HY000) at line 1: Incorrect arguments to polygon

When we get in case if NULL is an argument, we get the NULL result what is ok.
See more example from here.


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