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

getGeneratedKey implementation correction for multiple result for one query

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 2.4.2
    • batch
    • None

    Description

      When executing a single query, getGeneratedKey currently might return a resultset with multiple keys.

      example :
      INSERT INTO testMultiGeneratedKey (text) VALUES ('someValue'), ('someOtherValue');

      But MariaDB protocol returns only one OK_Packet indicating first automatically generated Id and number of affected rows.

      This can cause alternate issues like INSERT ...ON DUPLICATE KEY that return 2 affected rows in case of existing ID. (And so returning 2 rows in getGeneratedKey)

      Driver must not trying to be better than what server returns.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 2d
                  2d

                  Git Integration

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