db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3304) Explicit commit inside a java procedure makes a dynamic result sets passed out unavailable
Date Mon, 04 Feb 2008 18:11:08 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565446#action_12565446
] 

Daniel John Debrunner commented on DERBY-3304:
----------------------------------------------

+                       //Do not close resultsets that do not return any rows.
+                       if ((!resultSetHoldability && resultSet.returnsRows()==true)){

Minor comment, but I think this code would be a lot easier for future readers to understand
if the "double negative" comment was switched into a positive comment.
I.e. the comment should state what the desired behaviour is, not what you don't want to happen.
Then switching the order of the tests around, would make the code more naturally follow the
comment.

  // Close result sets that return rows and are not held across commit. This is to implement
  // closing JDBC result sets that are CLOSE_CURSOR_ON_COMMIT at commit time.
  if (resultSet.returnsRows() && !resultSetHoldability)







> Explicit commit inside a java procedure makes a dynamic result sets passed out unavailable
> ------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3304
>                 URL: https://issues.apache.org/jira/browse/DERBY-3304
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Mamta A. Satoor
>         Attachments: Main.java
>
>
> Repro (Main.java) that shows changed behavior after svn 602991
> (the patch committed for this issue). It seems a regression: (originally from Dag H.
Wanvik attached to DERBY-1585)
> An explicit commit inside a stored procedure makes a dynamic result sets passed out unavailable,
even if the commit is executed *prior* to the result set; as in the repro.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message