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

mysqltest fails to parse REPLACE() with backslash replacement

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.6.24
    • 10.6, 10.11, 11.4, 11.8
    • None
    • None

    Description

      When writing test cases in mysqltest that include a REPLACE() function where the replacement string is a backslash (), the parser throws a syntax error

      TestCase:

      let $rp21 = $(replace("path/to/file", "/", "\\"));
      -- echo replace("path/to/file", "/", "\\") -> $rp21;
      

      Mysqltest output:

      CURRENT_TEST: main.rep1
      mysqltest: At line 1: Syntax error: Unmatched quote in expression
      

      Server output:

      MariaDB [(none)]> select replace("path/to/file", "/", "\\");
      +------------------------------------+
      | replace("path/to/file", "/", "\\") |
      +------------------------------------+
      | path\to\file                       |
      +------------------------------------+
      1 row in set (0.001 sec)
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              poojalamba16 Pooja Rani Lamba
              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.