db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1417) Add new, lengthless overloads to the streaming api
Date Thu, 24 Aug 2006 20:15:10 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1417?page=comments#action_12430205 ] 
            
Kristian Waagan commented on DERBY-1417:
----------------------------------------

Hi Knut Anders,

Seems like I have forgotten to change the SQL state in the patch for DERBY-1417 (step two).
Let me briefly explain why the SQL state changes when patch 8a is applied. Note that the test
itself was added in DERBY-1473 (step one).

The changes in step one added new functionality to the streaming classes. Simply put, they
are now able to throw the appropariate exceptions when the stream are not the way they should
be (too long, too short, truncation error). These exceptions are specific, but because the
stream is passed down into the store, they are wrapped in a generic error message: XSDA4 -
An unexpected exception was thrown.

Before step two was applied, the streams were never passed down to the store, but instead
materialized when SQLBlob.setWidth was called. This method has a check, which throws an exception
with SQL state XCL30 - An IOException was thrown when reading a ''{0}'' from an InputStream.

The state of the error reporting when reading from streams is not optimal. DERBY-1657 are
created to track improvements.

As soon as step one has been committed (DERBY-1473), I will upload a new patch for DERBY-1417
that also changes the SQL state in the test.
I can't do it right now, because the code I need to change has not yet been committed. Committing
DERBY-1473 first should be okay.

Thanks,

> Add new, lengthless overloads to the streaming api
> --------------------------------------------------
>
>                 Key: DERBY-1417
>                 URL: http://issues.apache.org/jira/browse/DERBY-1417
>             Project: Derby
>          Issue Type: New Feature
>          Components: JDBC
>    Affects Versions: 10.2.1.0
>            Reporter: Rick Hillegas
>         Assigned To: Kristian Waagan
>             Fix For: 10.2.1.0
>
>         Attachments: derby-1417-01-castsInTests.diff, derby-1417-1a-notImplemented.diff,
derby-1417-1a-notImplemented.stat, derby-1417-2a-rstest-refactor.diff, derby-1417-3a-embimpl-and-tests.diff,
derby-1417-3a-embimpl-and-tests.stat, derby-1417-3b-embimpl-and-tests.diff, derby-1417-3b-embimpl-and-tests.stat,
derby-1417-4a-disable-psTestsDnc.diff, derby-1417-5a-brokered.diff, derby-1417-5a-brokered.stat,
derby-1417-6a-clientimpl.diff, derby-1417-6a-clientimpl.stat, derby-1417-6b-clientimpl.diff,
derby-1417-6c-clientimpl.diff, derby-1417-6d-clientimpl.diff, derby-1417-7a-clientborderfix.diff,
derby-1417-7a-clientborderfix.stat, derby-1417-8a-enableblobstreaming.diff, derby-1417-8a-enableblobstreaming.stat
>
>
> The JDBC4 Expert Group has approved a new set of overloads for the streaming methods.
These overloads do not take a length argument. Here are the new overloads:
> PreparedStatement.setAsciiStream(int parameterIndex, java.io.InputStream x)
> PreparedStatement.setBinaryStream(int parameterIndex, java.io.InputStream x)
> PreparedStatement.setCharacterStream(int parameterIndex, java.io.Reader reader)
> PreparedStatement.setNCharacterStream(int parameterIndex, java.io.Reader reader)
> PreparedStatement.setBlob(int parameterIndex, java.io.InputStream inputStream)
> PreparedStatement.setClob(int parameterIndex, java.io.Reader reader)
> PreparedStatement.setNClob(int parameterIndex, java.io.Reader reader)
> CallableStatement.setAsciiStream(java.lang.String parameterName, java.io.InputStream
x)
> CallableStatement.setBinaryStream(java.lang.String parameterName, java.io.InputStream
x)
> CallableStatement.setCharacterStream(java.lang.String parameterName, java.io.Reader reader)
> CallableStatement.setNCharacterStream(java.lang.String parameterName, java.io.Reader
reader)
> CallableStatement.setBlob(java.lang.String parameterName, java.io.InputStream inputStream)
> CallableStatement.setClob(java.lang.String parameterName, java.io.Reader reader)
> CallableStatement.setNClob(java.lang.String parameterName, java.io.Reader reader)
> ResultSet.updateAsciiStream(int columnIndex, java.io.InputStream x)
> ResultSet.updateAsciiStream(java.lang.String columnLabel, java.io.InputStream x)
> ResultSet.updateBinaryStream(int columnIndex, java.io.InputStream x)
> ResultSet.updateBinaryStream(java.lang.String columnLabel, java.io.InputStream x, int
length)
> ResultSet.updateCharacterStream(int columnIndex, java.io.Reader x)
> ResultSet.updateCharacterStream(java.lang.String columnLabel, java.io.Reader x)
> ResultSet.updateNCharacterStream(int columnIndex, java.io.Reader x)
> ResultSet.updateNCharacterStream(java.lang.String columnLabel, java.io.Reader x)  
> ResultSet.updateBlob(int columnIndex, java.io.InputStream inputStream)
> ResultSet.updateBlob(java.lang.String columnLabel, java.io.InputStream inputStream)
> ResultSet.updateClob(int columnIndex, java.io.Reader reader)
> ResultSet.updateClob(java.lang.String columnLabel, java.io.Reader reader)
> ResultSet.updateNClob(int columnIndex, java.io.Reader reader)
> ResultSet.updateNClob(java.lang.String columnLabel, java.io.Reader reader)
> We should add these new overloads soon so that the build will not break when this methods
turn up in a published Mustang build.

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

        

Mime
View raw message