Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-97

Backslash at the end of string in one of statements in multistatement query leads to error

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.0.0, 2.0.14
    • 3.0.1, 2.0.15
    • None
    • None

    Description

      To repeat
      OK_SIMPLE_STMT(Stmt, "INSERT INTO odbc74 (val) VALUES('one\\\\');\
      INSERT INTO odbc74 (val) VALUES(\"two\\\\\");");

      Attachments

        Activity

          The fix and the testcase have been pushed to odbc-2.0 as commit 34d583b7481dd38b1f9bceb6ec2d21e93d3642ce
          The problem was that parser would think of \ that it escapes closing quote, even if it was escaped in its turn(i.e. if it represented the character in the string.

          Lawrin Lawrin Novitsky added a comment - The fix and the testcase have been pushed to odbc-2.0 as commit 34d583b7481dd38b1f9bceb6ec2d21e93d3642ce The problem was that parser would think of \ that it escapes closing quote, even if it was escaped in its turn(i.e. if it represented the character in the string.

          There is also need to care about NO_BACKSLASH_ESCAPES mode case, which will break parsing even this fix.

          Lawrin Lawrin Novitsky added a comment - There is also need to care about NO_BACKSLASH_ESCAPES mode case, which will break parsing even this fix.

          The fix is now revision 6a1619befbe800e3e7e27ca7dd8c87f2da0d3393, and it has been pushed to odbc-2.0. It's now, as well as the testcase, takes care of the NO_BACKSLASH_ESCAPES case.

          Lawrin Lawrin Novitsky added a comment - The fix is now revision 6a1619befbe800e3e7e27ca7dd8c87f2da0d3393, and it has been pushed to odbc-2.0. It's now, as well as the testcase, takes care of the NO_BACKSLASH_ESCAPES case.

          People

            Lawrin Lawrin Novitsky
            Lawrin Lawrin Novitsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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