[
https://issues.apache.org/jira/browse/DERBY-4102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kristian Waagan updated DERBY-4102:
-----------------------------------
Attachment: derby-4102-1a.stat
derby-4102-1a.diff
Patch 1a is a prototype patch which passes the repro posted by Knut Anders. I
have started the regression tests, and will post the results tomorrow.
The patch makes Derby store the stream as a temporary Blob (in the database's
tmp directory). This is the same thing as is being done for small Blobs already.
Depending on the length of the stream, the temporary Blob will be held in
memory or on disk.
I also had a look at the Clob implementation, and it turns out that it already
works. However, that code path uses a different approach - it materializes the
Clob into memory (see SQLChar.setFrom). I'll file a separate issue for this
problem.
> Assert failure or ClassCastException in EmbedBlob when retrieving BLOB >= 32K
> -----------------------------------------------------------------------------
>
> Key: DERBY-4102
> URL: https://issues.apache.org/jira/browse/DERBY-4102
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.1.1.0, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.0.0,
> 10.6.0.0
> Reporter: Knut Anders Hatlen
> Attachments: CastExc.java, derby-4102-1a.diff, derby-4102-1a.stat
>
>
> The code below results in an assert error (with sane jars) or a
> ClassCastException (with insane jars):
> PreparedStatement ps = c.prepareStatement("values cast(? as blob)");
> int len = 32 * 1024;
> ps.setBinaryStream(1, new ByteArrayInputStream(new byte[len]), len);
> ResultSet rs = ps.executeQuery();
> while (rs.next()) {
> rs.getBlob(1);
> }
> If len < 32K there is no error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.