Bug #69487 ST_CONTAINS gives incorrect results on 2 POLYGONs
Submitted: 17 Jun 2013 0:15 Modified: 8 May 2015 13:07
Reporter: Kevin Mitnick Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: GIS Severity:S3 (Non-critical)
Version:5.6.12, 5.7.2 OS:Linux
Assigned to: CPU Architecture:Any
Tags: gis, spatial, ST_Contains

[17 Jun 2013 0:15] Kevin Mitnick
Description:
It seems like the Polygon-in-Polygon-test does not work most of the time.

How to repeat:
SELECT ST_CONTAINS(GeomFromText('POLYGON((0 0,0 1,2 2,1 1,1 0,0 0))'),GeomFromText('POLYGON((0 1,2 2,1 1,0 1))')) as 'ST_CONTAINS';
+-------------+
| ST_CONTAINS |
+-------------+
|           0 |
+-------------+

SELECT ST_CONTAINS(GeomFromText('POLYGON((0 0,0 1,0 2,1 2,1 1,1 0,0 0))'),GeomFromText('POLYGON((0 1,0 2,1 2,1 1,0 1))')) as 'ST_CONTAINS';
+-------------+
| ST_CONTAINS |
+-------------+
|           0 |
+-------------+
[18 Jun 2013 20:00] Sveta Smirnova
Thank you for the report.

Verified as described.
[8 May 2015 13:07] Norvald Ryeng
Posted by developer:
 
This issue has been fixed in MySQL 5.7.