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

If one batch fails all following batches fail incorrectly (Stored Procedures Only)

Details

    • Bug
    • Status: Open (View Workflow)
    • Blocker
    • Resolution: Unresolved
    • 3.5.1
    • None
    • None
    • None
    • Test container docker

    Description

      When using stored procedures, if one batch fails (e.g., due to a primary key or unique key violation), all subsequent batches in the same session also fail, even when there are no issues with the following batches.
      The stored procedure is essentially an Insert operation.

      Steps Taken:
      In the catch block, I ensure to:

      Call connection.rollback(); to roll back the current transaction.
      Call preparedStatement.clearBatch(); to clear any pending batches.
      These steps work as expected for regular CRUD operations but have no effect when the batch contains stored procedure calls.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            JakeR Jake Raeburn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.