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

executeBatch() uses same sequence for all records

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 3.2.0, 3.1.4
    • N/A
    • batch
    • None

    Description

      We use the driver of mariadb to do a batch insert with the following query:

        INSERT INTO PROCESS_ENTITY_STATUS(PROCESS_ENTITY_STATUS_ID, PROCESS_ID, \
        ENTITY_ID, DATA_ID, STATUS, ATTEMPTS, LAST_TRANSACTION_ID, LAST_TRANSACTION_ATTEMPT, CREATED_DATE, CREATED_USER ) \
        VALUES ((SELECT NEXTVAL(SEQ_PROCESS_ENTITY_STATUS)),:processId, \
        :entityId, :dataId, :status, :attempts, :lastTransactionId, :lastTransactionAttempt, \
        :createdDate, :createdUser)
      

      We use a sequence for one of the values:

      SELECT NEXTVAL(SEQ_PROCESS_ENTITY_STATUS)
      

      What we found out, is that when the insert is done we see that the three records we are inserting in batch mode, have the same sequence value. Find attached the file.

      This does not happen with the version 2.7.10 (we have confirmed it), it is happening from 3.0.3 above.

      Attachments

        Issue Links

          Activity

            People

              diego dupin Diego Dupin
              fcanovas Francisco Canovas Camino
              Votes:
              1 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.