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

Harmonize sql state thrown when closing a connection with pending transaction between net end embedded drivers

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: None
    • Component/s: JDBC
    • Labels:
      None

      Description

      • Embedded (thrown from EmbedConnection#close):

      State: 25000 (LANG_INVALID_TRANSACTION_STATE)
      Text in English locale: "Invalid transaction state."

      • Network client (thrown from Connection#checkForTransactionInProgress)

      State: 25001 (CANNOT_CLOSE_ACTIVE_CONNECTION)
      Text in English locale: "Cannot close a connection while a transaction is still active."

      I don't see why these should differ between the drivers. The network client
      error message is more explanatory, I think.

      The standard says about disconnect statement, section 17.3, general
      rule 6: If any SQL-connection in L is active, then an exception
      condition is raised: invalid transaction state - active SQL-transaction.

      According to section 23.1 SQLSTATE (p.1075):

      Subcondition: Active SQL transaction
      subclass: 001

      so, in this case, so it would appear that the use of 25001 is correct,
      not 25000. I suggest we change embedded to use 25001 also, and release
      note it, since it has application impact.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dagw Dag H. Wanvik

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment