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

No method returns update counts in batch mode

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 2.2.6
    • 2.3.0
    • batch
    • None
    • Java 8, Windows 10, MariaDB 10.2.13

    Description

      When executing a batch of UPDATE/DELETE statements using PreparedStatement.executeBatch(), there is no method that returns update counts.
      1) PreparedStatement.executeBatch() returns int[], but all values are -2 (meaning SUCCESS but not the real number of updated/deleted records)
      to get at least the total number of updated/deleted records, one can call:
      2) PreparedStatement.getUpdateCount() - returns -1
      3) PreparedStatement.getLargeUpdateCount() - returns -1
      Note that the same method (getLargeUpdateCount) returns the correct value with driver 2.1.0, which is our current workaround.
      Therefore we cannot upgrade the driver due to this bug!

      Attachments

        Issue Links

          Activity

            People

              diego dupin Diego Dupin
              Roderick Radek Wikturna
              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.