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

wrong escaping when having curly bracket in table/field name

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.6
    • Component/s: Other
    • Labels:
      None

      Description

      Initially from https://stackoverflow.com/questions/50875308/mariadb-jdbc-chokes-on-column-name-containing-curly-brackets

      There is a wrong escaping when having "{}" in table/field name.
      Example :

      try (Connection conn = DriverManager.getConnection("jdbc:mariadb://localhost/testj?user=root&log=true")) {
          Statement stmt = conn.createStatement();
          //will throw java.sql.SQLException: unknown escape sequence {tt1}
          stmt.execute("CREATE TEMPORARY TABLE `{tt1}`(`{Document id}` int, tt text)");
      }
      

        Attachments

          Activity

            People

            • Assignee:
              diego dupin Diego Dupin
              Reporter:
              diego dupin Diego Dupin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: