[MDEV-9299] Test main.events_2 incompatible with Debian reproducibility testing framework Created: 2015-12-17  Updated: 2016-02-17  Resolved: 2016-02-17

Status: Closed
Project: MariaDB Server
Component/s: Platform Debian
Affects Version/s: 5.5, 10.0, 10.1
Fix Version/s: 5.5.49, 10.0.25, 10.1.11

Type: Bug Priority: Minor
Reporter: Otto Kekäläinen Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

It seems that when the Debian reproducibility framework runs with a modified environment (weird locale, time etc) the test main.events_2 always fails.

main.events_2                            w3 [ fail ]
        Test ended at 2017-01-18 15:28:26
 
CURRENT_TEST: main.events_2
mysqltest: At line 18: query 'drop event e_26' failed: 1539: Unknown event 'e_26'
 
The result from queries just before the failure was:
drop database if exists events_test;
create database events_test;
use events_test;
create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5;
Warnings:
Note	1588	Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.
select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
db	name	body	definer	convert_tz(execute_at, 'UTC', 'SYSTEM')	on_completion
drop event e_26;
 
 - saving '/build/mariadb-10.0-10.0.22/builddir/mysql-test/var/3/log/main.events_2/' to '/build/mariadb-10.0-10.0.22/builddir/mysql-test/var/log/main.events_2/'
 
Retrying test main.events_2, attempt(2/3)...

See full log at https://reproducible.debian.net/logs/unstable/amd64/mariadb-10.0_10.0.22-4.build2.log.gz

Interestingly this fail seems to be limited to amd64 as the equivalent second comparison build on arm passes fully: https://reproducible.debian.net/logs/unstable/armhf/mariadb-10.0_10.0.22-3.build2.log.gz

MariaDB reproducible builds overview page: https://reproducible.debian.net/rb-pkg/unstable/amd64/mariadb-10.0.html



 Comments   
Comment by Elena Stepanova [ 2015-12-26 ]

The log isn't there anymore, and new logs are useless because the test is disabled.

Comment by Elena Stepanova [ 2016-01-24 ]

The machine where the test failed has (or had) a wrong timestamp, I just didn't notice it in the log before:

        Test ended at 2017-01-18 15:28:26

The test creates an event with execution date '2017-01-01', expecting it to be in future, so it fails.
It's an environmental issue so far, but it will become real in 2017, so we can just as well fix it now. I suggest the same simple way as events_1 was fixed first, shifting 10 years forward. events_1 fix was later overridden by the upstream one, which got rid of the hardcoded date, but with events_2 it's a bit more complicated, as it also selects the execution date, I don't think we need to bother.

diff --git a/mysql-test/r/events_2.result b/mysql-test/r/events_2.result
index 66ec00d..17eee91 100644
--- a/mysql-test/r/events_2.result
+++ b/mysql-test/r/events_2.result
@@ -1,10 +1,10 @@
 drop database if exists events_test;
 create database events_test;
 use events_test;
-create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5;
+create event e_26 on schedule at '2027-01-01 00:00:00' disable do set @a = 5;
 select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
 db     name    body    definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion
-events_test    e_26    set @a = 5      root@localhost  2017-01-01 00:00:00     DROP
+events_test    e_26    set @a = 5      root@localhost  2027-01-01 00:00:00     DROP
 drop event e_26;
 create event e_26 on schedule at NULL disable do set @a = 5;
 ERROR HY000: Incorrect AT value: 'NULL'
diff --git a/mysql-test/t/events_2.test b/mysql-test/t/events_2.test
index 3d60965..48949d5 100644
--- a/mysql-test/t/events_2.test
+++ b/mysql-test/t/events_2.test
@@ -13,7 +13,7 @@ use events_test;
 # mysql.event intact checking end
 #
 
-create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5;
+create event e_26 on schedule at '2027-01-01 00:00:00' disable do set @a = 5;
 select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
 drop event e_26;
 --error ER_WRONG_VALUE

Generated at Thu Feb 08 07:33:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.