Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 811 Bytes

26.md

File metadata and controls

19 lines (16 loc) · 811 Bytes

Consider the following statements:

SET @g1 = ST_GeomFromText('GEOMETRYCOLLECTION(POLYGON((300 190,935 665,720 885,300 190)))');
SET @g2 = ST_GeomFromText('POLYGON((300 190,935 665,720 885,300 190))');
SET @g3 = ST_GeomFromText('GEOMETRYCOLLECTION(POLYGON((655 435,55 75,90 5,655 435)),POLYGON((300 190,935 665,720 885,300 190)))');

SELECT ST_Contains(@g3, @g1);
-- result{1}
SELECT ST_Contains(@g3, @g2);
-- expected{1}; actual{0}

It is noticed that g1 and g2 present the same polygon, but MySQL GIS gives different answers when querying ST_Contains(@g3, @g1) and ST_Contains(@g3, @g2), which seems a bug.

Geometry @g3 completely contains g2, but MySQL GIS returns the unexpected result 0.

Version: 8.2.0 the latest version in Github: 87307d4ddd88405117e3f1e51323836d57ab1f57