1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-01 03:26:54 +03:00
Files
mariadb/mysql-test/suite/multi_source
Brandon Nesterenko 74c189c312 MDEV-35304: Fix multi_source.connects_tried
Test multi_source.connects tried would sporadically fail with a result
mismatch resembling the following diff:

@@ -29,6 +29,7 @@
 SELECT @time_begin, CURRENT_TIMESTAMP(1)
 WHERE TIMESTAMPDIFF(SECOND, @time_begin, CURRENT_TIMESTAMP(1)) < 1;
 @time_begin  CURRENT_TIMESTAMP(1)
+2025-04-28 17:10:08.3  2025-04-28 17:10:09.2
 CREATE TEMPORARY TABLE status_sleep AS SELECT 'named' Connection_name, Connects_Tried Connects_Tried;
 SET @@SESSION.default_master_connection= '';
 include/wait_for_slave_param.inc [Connects_Tried]

This happened due to the reference variable @time_begin being set
_after_ the slave was started. That is, @time_begin was used as the
anchor point at which the time should start ticking for when
Connects_Tried should be incremented; however, MTR may not actually
be able to set it for some time after the slave had started due to
OS scheduling or heavy server load. The failure can be reproduced by
adding a 0.1s sleep statement in-between the aformentioned statements.

The fix is to set @time_begin before starting the slave so it is at
least always valid to reference as the start of the test case.
2025-04-29 11:00:37 -06:00
..
2024-02-15 13:53:21 +01:00