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

Mayuresh Nirhali updated DERBY-595:
-----------------------------------

    Attachment: derby595.diff

Attaching patch for review with this comment.

The implementation of getTraceString methods has been moved from SQLBlob, 
SQLClob to SQLBinary, SQLChar respectively with minor modifications. This will 
ensure that Character/Binary stream associated with subtypes of SQLBinary and 
SQLChar will not be drained in logStatementText=true mode.

As for the text written in the log, the class name of the SQLType will be 
printed along with stream object. I would like to know if printing the class 
name is okay ??

Also, as mentioned in 1693, if the Object does not have stream associated with 
it, only the classname and its length is printed in log. This behavior will 
remain as is even after this fix. This will now be applicable to almost all the 
types, so I would like to know specific comments on this from someone who is 
more familiar with this part of the code.

The failing tests, jdbcapi/resultsetStream.java, lang/CharasterStreamsTest now 
pass with logStatementText=true. The Repro for 1693 also passes.
Derbyall and Suites.All ran clean.

> 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
>         Attachments: derby595.diff
>
>
> 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.

Reply via email to