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

Batch insert not return generated key

    XMLWordPrintable

Details

    Description

      When I do a batched insertion, if my first statement gives an error (like constraint violation), the rest of my insert result will not get the proper generated ID.

      Debugging the connector, the OkPacket contains the ID, but because of that validation (see in attachment) none ID is returned.

      My DataSource configuration have the following parameters:
      "cachePrepStmts" , "true"
      "cacheResultSetMetadata" , "true"
      "cacheServerConfiguration" , "true"
      "continueBatchOnError", "true"
      "dontTrackOpenResources" , "true"
      "dumpQueriesOnException", "true"
      "elideSetAutoCommits" , "true"
      "includeThreadDumpInDeadlockExceptions", "true"
      "jdbcCompliantTruncation", "true"
      "log", "DEBUG"
      "maintainTimeStats" , "false"
      "prepStmtCacheSize" , "250"
      "prepStmtCacheSqlLimit" , "2048"
      "rewriteBatchedStatements" , "true"
      "useServerPrepStmts" , "true"
      "useLocalSessionState" , "true"
      "useAffectedRows", "true"
      "useBatchMultiSend", "true")
      "useBulkStmts", "true"

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            rafaz182 Rafael R
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.