db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2017) Client driver can insert and commit partial data when a LOB stream throws IOException or does not match the specified length
Date Fri, 26 Mar 2010 18:06:27 GMT

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

Kristian Waagan updated DERBY-2017:
-----------------------------------

    Attachment: derby-2017-3b-fix.diff

Hi Knut Anders,

Here's another version. 3a had a bug in the checkState-method (I removed some functionality
I thought was unnecessary), which is why Derby2017LayerATest failed.
I have also made some additional changes in DRDAConnThread (refactoring). See DRDAConnThread.convertAsByteArrayInputStream
for the use of the exception suppress mechanism in the streaming classes.
Added some more JavaDoc to the methods in Request.

I also made the change you suggested - to implement read() using read(byte[], int, int). It
does reduce the complexity, and I know that the normal access pattern for these stream classes
is to read data into a buffer (we're currently using a 8 KB buffer). I considered keeping
the one-byte array as an instance variable, but chose not to.

I just started the regression tests, and will report back later with the results.
More tests are coming (using setBinaryStream).

Patch 3b ready for further review.

> Client driver can insert and commit partial data when a LOB stream throws IOException
or does not match the specified length
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2017
>                 URL: https://issues.apache.org/jira/browse/DERBY-2017
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>         Attachments: derby-2017-2a-regression_test.diff, derby-2017-2b-regression-test.diff,
derby-2017-3a-fix.diff, derby-2017-3a-fix.stat, derby-2017-3b-fix.diff, derby-2017-stream_status_preview.diff,
derby2017_try1.diff, Derby_2017_v1.diff, Derby_2017_v1.stat, StreamErrRepro.java
>
>
> When a LOB stream throws an exception or does not match the specified length, the client
driver does not raise an exception until it has finished executing the statement. Therefore,
the statement will be executed (and possibly committed) on the server even though the client
reports that the statement failed.

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