You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mamta A. Satoor (JIRA)" <ji...@apache.org> on 2008/02/25 18:24:51 UTC

[jira] Commented: (DERBY-3422) Embedded returns wrong value for DatabaseMetaData.autoCommitFailureClosesAllResultSets()

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

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

Merged revision 629395 from trunk into 10.3.2.2 codeline(630941). The reason for merge is that I would like to merge changes for DERBY-3304 (629926) into trunk but that revision depends on DERBY-3404 (629712) which depends on DERBY-3422 (629395)


> Embedded returns wrong value for DatabaseMetaData.autoCommitFailureClosesAllResultSets()
> ----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3422
>                 URL: https://issues.apache.org/jira/browse/DERBY-3422
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: d3422.diff, d3422.stat, test.diff
>
>
> DatabaseMetaData.autoCommitFailureClosesAllResultSets() returns false both on the client and on embedded. However, the embedded driver does in fact close all open result sets when an error occurs in auto-commit mode. There is a test case in jdbc4.TestDbMetaData to test this (testAutoCommitFailure), but it only uses ResultSet.isClosed() to check whether or not the result set is closed after the failure. Because of DERBY-3404, isClosed() returns false for the result sets that have been closed because of the failure, so the test doesn't reveal the bug. If the test is changed to invoke methods on the result set (e.g. next()) instead of calling isClosed(), we'll see that the result set is in fact closed and get an SQLException with SQL state XCL16.

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