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

Result sets opened before a savepoint could be left open when the savepoint is rolled back

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: JDBC, SQL
    • Urgency:
      Normal
    • Issue & fix info:
      Repro attached

      Description

      Cf discussion on DERBY-5545 with John Hendikx.

      Quote from SQL standard:

      In section 16.7 <rollback statement>, section General Rule 3) <savepoint specified>, clause g) reads:

      "For every open cursor CR in any SQL-client module associated with the current SQL-transaction that
      was opened subsequent to the establishment of S, the following statement is implicitly executed:
      CLOSE CR"

      I take that to mean that the cursor should remain open iff it was established prior to the savepoint, and, by analogy, the JDBC result set should stay open too.

      and clause h):

      "The status of any open cursors in any SQL-client module associated with the current SQL-transaction
      that were opened by the current SQL-transaction before the establishment of S is implementation defined. "

      We could allow result sets to stay open since the current behavior closing them maybe be unexpected for users, cf. DERBY-5545.

        Attachments

        1. Derby5921.java
          1 kB
          Dag H. Wanvik

          Activity

            People

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

              Dates

              • Created:
                Updated: