Comments - ST_ISCLOSED

7 years, 11 months ago Honza Horak

I see a different output in MariaDB 10.1 than in 10.0, when passing invalid input into the ST_ISCLOSED("") function.

In MariaDB 10.0, I see:

MariaDB [(none)]> SELECT ST_ISCLOSED("")  \G
*************************** 1. row ***************************
ST_ISCLOSED(""): NULL

In MariaDB 10.1, I see:

MariaDB [(none)]> SELECT ST_ISCLOSED("")  \G
*************************** 1. row ***************************
ST_ISCLOSED(""): -1

Is this difference (NULL vs -1) expected?

 
7 years, 10 months ago Ian Gilfillan

This was an intentional change based on an interpretation of the GIS standard, which states "The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN corresponding to a function invocation on NULL arguments. TRUE if this geometric object is simple, as defined in the Geometry Model.". However, the developer has also noticed contradictions, so is re-looking at this.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.