Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-9299

Test main.events_2 incompatible with Debian reproducibility testing framework

Details

    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

      Attachments

        Activity

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

          elenst Elena Stepanova added a comment - The log isn't there anymore, and new logs are useless because the test is disabled.

          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

          elenst Elena Stepanova added a comment - 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

          People

            serg Sergei Golubchik
            otto Otto Kekäläinen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.