Bug #113888 st_contains function result is obviously wrong
Submitted: 4 Feb 2024 3:38 Modified: 4 Feb 2024 12:18
Reporter: T H Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: GIS Severity:S2 (Serious)
Version:8.0 OS:Linux
Assigned to: CPU Architecture:x86
Tags: gis, ST_Contains

[4 Feb 2024 3:38] T H
Description:
use function st_contains to check whether multilinstring A contains multilinestring B, the result is obviously wrong.

multilinstring A:  'MULTILINESTRING((10 10, 20 20 ), (15 15 , 30 15))'
multilinestring B: 'MULTILINESTRING((10 10, 20 20), (60 -60, 30 15))'

How to repeat:

Server version: 8.0.26 Source distribution

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select st_contains(ST_GeomFromText('MULTILINESTRING((10 10, 20 20 ), (15 15 , 30 15))'),ST_GeomFromText('MULTILINESTRING((10 10, 20 20), (60 -60, 30 15))'));
+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| st_contains(ST_GeomFromText('MULTILINESTRING((10 10, 20 20 ), (15 15 , 30 15))'),ST_GeomFromText('MULTILINESTRING((10 10, 20 20), (60 -60, 30 15))')) |
+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                                                                                                     1 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
[4 Feb 2024 12:18] MySQL Verification Team
Hello!

Thank you for the report and test case.

regards,
Umesh