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 "Mayuresh Nirhali (JIRA)" <ji...@apache.org> on 2007/04/03 13:33:33 UTC

[jira] Commented: (DERBY-595) Using derby.language.logStatementText=true can mask certain exceptions and lead to incorrect behavior in some cases

    [ https://issues.apache.org/jira/browse/DERBY-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486316 ] 

Mayuresh Nirhali commented on DERBY-595:
----------------------------------------

Thanks Kristian.

I agree with you that implementing getTraceString will solve the problem of not draining out the stream when logStatementText is true.

On my investigation to identify which SQL types will be affected by this, I found out that jdbcapi/CharacterStreamsTest also fails due to same problem with logStatementText=true. This particular test uses 4 types, SQLChar, SQLVarChar, SQLLongVarchar, SQLClob and the test failed for 3 types (except SQLClob due to fix for 1683). I tried moving the getTraceString implementation from SQLClob to SQLChar and the test passed.

Currently, I am running all the tests with logStatementText = true (on a fresh sandbox). This will present a clear and complete picture of 595.


> Using derby.language.logStatementText=true can mask certain exceptions and lead to incorrect behavior in some cases
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-595
>                 URL: https://issues.apache.org/jira/browse/DERBY-595
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.2.1.6, 10.3.0.0
>         Environment: all
>            Reporter: Sunitha Kambhampati
>         Assigned To: Mayuresh Nirhali
>
> Using derby.language.logStatementText=true can mask certain exceptions and lead to incorrect behavior.
> I observed this with tests using streams, where if valid (expected) exceptions are raised when DVD.getString() is called, the exception gets eaten up when this property is set. 
> See 
> 1)in GenericParameter.toString()
> try
> {
> return value.getString();
> }
> catch (StandardException se)
> {
> return "unexpected exception from getString() - " + se;
> }
> }
> 2)in GenericPreparedStatement.execute(), where pvs.toString() is called for the parameters.
> ________
> Reproduction:   Run the test jdbcapi/resultsetStream.java , with derby.language.logStatementText=true and  expected error exceptions wont be thrown for the error cases.  
> I looked at the tests that use streams , only the store/streamingColumn.java  uses derby.language.logStatementText=true. I'll file another bug to resolve this test.

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