Bug #114291 ST_Overlap gives an incorrect answer.
Submitted: 10 Mar 2024 7:20 Modified: 10 Mar 2024 7:55
Reporter: Wendy Deng Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: GIS Severity:S3 (Non-critical)
Version:8.2.0, 8.0.36 OS:Any
Assigned to: CPU Architecture:Any

[10 Mar 2024 7:20] Wendy Deng
Description:
Consider the following statements:

SET @g1 = ST_GeomFromText('POLYGON((445 614,26 30,30 80,445 614))');
SET @g2 = ST_GeomFromText('MULTIPOLYGON(((445 614,26 30,30 80,445 614)),((1010 190,90 40,40 90,1010 190)))');

SELECT ST_Overlaps(@g2, @g1);
--expected{0}; actual{1}

According to the definition of ST_Overlaps:

Two geometries spatially overlap if they intersect and their intersection results in a geometry of the same dimension but not equal to either of the given geometries.

@g1 does not overlap @g2 because the intersection of @g1 and @g2 is equal to @g1, which violates "neither one covers the other".

Version:
8.2.0
the version in Github:
824e2b4

How to repeat:
SET @g1 = ST_GeomFromText('POLYGON((445 614,26 30,30 80,445 614))');
SET @g2 = ST_GeomFromText('MULTIPOLYGON(((445 614,26 30,30 80,445 614)),((1010 190,90 40,40 90,1010 190)))');

SELECT ST_Overlaps(@g2, @g1);
--expected{0}; actual{1}
[10 Mar 2024 7:55] MySQL Verification Team
Hello Wendy,

Thank you for the report and test case.
Verified as described.

regards,
Umesh