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

fix spider rdiff files header paths

    XMLWordPrintable

Details

    Description

      I'm not sure if this needs fixing, as the patch command seems to ignore diff headers, and it is not clear to me what are the best paths to use, as there is no command telling that one path is better than the other. Thus it is not an urgent problem.

      Nevertheless, the current paths are something like ".../src/storage/spider/mysql-test/spider/r/timestamp,usual_handler.result". The best guess of correct path would be based on git root i.e. without the "../src/" prefix. The paths current in use pass everything: the patch command (see the actual command run by the mariadb-test-run.pl script below), mtr locally, and all CI builders.

      patch -r - -f -s -o /home/ycp/source/mariadb-server/10.11/src/storage/spider/mysql-test/spider/r/timestamp,usual_handler.result~672144 /home/ycp/source/mariadb-server/10.11/src/storage/spider/mysql-test/spider/r/timestamp.result /home/ycp/source/mariadb-server/10.11/src/storage/spider/mysql-test/spider/r/timestamp,usual_handler.rdiff
      

      Even if we change the header to literally "whatever" like the following the test still passes. This strongly suggests that the patch command simply ignores the header.

      --- whatever
      +++ whatever
      @@ -114,7 +114,7 @@
       connection child2_1;
       SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
       argument
      -select t0.`col_a` `col_a`,t0.`col_dt` `col_dt`,t0.`col_ts` `col_ts`,(unix_timestamp(t0.`col_ts`)) `unix_timestamp(col_ts)` from `ts_test_remote`.`tbl_a` t0
      +select `col_a`,`col_dt`,`col_ts` from `ts_test_remote`.`tbl_a`
      ...
      

      P.S. patch to print the patch command:

      modified   mysql-test/mariadb-test-run.pl
      @@ -3388,6 +3388,7 @@ sub do_before_run_mysqltest($)
             push @cmd, '--binary';
           }
           push @cmd, (qw/-r - -f -s -o/, $dest . $$, $base_result, $resfile);
      +    mtr_print(@cmd);
           if (-w $resdir) {
             # don't rebuild a file if it's up to date
             unless (-e $dest and -M $dest < -M $resfile
      

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              ycp Yuchen Pei
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.