db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "V.Narayanan (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-694) Statement exceptions cause all the connection's result sets to be closed with the client driver
Date Mon, 07 Aug 2006 14:32:16 GMT
     [ http://issues.apache.org/jira/browse/DERBY-694?page=all ]

V.Narayanan updated DERBY-694:

    Attachment: DERBY-694_v4.diff

I was earlier checking for the severity of the exception by,

netSqlca.getSqlCode() > ExceptionSeverity.STATEMENT_SEVERITY

I realized that a better way of doing this would be 

ExceptionUtil.getSeverityFromIdentifier(netSqlca.getSqlState()) >

I can get the SQLState of the exception from netSqlca.getSqlState(). I understood the NetSqlca
class as holding the values of the parsing of SQLCA obtained from a ABNUOWRM. The severity
of this exception can be derived using the method 
ExceptionUtil.getSeverityFromIdentifier. This can then be used to ensure that the severity
of the exception is lesser than STATEMENT_SEVERITY.

I have modified my patch to do this. I am submitting the same.

What I not been able to do is to generate an ABNUOWRM with a severity > STATEMENT_SEVERITY.
I will however submit a patch testing the case pointed out in this issue after running derbyall
by tomorrow.


> Statement exceptions cause all the connection's result sets to be closed with the client
> -----------------------------------------------------------------------------------------------
>                 Key: DERBY-694
>                 URL: http://issues.apache.org/jira/browse/DERBY-694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions:
>            Reporter: Oyvind Bakksjo
>         Assigned To: V.Narayanan
>            Priority: Minor
>         Attachments: DERBY-694.html, DERBY-694_upload_v1.diff, DERBY-694_upload_v1.stat,
DERBY-694_v2.diff, DERBY-694_v2.stat, DERBY-694_v3.diff, DERBY-694_v3.stat, DERBY-694_v4.diff,
DERBY-694_v4.stat, StatementRollbackTest.java
> Scenario:
> Autocommit off. Have two prepared statements, calling executeQuery() on both, giving
me two result sets. Can fetch data from both with next(). If one statement gets an exception
(say, caused by a division by zero), not only this statement's result set is closed, but also
the other open resultset. This happens with the client driver, whereas in embedded mode, the
other result set is unaffected by the exception in the first result set (as it should be).

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message