[ https://issues.apache.org/jira/browse/DERBY-3037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550147 ]
Daniel John Debrunner commented on DERBY-3037: ---------------------------------------------- On 2) calling ps.getActivation(lcc, false); and then closing it would be incorrect. That would create a new activation unrelated to the subsequent execute() call. The execute() call used here creates a single use activation (as indicated in its javadoc). A single use activation will be closed once its language ResultSet is closed (not well documented), and in fact may need cleanup since the activation.close() is called from finishAndRts() and not the result set closing. on 3) I think the comments are incorrect at line (1276) which is the justification for this bug. DERBY-827 changed the code so that the activation re-uses the result set tree, so after one execution it is not true to say the result set is not needed any more. I think this should be a close() instead of a finish(). > Language ResultSet.finish() is called even when the ResultSet is going to be > re-used. > ------------------------------------------------------------------------------------- > > Key: DERBY-3037 > URL: https://issues.apache.org/jira/browse/DERBY-3037 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.4.0.0 > Reporter: Daniel John Debrunner > Assignee: Mamta A. Satoor > Fix For: 10.3.2.2, 10.4.0.0 > > > DERBY-827 (correctly) changed the lifetime of the language ResultSet tree to > be the lifetime of the activation, but did not fix up the correct calls to > ResultSet.close() and ResultSet.finish(). > A language ResultSet's lifetime should be driven by the activation, so > activation.close() should call finish() on its ResultSet. > EmbedResultSet should call close on its language ResultSet (theResults field) > when the JDBC ResultSet is closed, it should not be calling finish() on its > ResultSet. > See comments in DERBY-827 for some more details and issues. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.