db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3977) Clob.truncate with a value greater than the Clob length raises different exceptions in embedded and client driver
Date Fri, 12 Dec 2008 14:30:46 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656021#action_12656021
] 

Knut Anders Hatlen commented on DERBY-3977:
-------------------------------------------

The release note looks good to me. Some minor comments:
Perhaps the example error messages should have a real number instead of {0} in them? And maybe
that section is clearer if we say "Before: XJ076: ...." and "Now: XJ079: ....".
In the "Application Changes Required" section, we should repeat that it's only when calling
Clob.truncate() one should look for XJ079 instead of XJ076, since we still use XJ076 other
places. For example: "Look for SQLState XJ079 instead of XJ076 when Clob.truncate() is called."

> Clob.truncate with a value greater than the Clob length raises different exceptions in
embedded and client driver
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3977
>                 URL: https://issues.apache.org/jira/browse/DERBY-3977
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.0, 10.4.2.0, 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3977-1a-change_emb_exception.diff, releaseNote.html
>
>
> Calling Clob.truncate with a value that is greater then the Clob length raises different
SQLExceptions in the client and the embedded driver.
>  o Client: SQLState.BLOB_LENGTH_TOO_LONG - XJ079
>  o Embedded: SQLState.BLOB_POSITION_TOO_LARGE - XJ076
> I believe the fix is simple enough  - change one of the exceptions.
> Which one most closely describes the situation?
> A release note is needed for this fix.
> Also note the following from the Java API docs:
> "void truncate(long len)
>               throws SQLException
>     Truncates the CLOB value that this Clob designates to have a length of len characters.
>     Note: If the value specified for pos is greater then the length+1 of the CLOB value
then the behavior is undefined. Some JDBC drivers may throw a SQLException while other drivers
may support this operation.
> "
> This opens for a change of behavior as well.
> There seems to an inconsistency in the docs, possibly due to rephrasing - it references
both len and pos. The latter isn't used anywhere else in the JavaDoc for truncate.
> And what should the result of truncate(length+1) be?

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