Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential bug in ST_Contains #26

Open
cuteDen-ECNU opened this issue Nov 23, 2023 · 1 comment
Open

Potential bug in ST_Contains #26

cuteDen-ECNU opened this issue Nov 23, 2023 · 1 comment
Labels
fixed mysql GIS sytax trans Add point to the boundary of geometry

Comments

@cuteDen-ECNU
Copy link
Owner

cuteDen-ECNU commented Nov 23, 2023

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

@cuteDen-ECNU
Copy link
Owner Author

cuteDen-ECNU commented Nov 24, 2023

bugtracker link: https://bugs.mysql.com/bug.php?id=113207
fix link: None
reproduce: None

@cuteDen-ECNU cuteDen-ECNU added sytax trans Add point to the boundary of geometry bug-confirm mysql GIS labels Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed mysql GIS sytax trans Add point to the boundary of geometry
Projects
None yet
Development

No branches or pull requests

1 participant