Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-545

MariaDB JDBC driver prepared statement string escaping problems with CONNECT

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: 1.6.3
    • Fix Version/s: N/A
    • Component/s: JDBC 4.2 compatibility
    • Labels:
      None
    • Environment:
      Centos7

      Description

      See MDEV-13925 for details.

      It appears when using prepared statements and binding a string that contains special characters such as single quote (') or double quote (") and possibly others, the JDBC driver escapes with a \' or \".

      While this is apparently valid syntax for MariaDB, when passed to a CONNECT table it is often incompatible with the remote server (Microsoft, Postgres).

      Is there any reason not to just place the string in single quotes and escape single quotes the ANSI way (doubling up on single quotes) and not escaping any other characters?

        Attachments

          Activity

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            rdyas Robert Dyas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: