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

mysql-test-run.pl creates temporary result files in source directory after .rdiff files applying

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
    • 10.4, 10.5, 10.6
    • Tests
    • None

    Description

      mysql-test-run.pl creates temporary result files in source directory after .rdiff files applying, what can cause tests failures if several instances of mtr started.

      I propose the following fix:

      --- a/mysql-test/mysql-test-run.pl
      +++ b/mysql-test/mysql-test-run.pl
      @@ -3350,16 +3350,8 @@ sub do_before_run_mysqltest($)
             push @cmd, '--binary';
           }
           push @cmd, (qw/-r - -f -s -o/, $dest, $base_result, $resfile);
      -    if (-w $resdir) {
      -      # don't rebuild a file if it's up to date
      -      unless (-e $dest and -M $dest < -M $resfile
      -                       and -M $dest < -M $base_result) {
      -        run_system(@cmd);
      -      }
      -    } else {
      -      $cmd[-3] = $dest = $opt_tmpdir . '/' . basename($dest);
      -      run_system(@cmd);
      -    }
      +    $cmd[-3] = $dest = $opt_tmpdir . '/' . basename($dest);
      +    run_system(@cmd);
           $tinfo->{result_file} = $dest;
         }
       
      

      The drawback of this fix is that some optimization will be lost, i.e. currently temporary result file is not generated if it was already generated and there is no need to update it.

      Attachments

        Issue Links

          Activity

            People

              vlad.lesin Vladislav Lesin
              vlad.lesin Vladislav Lesin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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