Bug #80123 | Invalid MULTIPOLYGON geometry permitted to be added in geometry columns | ||
---|---|---|---|
Submitted: | 22 Jan 2016 23:15 | Modified: | 29 Feb 2016 18:55 |
Reporter: | Nikolaos Priggouris | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: GIS | Severity: | S2 (Serious) |
Version: | 5.7.9, 5.7.10 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[22 Jan 2016 23:15]
Nikolaos Priggouris
[4 Feb 2016 7:39]
MySQL Verification Team
Hello Nikolaos, Thank you for the report. Thanks, Umesh
[4 Feb 2016 7:44]
MySQL Verification Team
Bug #80262 marked as duplicate of this
[22 Feb 2016 11:59]
Norvald Ryeng
Posted by developer: Checking geometry validity is an expensive operation, so MySQL does only minimal verification of geometries on INSERT. GIS functions are only defined for valid input (https://dev.mysql.com/doc/refman/5.7/en/spatial-function-argument-handling.html), but checking validity is expensive, so no explicit check is made. However, GIS functions are allowed to flag an error if invalid geometries are detected. This is intended behavior and in line with other DBMSs. To avoid inserting and computing on invalid data, use ST_IsValid and ST_Validate: https://dev.mysql.com/doc/refman/5.7/en/spatial-convenience-functions.html#function_st-isv... https://dev.mysql.com/doc/refman/5.7/en/spatial-convenience-functions.html#function_st-val... I'm closing this report as not a bug since this is intended and documented behavior. Regards, Norvald H. Ryeng
[29 Feb 2016 18:55]
Nikolaos Priggouris
Ok however kee in mind that the functions you mention ST_Valid() & ST_Validate() do apply only for cartesian coordinates (SRID=0) which is quite limiting since cartesian coordinates are rearely used in real world scenarios