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

CONNECT engine table_type=JDBC UPDATE statement with double quote produces backslash

Details

    Description

      UPDATING a connect row with a string like this:
      My fence is 24" high

      results in the following when queried:
      My fence is 24\" high

      However INSERT of the same value results in the CORRECT behavior.
      Note this behavior is consistent between Microsoft SQL driver and Postgres driver.
      Further, in a string, I do not thing a double quote needs to be escaped at all in the SQL standard.

      Attachments

        Issue Links

          Activity

            Version 10.1.27 was recalled because of regression errors. Stay with MariaDB 10.1.26 until 10.1.28 is released.

            bertrandop Olivier Bertrand added a comment - Version 10.1.27 was recalled because of regression errors. Stay with MariaDB 10.1.26 until 10.1.28 is released.

            The regression which caused it wasn't related to CONNECT engine though (to the best of our knowledge), it was between Galera cluster and InnoDB. 10.1.28 doesn't have any connect-specific fixes comparing to 10.1.27.

            elenst Elena Stepanova added a comment - The regression which caused it wasn't related to CONNECT engine though (to the best of our knowledge), it was between Galera cluster and InnoDB. 10.1.28 doesn't have any connect-specific fixes comparing to 10.1.27.
            rdyas Robert Dyas added a comment -

            I don't think the bugs related to CONNECT I reported today are part of that regression either.

            I suspect there are likely *2* root causes:

            1) UPDATE strings and WHERE clause strings are being escaped incorrectly - the ONLY char to be escaped should be the QUOTE char specified by the driver, and that should be escaped by doubling it up, not using a backslash. No other characters should be escaped.

            2) JDBC connection.close() is not being called 100% of the time, so connection pools (ApacheWrapper) run out of connections and hangs.

            Please please TEST this so these problems do not persist in 10.1.28

            rdyas Robert Dyas added a comment - I don't think the bugs related to CONNECT I reported today are part of that regression either. I suspect there are likely * 2 * root causes: 1) UPDATE strings and WHERE clause strings are being escaped incorrectly - the ONLY char to be escaped should be the QUOTE char specified by the driver, and that should be escaped by doubling it up, not using a backslash. No other characters should be escaped. 2) JDBC connection.close() is not being called 100% of the time, so connection pools (ApacheWrapper) run out of connections and hangs. Please please TEST this so these problems do not persist in 10.1.28

            People

              bertrandop Olivier Bertrand
              rdyas Robert Dyas
              Votes:
              0 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.