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-3404) EmbedResultSet.getString() returns wrong value after auto-commit with CLOSE_CURSORS_AT_COMMIT
Date Tue, 04 Mar 2008 18:19:41 GMT

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

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

BTW, the reason for locking problems without the changes into testXADataSource test is that
the test failed because it didn't get the SQL State it was expecting but as a result of failure,
the locks held by the test remained on the tables and later, when we go through the tear down
process and try to drop the tables, we ran into locking issues.

In any case, this issue of locking is not more a problem because I have changed the testXADataSource
in 10.3 codeline.

As i said earlier, I will soon merge the changes into 10.3 and then close this issue.

> EmbedResultSet.getString() returns wrong value after auto-commit with CLOSE_CURSORS_AT_COMMIT
> ---------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3404
>                 URL: https://issues.apache.org/jira/browse/DERBY-3404
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.1.4, 10.3.2.1, 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: CloseOnCommit.java, d3404-v1.diff, d3404-v1.stat
>
>
> The following code prints "null" to the console with the embedded driver:
>         Statement s = c.createStatement(ResultSet.TYPE_FORWARD_ONLY,
>                                         ResultSet.CONCUR_READ_ONLY,
>                                         ResultSet.CLOSE_CURSORS_AT_COMMIT);
>         ResultSet rs = s.executeQuery("select * from sysibm.sysdummy1");
>         rs.next();
>         c.createStatement().executeQuery("values 1").close(); // causes auto-commit
>         System.out.println(rs.getString(1));
> The call to rs.getString() should perhaps have thrown SQLException, since the auto-commit
between next() and getString() should close the ResultSet when the holdability is CLOSE_CURSORS_AT_COMMIT,
I think. Anyway, the value stored in SYSIBM.SYSDUMMY1 is 'Y' and not NULL, so it should definitely
not return null.

-- 
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