Uploaded image for project: 'Derby'
  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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.3.0, 10.6.1.0, 10.7.1.1
    • None
    • JDBC
    • Normal
    • Deviation from standard, Embedded/Client difference

    Description

      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.

      Attachments

        1. Main.java
          6 kB
          Dag H. Wanvik

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dagw Dag H. Wanvik
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: