Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-1159

PreparedStatement.executeUpdate throws a XJ05C exception in a global transaction if the statement is HOLD_CURSORS_OVER_COMMIT

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.1.2.1, 10.2.1.6
    • Fix Version/s: 10.1.3.1, 10.2.1.6
    • Component/s: JDBC
    • Labels:
      None

      Description

      SQLSTATE(XJ05C): Cannot set holdability ResultSet.HOLD_CURSORS_OVER_COMMIT for
      a global transaction.

      Exception is thrown in client, in embedded the statement executes successfully.
      Since HOLD_CURSORS_OVER_COMMIT only applies to ResultSets and executeUpdate states it only succeeds if the statement
      does not generate ResultSets, then this combination should succeed.

      Probably related to the fact that in embedded an execute() call on the same PreparedStatement will thrown a XJ05C exception

      Workaround is to prepare the statement explicitly with CLOSE_CURSORS_AT_COMMIT.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                djd Daniel John Debrunner
                Reporter:
                djd Daniel John Debrunner
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: