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

org.apache.derby.impl.store.access.BackingStoreHashTableFromScan does not honor ResultSet holdability

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0
    • 10.3.1.4
    • Store
    • None
    • Test under Windows Vista, Java 1.4.2_13

    Description

      After an unrelated statement on the same connection commits, and after some number of successful calls to ResultSet.next(), a subsequent call to ResultSet.next() throws an SQLException with a message like: The heap container with container id Container(-1, 1173965368428) is closed. This seems to be related to the hard-coded passing of false to the super in the constructor of org.apache.derby.impl.store.access.BackingStoreHashTableFromScan.

      Steps to reproduce:

      1. Execute a statement on a connection that returns a result set.

      2. Execute a second statement on the same connection that modifies the database and commits.

      3. Call next() on the first result set until the exception is thrown.

      Note that the number of rows that can be successfully retrieved from the result set seems to be related to the amount of data per row. Increasing the number of columns in the result set or the length of the columns causes the exception to be taken sooner.

      The attached test program demonstrates the issue.

      Attachments

        1. DerbyHoldabilityTest.java
          8 kB
          Jeff Clary
        2. DERBY-2462-1.diff
          6 kB
          Dag H. Wanvik
        3. DERBY-2462-1.stat
          0.5 kB
          Dag H. Wanvik
        4. DERBY-2462-2.diff
          19 kB
          Dag H. Wanvik
        5. DERBY-2462-2.stat
          0.8 kB
          Dag H. Wanvik
        6. DERBY-2462-3.diff
          21 kB
          Dag H. Wanvik
        7. DERBY-2462-3.stat
          1 kB
          Dag H. Wanvik
        8. DERBY-2462-4.diff
          26 kB
          Dag H. Wanvik
        9. DERBY-2462-4.stat
          1 kB
          Dag H. Wanvik

        Activity

          People

            dagw Dag H. Wanvik
            clary2137 Jeff Clary
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: