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

Rewrite batch is broken for prepared statements for binary data

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 1.1.8
    • 1.1.9
    • Other
    • None

    Description

      Rewrite batch is broken for prepared statements. It is broken because it uses toSQL(), which is broken because it does corrupt binary data, they are not encoded as UTF8, and thus can not be converted to string easily.

      I believe prepared statements can do without rewriteBatch for a while, and also that toSQL() in its current form needs to go (it will blow memory with streams and blobs)

      . A cleaner alternative for prepared batching , perhaps or the future, is to combine multiple prepared statements into large one, e.g

      st1 :insert into t values( ? ) , ps.setString(1,"a")
      st2 : insert into t values( ? ), ps.setString(1,"b")

      converts into
      insert into t values( ? ),( ? ) ; ps.setString(1,"a"); ps.setString(2,"b")

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            wlad Vladislav Vaintroub
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.