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

Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.3.1.4, 10.4.1.3
    • Fix Version/s: 10.3.3.0, 10.4.1.3
    • Component/s: JDBC
    • Labels:
      None

      Description

      In a Java procedure called from SQL any dynamic ResultSets that are created using a PreparedStatement or CallableStatement leave their activations open until :

      • the statement that created it is garbage collected (which requires the outer statement to be garbage collected)
      • and the LCC processes unused Activations.

      Dynamic ResultSets that are created by a Statement object are handled correctly because they are marked single use activation and thus the close of the ResultSet also closes the activation.

      Fix is to mark the activation as single use in EmbedResultSet when the EmbedResultSet is marked as being a dynamic ResultSet. This will then lead to the close of the ResultSet also closing the activation.

      Can't see how to write a test for this, I can see the activations stacking up in a debugger, but typically there will be no visible user impact.

        Attachments

        1. derby3247_diff.txt
          2 kB
          Daniel John Debrunner

          Activity

            People

            • Assignee:
              djd Daniel John Debrunner
              Reporter:
              djd Daniel John Debrunner
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: