db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3304) Explicit commit inside a java procedure makes a dynamic result sets passed out unavailable
Date Tue, 26 Feb 2008 20:30:52 GMT

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

Mamta A. Satoor commented on DERBY-3304:
----------------------------------------

Knut suggested if we can use EmbedResultSet.isClosed() rather than EmbedResultSet.checkIfClosed()
which requires us to catch the exception and determine if the resultset is closed. I had gone
that path when I was working on the patch but EmbedResultSet.isClosed() is doing more than
just checking if the JDBC resultset or language resultset is closed. It causes following additional
code to execute

EmbedResultSet.isClosed() calls EmbedResultSet.checkExecIfClosed which has the following extra
piece of code
        // Currently disconnected, i.e. a detached gobal transaction
        if (appConn == null)
            throw Util.noCurrentConnection();
            
        if (appConn.isClosed()) {
            closeCurrentStream();
            isClosed = true;
            throw Util.noCurrentConnection();
        }

I can't remember which test failed when I used EmbedResultSet.isClosed() rather than EmbedResultSet.checkIfClosed()
but the cuplrit was the connection related code in checkExecIfClosed.

> 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