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

mysqltest: source inside a loop

    XMLWordPrintable

Details

    Description

      The current implementation of caching in mysqltest (q_lines, parser) breaks if the source command is executed conditionally in a loop.

      There is a "fix" for that — commit fe3ea31d93 — where the source command is executed on the first iteration of a loop even if it should've been skipped, just to read the file into a cache.

      This is, of course, wrong, because it fails if the file name is not available on the first iteration, or if t changes between iterations:

      filename not available

      let $a=1;
      while ($a < 3) {
        if ($b) {
          source $b;
        }
        let $b=1st.test;
        inc $a;
      }
      

      filename changes

      let $a=1;
      let $b=1st.test;
      while ($a < 3) {
        if ($b) {
          source $b;
        }
        let $b=2nd.test;
        inc $a;
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              serg Sergei Golubchik
              Votes:
              2 Vote for this issue
              Watchers:
              4 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.