Issue Details (XML | Word | Printable)

Key: DERBY-3422
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Knut Anders Hatlen
Reporter: Knut Anders Hatlen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

Embedded returns wrong value for DatabaseMetaData.autoCommitFailureClosesAllResultSets()

Created: 15/Feb/08 02:41 PM   Updated: 25/Feb/08 05:24 PM
Return to search
Component/s: JDBC
Affects Version/s: 10.4.1.3
Fix Version/s: 10.3.3.0, 10.4.1.3

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works d3422.diff 2008-02-16 04:06 PM Knut Anders Hatlen 4 kB
File Licensed for inclusion in ASF works d3422.stat 2008-02-16 04:06 PM Knut Anders Hatlen 0.2 kB
File Licensed for inclusion in ASF works test.diff 2008-02-15 02:53 PM Knut Anders Hatlen 3 kB

Resolution Date: 20/Feb/08 09:36 AM


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.