Bug #113722 Test main.index_merge_innodb failing with a result difference
Submitted: 23 Jan 11:34 Modified: 17 Oct 10:45
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:8.4, 9.0.0 OS:MacOS (14.2.1)
Assigned to: CPU Architecture:ARM

[23 Jan 11:34] Laurynas Biveinis
Description:
$ mtr main.index_merge_innodb
...
[ 50%] main.index_merge_innodb                   [ fail ]
        Test ended at 2024-01-23 13:32:12

CURRENT_TEST: main.index_merge_innodb
--- /Users/laurynas/vilniusdb/mysql-8.3.0/mysql-test/r/index_merge_innodb.result	2024-01-22 16:39:20
+++ /Users/laurynas/vilniusdb/mysql-8.3.0/_build-release/mysql-test/var/log/index_merge_innodb.reject	2024-01-23 14:32:11
@@ -647,24 +647,24 @@
     -> Inner hash join (no condition)  (rows=196)
         -> Filter: (((b.key7 = 1) and (b.key6 = 1) and (b.key5 = 1) and (b.key4 = 1) and (b.key3 = 1) and (b.key2 = 1) and (b.key1 = 1)) or (b.key8 = 1))  (rows=14)
             -> Deduplicate rows sorted by row ID  (rows=14)
-                -> Intersect rows sorted by row ID  (rows=13.4)
-                    -> Index range scan on b using i2 over (key2 = 1)  (rows=496)
-                    -> Index range scan on b using i3 over (key3 = 1)  (rows=496)
-                    -> Index range scan on b using i4 over (key4 = 1)  (rows=496)
-                    -> Index range scan on b using i5 over (key5 = 1)  (rows=496)
-                    -> Index range scan on b using i6,i7? over (key6 = 1)  (rows=496)
-                    -> Index range scan on b using i7 over (key7 = 1)  (rows=496)
+                -> Intersect rows sorted by row ID  (rows=13.6)
+                    -> Index range scan on b using i2 over (key2 = 1)  (rows=497)
+                    -> Index range scan on b using i3 over (key3 = 1)  (rows=497)
+                    -> Index range scan on b using i4 over (key4 = 1)  (rows=497)
+                    -> Index range scan on b using i5 over (key5 = 1)  (rows=497)
+                    -> Index range scan on b using i6,i7? over (key6 = 1)  (rows=497)
+                    -> Index range scan on b using i7 over (key7 = 1)  (rows=497)
                 -> Index range scan on b using i8 over (key8 = 1)  (rows=1)
         -> Hash
             -> Filter: (((a.key7 = 1) and (a.key6 = 1) and (a.key5 = 1) and (a.key4 = 1) and (a.key3 = 1) and (a.key2 = 1) and (a.key1 = 1)) or (a.key8 = 1))  (rows=14)
                 -> Deduplicate rows sorted by row ID  (rows=14)
-                    -> Intersect rows sorted by row ID  (rows=13.4)
-                        -> Index range scan on a using i2 over (key2 = 1)  (rows=496)
-                        -> Index range scan on a using i3 over (key3 = 1)  (rows=496)
-                        -> Index range scan on a using i4 over (key4 = 1)  (rows=496)
-                        -> Index range scan on a using i5 over (key5 = 1)  (rows=496)
-                        -> Index range scan on a using i6,i7? over (key6 = 1)  (rows=496)
-                        -> Index range scan on a using i7 over (key7 = 1)  (rows=496)
+                    -> Intersect rows sorted by row ID  (rows=13.6)
+                        -> Index range scan on a using i2 over (key2 = 1)  (rows=497)
+                        -> Index range scan on a using i3 over (key3 = 1)  (rows=497)
+                        -> Index range scan on a using i4 over (key4 = 1)  (rows=497)
+                        -> Index range scan on a using i5 over (key5 = 1)  (rows=497)
+                        -> Index range scan on a using i6,i7? over (key6 = 1)  (rows=497)
+                        -> Index range scan on a using i7 over (key7 = 1)  (rows=497)
                     -> Index range scan on a using i8 over (key8 = 1)  (rows=1)
 
 select max(a.key1 + b.key1 + a.key2 + b.key2 + a.key3 + b.key3 + a.key4 + b.key4 + a.key5 + b.key5)

mysqltest: Result content mismatch

How to repeat:
Server built with CMake options -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=Release -DMYSQL_MAINTAINER_MODE=ON -DWITH_SYSTEM_LIBS=ON -DFORCE_COLORED_OUTPUT=ON -DWITH_ZLIB=bundled
[23 Jan 11:47] MySQL Verification Team
Hi,

Thank you for your bug report.

With our release binaries we get on both x86 and ARM:

./mtr main.index_merge_innodb
Logging: ./mtr  main.index_merge_innodb
MySQL Version 8.3.0
Checking supported features
Using 'all' suites
Collecting tests
Checking leftover processes
Removing old var directory
Creating var directory '/Users/sinisa/razno/work/repo/mysql-commercial-8.3.0-macos14-x86_64/mysql-test/var'
Installing system database
Using parallel: 1

==============================================================================
                  TEST NAME                       RESULT  TIME (ms) COMMENT
------------------------------------------------------------------------------
[ 50%] main.index_merge_innodb                   [ pass ]  12250
[100%] shutdown_report                           [ pass ]
------------------------------------------------------------------------------
The servers were restarted 0 times
The servers were reinitialized 0 times
Spent 12.250 of 22 seconds executing testcases

Completed: All 2 tests were successful.

Can you pinpoint which build option makes the problem ?????
[23 Jan 13:00] MySQL Verification Team
HI Mr. Beveinis,

We have managed to build a release version of 8.3.0 with the following options:

-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=Release -DMYSQL_MAINTAINER_MODE=ON -DWITH_SYSTEM_LIBS=ON -DFORCE_COLORED_OUTPUT=ON -DWITH_ZLIB=bundled

we added some more options. 

We managed to repeat the test failure on Sonoma with M2 CPU.

Verified as reported.
[6 May 9:13] Laurynas Biveinis
Same on 8.4.0.
[9 May 9:37] MySQL Verification Team
Confirmed on 8.4.0.
[2 Jul 13:41] Laurynas Biveinis
Same on 8.4.1
[2 Jul 14:14] MySQL Verification Team
Thank you Mr. Laurinas.
[3 Jul 6:26] Laurynas Biveinis
Same on 9.0.0
[17 Oct 10:45] Laurynas Biveinis
Same on 8.4.3
[17 Oct 11:37] MySQL Verification Team
Thank you, Mr. Biveinis ......