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

client-side failure to parse PreparedStatement with placeholders and escape characters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.4.0
    • Component/s: configuration
    • Labels:
      None

      Description

      We receive SQL syntax errors for valid INSERT statements that mix escape characters, quote characters, and placeholders (?). For example, given a table:

      	  create table tmail(txt mediumtext);
      

      The following will produce a syntax error, when executed as a PreparedStatement:

                insert into tmail(txt) values('some text \\''s more text ?');
      

      Example code is attached.

      We know there is client-side code to parse PreparedStatement SQL for purposes such as rolling multiple INSERTs together with UNION; our guess is that that code does not correctly parse this, and sends invalid SQL to the server.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              diego dupin Diego Dupin
              Reporter:
              blueimpb Dave Schumann
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: