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

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 2.3.0
    • 2.4.0
    • configuration
    • 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

              diego dupin Diego Dupin
              blueimpb Dave Schumann
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.