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

            serg Sergei Golubchik created issue -
            serg Sergei Golubchik made changes -
            Field Original Value New Value
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Fix Version/s 10.4 [ 22408 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 79763 ] MariaDB v4 [ 140228 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.3 [ 22126 ]

            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.