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

main.log_slow test failure: expects count(*) 5 got 4

Details

    Description

      I am getting following error with mariadb 10.6.20, 10.11.10 and 11.4.4 (I didn't test other versions):

      CURRENT_TEST: main.log_slow
      --- /var/tmp/portage/dev-db/mariadb-10.6.20/work/mysql/mysql-test/main/log_slow.result  2024-10-29 13:25:00.000000000 -0000
      +++ /var/tmp/portage/dev-db/mariadb-10.6.20/work/mysql/mysql-test/main/log_slow.reject  2024-12-02 12:06:53.788999850 -0000
      @@ -196,7 +196,7 @@
       b`;
       select count(*) from mysql.global_priv where length(priv)>2;
       count(*)
      -5
      +4
       drop database `a
       b`;
       use test;
       
      Result content mismatch
      

      The git bisect pointed to a commit 9af2caca33aa ("Merge branch '10.5' into 10.6"). However, the related change seems to come from commit 8d813f080b51 ("MDEV-34539 Invalid "use" and "Schema" in slow query log file with multi-line schema"), which is part of 10.5.26 and the test pass there. See also https://bugs.gentoo.org/943360

      Attachments

        Issue Links

          Activity

            arkamar Petr Vaněk created issue -
            serg Sergei Golubchik made changes -
            Field Original Value New Value

            How can I repeat it?
            I run

            FEATURES=-network-sandbox USE=extraengine ebuild /usr/portage/dev-db/mariadb/mariadb-10.6.20.ebuild test
            

            but I get

            plugins.pam             w13 [ fail ]
                    Test ended at 2024-12-05 15:46:48
            CURRENT_TEST: plugins.pam
            mysqltest: Could not open connection 'default': 1156 Plugin dialog could not be loaded: /var/tmp/portage/dev-db/mariadb-10.6.20/temp/var-tests/plugins/dialog.so: cannot open shared object file: No such file or directory
            ...
            innodb.log_file_name                     w17 [ fail ]
                    Test ended at 2024-12-05 15:47:15
            CURRENT_TEST: innodb.log_file_name
            --- /var/tmp/portage/dev-db/mariadb-10.6.20/work/mysql/mysql-test/suite/innodb/r/log_file_name.result   2024-10-29 14:25:00.000000000 +0100
            +++ /var/tmp/portage/dev-db/mariadb-10.6.20/work/mysql/mysql-test/suite/innodb/r/log_file_name.reject   2024-12-05 15:47:15.342656685 +0100
            @@ -50,7 +50,7 @@
             WHERE engine = 'innodb'
             AND support IN ('YES', 'DEFAULT', 'ENABLED');
             ENGINE SUPPORT COMMENT TRANSACTIONS    XA      SAVEPOINTS
            -FOUND 1 /InnoDB: Could not measure the size of single-table tablespace file '.*test/t2\.ibd'/ in mysqld.1.err
            +NOT FOUND /InnoDB: Could not measure the size of single-table tablespace file '.*test/t2\.ibd'/ in mysqld.1.err
             # restart
             SELECT * FROM INFORMATION_SCHEMA.ENGINES
             WHERE engine = 'innodb'
            ...
            Completed: Failed 3/5092 tests, 99.94% were successful.
             
            Failing test(s): plugins.pam plugins.pam_v1 innodb.log_file_name
            

            serg Sergei Golubchik added a comment - How can I repeat it? I run FEATURES=-network-sandbox USE=extraengine ebuild /usr/portage/dev-db/mariadb/mariadb-10 .6.20.ebuild test but I get plugins.pam w13 [ fail ] Test ended at 2024-12-05 15:46:48 CURRENT_TEST: plugins.pam mysqltest: Could not open connection 'default': 1156 Plugin dialog could not be loaded: /var/tmp/portage/dev-db/mariadb-10.6.20/temp/var-tests/plugins/dialog.so: cannot open shared object file: No such file or directory ... innodb.log_file_name w17 [ fail ] Test ended at 2024-12-05 15:47:15 CURRENT_TEST: innodb.log_file_name --- /var/tmp/portage/dev-db/mariadb-10.6.20/work/mysql/mysql-test/suite/innodb/r/log_file_name.result 2024-10-29 14:25:00.000000000 +0100 +++ /var/tmp/portage/dev-db/mariadb-10.6.20/work/mysql/mysql-test/suite/innodb/r/log_file_name.reject 2024-12-05 15:47:15.342656685 +0100 @@ -50,7 +50,7 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: Could not measure the size of single-table tablespace file '.*test/t2\.ibd'/ in mysqld.1.err +NOT FOUND /InnoDB: Could not measure the size of single-table tablespace file '.*test/t2\.ibd'/ in mysqld.1.err # restart SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' ... Completed: Failed 3/5092 tests, 99.94% were successful.   Failing test(s): plugins.pam plugins.pam_v1 innodb.log_file_name
            serg Sergei Golubchik made changes -
            Status Open [ 1 ] Needs Feedback [ 10501 ]

            I didn't disable network-sandbox in my case, try to run it without

            FEATURES=-network-sandbox

            Actually, all tests pass for me with disabled network-sandbox.

            arkamar Petr Vaněk added a comment - I didn't disable network-sandbox in my case, try to run it without FEATURES=-network-sandbox Actually, all tests pass for me with disabled network-sandbox.

            I tried both ways, I was getting the same

            Failing test(s): plugins.pam plugins.pam_v1 innodb.log_file_name
            

            in both cases

            serg Sergei Golubchik added a comment - I tried both ways, I was getting the same Failing test(s): plugins.pam plugins.pam_v1 innodb.log_file_name in both cases

            Interesting, I cannot explain that, but I understand why log_slow test fails in my case. Portage creates new networking namespace for a test environment with network-sanbox enabled and sets the hostname to localhost. Then the content of mysql.global_priv table is following:

            select * from mysql.global_priv where length(priv)>2;
            Host   User    Priv
            localhost      mariadb.sys     {"access":0,"plugin":"mysql_native_password","authentication_string":"","account_locked:true,"password_last_changed":0}
            localhost      root    {"access":18446744073709551615}
            127.0.0.1      root    {"access":18446744073709551615}
            ::1    root    {"access":18446744073709551615}
            

            However, if I run the test in an environment with disabled network-sandbox I got the following:

            select * from mysql.global_priv where length(priv)>2;
            Host   User    Priv
            localhost      mariadb.sys     {"access":0,"plugin":"mysql_native_password","authentication_string":"","account_locked:true,"password_last_changed":0}
            localhost      root    {"access":18446744073709551615}
            gentoo-799be57f        root    {"access":18446744073709551615}
            127.0.0.1      root    {"access":18446744073709551615}
            ::1    root    {"access":18446744073709551615}
            

            The table contains one more row with hostname of the test environment.

            Would it be possible to update the test and make it work in environments with hostname set to localhost?

            arkamar Petr Vaněk added a comment - Interesting, I cannot explain that, but I understand why log_slow test fails in my case. Portage creates new networking namespace for a test environment with network-sanbox enabled and sets the hostname to localhost . Then the content of mysql.global_priv table is following: select * from mysql.global_priv where length(priv)>2; Host User Priv localhost mariadb.sys {"access":0,"plugin":"mysql_native_password","authentication_string":"","account_locked:true,"password_last_changed":0} localhost root {"access":18446744073709551615} 127.0.0.1 root {"access":18446744073709551615} ::1 root {"access":18446744073709551615} However, if I run the test in an environment with disabled network-sandbox I got the following: select * from mysql.global_priv where length(priv)>2; Host User Priv localhost mariadb.sys {"access":0,"plugin":"mysql_native_password","authentication_string":"","account_locked:true,"password_last_changed":0} localhost root {"access":18446744073709551615} gentoo-799be57f root {"access":18446744073709551615} 127.0.0.1 root {"access":18446744073709551615} ::1 root {"access":18446744073709551615} The table contains one more row with hostname of the test environment. Would it be possible to update the test and make it work in environments with hostname set to localhost ?
            arkamar Petr Vaněk made changes -
            Description I am getting following error with mariadb 10.6.20, 10.11.10 and 11.4.4 (I didn't test other versions):
            {code}
            CURRENT_TEST: main.log_slow
            --- /var/tmp/portage/dev-db/mariadb-10.6.20/work/mysql/mysql-test/main/log_slow.result 2024-10-29 13:25:00.000000000 -0000
            +++ /var/tmp/portage/dev-db/mariadb-10.6.20/work/mysql/mysql-test/main/log_slow.reject 2024-12-02 12:06:53.788999850 -0000
            @@ -196,7 +196,7 @@
             b`;
             select count(*) from mysql.global_priv where length(priv)>2;
             count(*)
            -5
            +4
             drop database `a
             b`;
             use test;

            Result content mismatch
            {code}
            The git bisect pointed to a commit 9af2caca33aa ("Merge branch '10.5' into 10.6"). However, the related change seems to come from commit 8d813f080b51 ("MDEV-34539 Invalid "use" and "Schema" in slow query log file with multi-line schema"), which is part of 10.5.26 and the test pass there. See also https://bugs.gentoo.org/943360
            I am getting following error with mariadb 10.6.20, 10.11.10 and 11.4.4 (I didn't test other versions):
            {code}
            CURRENT_TEST: main.log_slow
            --- /var/tmp/portage/dev-db/mariadb-10.6.20/work/mysql/mysql-test/main/log_slow.result 2024-10-29 13:25:00.000000000 -0000
            +++ /var/tmp/portage/dev-db/mariadb-10.6.20/work/mysql/mysql-test/main/log_slow.reject 2024-12-02 12:06:53.788999850 -0000
            @@ -196,7 +196,7 @@
             b`;
             select count(*) from mysql.global_priv where length(priv)>2;
             count(*)
            -5
            +4
             drop database `a
             b`;
             use test;

            Result content mismatch
            {code}
            The git bisect pointed to a commit 9af2caca33aa ("Merge branch '10.5' into 10.6"). However, the related change seems to come from commit 8d813f080b51 ("MDEV-34539 Invalid "use" and "Schema" in slow query log file with multi-line schema"), which is part of 10.5.26 -and the test pass there-. See also https://bugs.gentoo.org/943360

            Yes, thanks, that's enough for me to fix it

            serg Sergei Golubchik added a comment - Yes, thanks, that's enough for me to fix it
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ]
            Status Needs Feedback [ 10501 ] Open [ 1 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.6 [ 24028 ]
            serg Sergei Golubchik made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Status Stalled [ 10000 ] In Testing [ 10301 ]
            serg Sergei Golubchik made changes -
            Component/s Tests [ 10800 ]
            Fix Version/s 10.6.21 [ 29953 ]
            Fix Version/s 10.11.11 [ 29954 ]
            Fix Version/s 11.4.5 [ 29956 ]
            Fix Version/s 11.7.2 [ 29914 ]
            Fix Version/s 10.6 [ 24028 ]
            Resolution Fixed [ 1 ]
            Status In Testing [ 10301 ] Closed [ 6 ]

            People

              serg Sergei Golubchik
              arkamar Petr Vaněk
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.