Bug #113048 MTR test gis.gis_bugs_crashes fails with a result difference
Submitted: 10 Nov 2023 15:20 Modified: 17 Jan 13:53
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: GIS Severity:S2 (Serious)
Version:8.0.35 OS:Any
Assigned to: CPU Architecture:Any

[10 Nov 2023 15:20] Laurynas Biveinis
Description:
$ mtr gis.gis_bugs_crashes --retry-failure=0
...
[ 50%] gis.gis_bugs_crashes                      [ fail ]
        Test ended at 2023-11-10 17:19:27

CURRENT_TEST: gis.gis_bugs_crashes
--- /Users/laurynas/vilniusdb/mysql-8.0.35/mysql-test/suite/gis/r/gis_bugs_crashes.result	2023-10-26 09:13:46
+++ /Users/laurynas/vilniusdb/mysql-8.0.35/_build-release/mysql-test/var/log/gis_bugs_crashes.reject	2023-11-10 18:19:27
@@ -2031,7 +2031,7 @@
 ST_GEOMFROMWKB(ST_ASWKB(GEOMETRYCOLLECTION(
 MULTIPOINT(POINT(8,-6), POINT(9,2), POINT(9,1), POINT(-0,6), POINT(8,6), POINT(4,3), POINT(.7,6)),
 MULTIPOINT(POINT(8,-0.7654), POINT(2,7), POINT(8,-0.7654), POINT(-.0,7), POINT(.0,6
-GEOMETRYCOLLECTION(LINESTRING(-0.7654 2.232432,3.6737899159 2.0995592838),LINESTRING(3.9273011579 4.5454683022,2.8 4),POINT(3.9273011579 4.5454683022))
+GEOMETRYCOLLECTION(LINESTRING(-0.7654 2.232432,3.6737899159 2.0995592838),LINESTRING(3.9273011579 4.5454683022,2.8 4),POINT(3.6737899159 2.0995592838),POINT(3.9273011579 4.5454683022))
 ######################################################################################################
 # BUG#20408240 : ST_DIFFERENCE : ASSERTION `T1->RESULT_RANGE' FAILED
 ######################################################################################################

mysqltest: Result content mismatch

How to repeat:
See above
[13 Nov 2023 9:44] MySQL Verification Team
Hello Laurynas,

Thank you for the report and feedback!
I quickly tried using https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.35-macos13-arm64.tar but not seeing any issues on MacOS(Ventura 13.5.1) and even on OL7(generic binary tarball build) but not observed any issues which is seen in your report. Is there anything I'm missing here? Thank you.

--
./mtr gis.gis_bugs_crashes --retry-failure=0
Logging: ./mtr  gis.gis_bugs_crashes --retry-failure=0
MySQL Version 8.0.35
Checking supported features
Using 'all' suites
Collecting tests
Checking leftover processes
Removing old var directory
Creating var directory '/Users/umshastr/Downloads/mysql-8.0.35/mysql-test/var'
Installing system database
Using parallel: 1

==============================================================================
                  TEST NAME                       RESULT  TIME (ms) COMMENT
------------------------------------------------------------------------------
[ 50%] gis.gis_bugs_crashes                      [ pass ]    138
[100%] shutdown_report                           [ pass ]       
------------------------------------------------------------------------------
The servers were restarted 0 times
The servers were reinitialized 0 times
Spent 0.138 of 4 seconds executing testcases

Completed: All 2 tests were successful.

regards,
Umesh
[15 Nov 2023 20:02] Laurynas Biveinis
A workaround is adding -ffp-contract=off to compiler flags
[16 Nov 2023 10:12] MySQL Verification Team
Thank you, Laurynas.
Verified as described.

Sincerely,
Umesh
[21 Nov 2023 15:20] Tor Didriksen
Posted by developer:
 
Fixed by the post-push fix for
    WL#9582 Implements the use of distance scan of R-tree indexes
[20 Dec 2023 12:37] Jon Stephens
Fixed by WL#9582 in MySQL 8.3.0.

Closed.
[20 Dec 2023 12:38] Jon Stephens
Also fixed in MySQL 8.0.36.
[17 Jan 13:53] Laurynas Biveinis
commit 1b5dcfb710bb985a496f63beddbd91233fc07812
Author: Vissarion Fysikopoulos <vissarion.fysikopoulos@oracle.com>
Date:   Wed Nov 8 12:23:18 2023 +0200

    WL#9582 Implements the use of distance scan of R-tree indexes
    
    Fix a test in gis_bugs_crashes that was returning a different result
    in MacOS after pushing wl9582. The input geometry of that test is
    (geometrically) invalid so the result is unexpected. The test now
    tests the input geometry if they are valid instead of performing
    operations on them.
    
    This also fixes:
    Bug#36017208 MTR test gis.gis_bugs_crashes fails with a result difference
    
    Change-Id: Ie66aefca95ba724eafa83751e40c3a5991e329b6
    (cherry picked from commit 6a0528b6e858bd1c28d2e8b3ba4f0acf0b605758)