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

Make the main testsuite runnable with optimizer trace enabled

Details

    Description

      This is a part of MDEV-23766.

      One can run the entire main testuite with optimizer trace enabled like so:

       ./mysql-test-run --suite=main --mysqld=--optimizer_trace=enabled=on
      

      On a 10.5-based tree, it fails just one test for me:

      CURRENT_TEST: main.opt_trace
      --- /optane/dev-git2/10.5-opt-trace-fix/mysql-test/main/opt_trace.result        2021-10-22 17:44:19.947288399 +0300
      +++ /optane/dev-git2/10.5-opt-trace-fix/mysql-test/main/opt_trace.reject        2021-10-22 18:05:12.727056238 +0300
      @@ -6,7 +6,7 @@
       OPTIMIZER_TRACE        INSUFFICIENT_PRIVILEGES
       show variables like 'optimizer_trace';
       Variable_name  Value
      -optimizer_trace        enabled=off
      +optimizer_trace        enabled=on
       set optimizer_trace="enabled=on";
       show variables like 'optimizer_trace';
       Variable_name  Value
       
      mysqltest: Result length mismatch
      
      

      If we can get that test to pass, we can get the buildbot to run this.

      We can run non-main testsuites as well, but this is considered to have less benefit.

      Attachments

        Issue Links

          Activity

            psergei Sergei Petrunia created issue -
            psergei Sergei Petrunia added a comment - - edited

            idea #1:

            move the failing check (the check for the default @@optimizer_trace value) into a separate test, e.g. main/opt_trace_default.test
            and then run

            ./mysql-test-run   --mysqld=--optimizer_trace=enabled=on  --skip-test=main.opt_trace_default
            

            idea #2:
            put the following code in main/opt_trace.test

            if ( SOME_VARIABLE_THAT_HAS_MYSQLD_ARGS  includes '--mysqld=--optimizer_trace) {
              skip "This test cannot be run when one specifies optimizer_trace setting from command line
            }
            

            I'm not sure how to express this condition

            psergei Sergei Petrunia added a comment - - edited idea #1: move the failing check (the check for the default @@optimizer_trace value) into a separate test, e.g. main/opt_trace_default.test and then run ./mysql-test-run --mysqld=--optimizer_trace=enabled=on --skip-test=main.opt_trace_default idea #2: put the following code in main/opt_trace.test if ( SOME_VARIABLE_THAT_HAS_MYSQLD_ARGS includes '--mysqld=--optimizer_trace) { skip "This test cannot be run when one specifies optimizer_trace setting from command line } I'm not sure how to express this condition
            sergei.krivonos Sergei Krivonos (Inactive) made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            sergei.krivonos Sergei Krivonos (Inactive) added a comment - psergei , 10.2 has no this test, so fixed for 10.5 https://buildbot.mariadb.org/#/grid?branch=bb-10.5-MDEV-26929
            sergei.krivonos Sergei Krivonos (Inactive) made changes -
            Status In Progress [ 3 ] In Review [ 10002 ]
            sergei.krivonos Sergei Krivonos (Inactive) added a comment - The test exists starting from 10.4 https://buildbot.mariadb.org/#/grid?branch=bb-10.4-MDEV-26929
            sergei.krivonos Sergei Krivonos (Inactive) made changes -
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.2 [ 14601 ]
            sergei.krivonos Sergei Krivonos (Inactive) made changes -
            Assignee Sergei Krivonos [ JIRAUSER49805 ] Sergei Petrunia [ psergey ]
            sergei.krivonos Sergei Krivonos (Inactive) made changes -

            Yes, indeed, optimizer trace was added in 10.4. My mistake.

            psergei Sergei Petrunia added a comment - Yes, indeed, optimizer trace was added in 10.4. My mistake.

            The patch that was pushed removes test coverage for compile-time optimizer_trace default.

            psergei Sergei Petrunia added a comment - The patch that was pushed removes test coverage for compile-time optimizer_trace default.
            psergei Sergei Petrunia added a comment - https://github.com/MariaDB/server/commit/d352bc5b6772f735a7e4bc540f578e0efc280e71

            psergei,
            The part2 looks ok. Works starting from 10.4.
            So we shouldn't push it to 10.2 as well because it shows warning treated as error (the option not yet supported).

            sergei.krivonos Sergei Krivonos (Inactive) added a comment - psergei , The part2 looks ok. Works starting from 10.4. So we shouldn't push it to 10.2 as well because it shows warning treated as error (the option not yet supported).
            sergei.krivonos Sergei Krivonos (Inactive) made changes -
            Assignee Sergei Petrunia [ psergey ] Sergei Krivonos [ JIRAUSER49805 ]
            sergei.krivonos Sergei Krivonos (Inactive) made changes -
            Assignee Sergei Krivonos [ JIRAUSER49805 ] Sergei Petrunia [ psergey ]
            Status In Review [ 10002 ] Stalled [ 10000 ]

            Hi elenst,
            Feel free to add

            --mysqld=--optimizer_trace=enabled=on
            

            to buildbot

            sergei.krivonos Sergei Krivonos (Inactive) added a comment - Hi elenst , Feel free to add --mysqld=--optimizer_trace=enabled=on to buildbot
            sergei.krivonos Sergei Krivonos (Inactive) made changes -
            Comment [ [~psergei],
            This seem good for 10.2 ]

            psergei, the part2 looks ready for 10.4 to me.

            sergei.krivonos Sergei Krivonos (Inactive) added a comment - psergei , the part2 looks ready for 10.4 to me.

            Pushed this into 10.4:

            commit d352bc5b6772f735a7e4bc540f578e0efc280e71 (HEAD -> 10.4, origin/bb-10.4-mdev26929-part2, origin/10.4, bb-10.4-mdev26929-part2)
            Author: Sergei Petrunia <psergey@askmonty.org>
            Date:   Fri Oct 29 11:44:09 2021 +0300
             
                MDEV-26929: Make the main testsuite runnable with optimizer trace enabled
                
                Part#2: check that compile-time default @@optimizer_trace is correct.
            

            psergei Sergei Petrunia added a comment - Pushed this into 10.4: commit d352bc5b6772f735a7e4bc540f578e0efc280e71 (HEAD -> 10.4, origin/bb-10.4-mdev26929-part2, origin/10.4, bb-10.4-mdev26929-part2) Author: Sergei Petrunia <psergey@askmonty.org> Date: Fri Oct 29 11:44:09 2021 +0300   MDEV-26929: Make the main testsuite runnable with optimizer trace enabled Part#2: check that compile-time default @@optimizer_trace is correct.

            Keeping this open until it is merged into all versions. Then, we can ask Elena to enable the optimizer-trace-enabled run in the buildbot.

            psergei Sergei Petrunia added a comment - Keeping this open until it is merged into all versions. Then, we can ask Elena to enable the optimizer-trace-enabled run in the buildbot.
            psergei Sergei Petrunia made changes -
            Description This is a part of MDEV-23766.

            One can run the entire main testuite with optimizer trace enabled like so:

            {code}
             ./mysql-test-run --suite=main --mysqld=--optimizer_trace=enabled=on
            {code}

            On a 10.5-based tree, it fails just one test for me:
            {code}
            CURRENT_TEST: main.opt_trace
            --- /optane/dev-git2/10.5-opt-trace-fix/mysql-test/main/opt_trace.result 2021-10-22 17:44:19.947288399 +0300
            +++ /optane/dev-git2/10.5-opt-trace-fix/mysql-test/main/opt_trace.reject 2021-10-22 18:05:12.727056238 +0300
            @@ -6,7 +6,7 @@
             OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES
             show variables like 'optimizer_trace';
             Variable_name Value
            -optimizer_trace enabled=off
            +optimizer_trace enabled=on
             set optimizer_trace="enabled=on";
             show variables like 'optimizer_trace';
             Variable_name Value

            mysqltest: Result length mismatch

            {code}

            If we can get that test to pass, we can get the buildbot to run this.

            We can run non-main testsuites as well, but this is considered to have less benefit.
            {color:red}colored text{color}This is a part of MDEV-23766.

            One can run the entire main testuite with optimizer trace enabled like so:

            {code}
             ./mysql-test-run --suite=main --mysqld=--optimizer_trace=enabled=on
            {code}

            On a 10.5-based tree, it fails just one test for me:
            {code}
            CURRENT_TEST: main.opt_trace
            --- /optane/dev-git2/10.5-opt-trace-fix/mysql-test/main/opt_trace.result 2021-10-22 17:44:19.947288399 +0300
            +++ /optane/dev-git2/10.5-opt-trace-fix/mysql-test/main/opt_trace.reject 2021-10-22 18:05:12.727056238 +0300
            @@ -6,7 +6,7 @@
             OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES
             show variables like 'optimizer_trace';
             Variable_name Value
            -optimizer_trace enabled=off
            +optimizer_trace enabled=on
             set optimizer_trace="enabled=on";
             show variables like 'optimizer_trace';
             Variable_name Value

            mysqltest: Result length mismatch

            {code}

            If we can get that test to pass, we can get the buildbot to run this.

            We can run non-main testsuites as well, but this is considered to have less benefit.

            I see that now the commit d352bc5b6772f735a7e4bc540f578e0efc280e71 has been merged to all versions.

            psergei Sergei Petrunia added a comment - I see that now the commit d352bc5b6772f735a7e4bc540f578e0efc280e71 has been merged to all versions.
            psergei Sergei Petrunia made changes -
            Description {color:red}colored text{color}This is a part of MDEV-23766.

            One can run the entire main testuite with optimizer trace enabled like so:

            {code}
             ./mysql-test-run --suite=main --mysqld=--optimizer_trace=enabled=on
            {code}

            On a 10.5-based tree, it fails just one test for me:
            {code}
            CURRENT_TEST: main.opt_trace
            --- /optane/dev-git2/10.5-opt-trace-fix/mysql-test/main/opt_trace.result 2021-10-22 17:44:19.947288399 +0300
            +++ /optane/dev-git2/10.5-opt-trace-fix/mysql-test/main/opt_trace.reject 2021-10-22 18:05:12.727056238 +0300
            @@ -6,7 +6,7 @@
             OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES
             show variables like 'optimizer_trace';
             Variable_name Value
            -optimizer_trace enabled=off
            +optimizer_trace enabled=on
             set optimizer_trace="enabled=on";
             show variables like 'optimizer_trace';
             Variable_name Value

            mysqltest: Result length mismatch

            {code}

            If we can get that test to pass, we can get the buildbot to run this.

            We can run non-main testsuites as well, but this is considered to have less benefit.
            This is a part of MDEV-23766.

            One can run the entire main testuite with optimizer trace enabled like so:

            {code}
             ./mysql-test-run --suite=main --mysqld=--optimizer_trace=enabled=on
            {code}

            On a 10.5-based tree, it fails just one test for me:
            {code}
            CURRENT_TEST: main.opt_trace
            --- /optane/dev-git2/10.5-opt-trace-fix/mysql-test/main/opt_trace.result 2021-10-22 17:44:19.947288399 +0300
            +++ /optane/dev-git2/10.5-opt-trace-fix/mysql-test/main/opt_trace.reject 2021-10-22 18:05:12.727056238 +0300
            @@ -6,7 +6,7 @@
             OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES
             show variables like 'optimizer_trace';
             Variable_name Value
            -optimizer_trace enabled=off
            +optimizer_trace enabled=on
             set optimizer_trace="enabled=on";
             show variables like 'optimizer_trace';
             Variable_name Value

            mysqltest: Result length mismatch

            {code}

            If we can get that test to pass, we can get the buildbot to run this.

            We can run non-main testsuites as well, but this is considered to have less benefit.
            psergei Sergei Petrunia made changes -
            Fix Version/s 10.4.23 [ 26807 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 126797 ] MariaDB v4 [ 134475 ]

            People

              psergei Sergei Petrunia
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.