1. Derby
  2. DERBY-3115

With embedded driver and autocommit, when closing a connection, updates on updatable result set are lost, unless result set is closed


    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s:,,,,,
    • Fix Version/s: None
    • Component/s: JDBC
    • Urgency:
    • Bug behavior facts:
      Deviation from standard, Embedded/Client difference


      With autocommit, if an application neglects to close the result set
      and/or the statement, the closing of the connection will lose any
      updates performed via an updatable result set.

      If autocommit is false, SQL state 25000 invalid transaction state will
      be thrown, however.

      The JDBC standard requires that statements be closed when the
      connection is closed, cf. JDBC 4, section 9.4.4: "All Statement
      objects created from a given Connection object will be closed when the
      close method for the object is called." For updatable result sets,
      closing the statement would lead to a closing of the result set, and
      hence a commit of the updates.

      For the network client it works as expected.

        6 kB
        Dag H. Wanvik

        Issue Links


          Gavin made changes -
          Workflow jira [ 12414496 ] Default workflow, editable Closed status [ 12800246 ]
          Kathey Marsden made changes -
          Labels derby_triage10_5_2
          Rick Hillegas made changes -
          Affects Version/s [ 12315564 ]
          Affects Version/s [ 12314971 ]
          Kristian Waagan made changes -
          Affects Version/s [ 12313727 ]
          Affects Version/s [ 12314117 ]
          Affects Version/s [ 12313345 ]
          Affects Version/s [ 12313142 ]
          Affects Version/s [ 12312027 ]
          Affects Version/s [ 12314971 ]
          Affects Version/s [ 12312590 ]
          Kathey Marsden made changes -
          Bug behavior facts [Deviation from standard, Embedded/Client difference]
          Urgency Normal
          Dag H. Wanvik made changes -
          Link This issue relates to DERBY-3752 [ DERBY-3752 ]
          Dag H. Wanvik made changes -
          Field Original Value New Value
          Attachment [ 12367258 ]
          Dag H. Wanvik created issue -


            • Assignee:
              Dag H. Wanvik
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: