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

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.3.0, 10.6.1.0, 10.7.1.1
    • Fix Version/s: None
    • Component/s: JDBC
    • Urgency:
      Normal
    • Bug behavior facts:
      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.

      1. Main.java
        6 kB
        Dag H. Wanvik

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Dag H. Wanvik
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development