[
https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694119#action_12694119
]
Yun Lee commented on DERBY-3991:
--------------------------------
Kistian, thanks for your comments.
>You could consider trying to access the empty string using a stream too
>(currently the test I wrote originally only uses getSubString).
I will do it later.
>Users will also see a different error message with the embedded driver now.
>Does this warrant a release note?
>The new error message is both more specific and it is the same as the one
>thrown by the client driver, which is justification enough for the change.
I'm not sure. Do you mean I replaced 'SQLState.BLOB_BAD_POSITION' with
'SQLState.BLOB_NONPOSITIVE_LENGTH' in EmbedClob.java? If you do, I just want to
give a clearer exception message.As a new comer, I don't know whether it's
proper to do so, and don't know what it does with ' a release note'. Wish for
your explanation.
Thanks!
> Clob.truncate(0) throws exception
> ---------------------------------
>
> Key: DERBY-3991
> URL: https://issues.apache.org/jira/browse/DERBY-3991
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
> Reporter: Kristian Waagan
> Assignee: Yun Lee
> Priority: Minor
> Attachments: derby-3991-1a-ClobTruncateZeroTest.diff,
> derby-3991-2a.diff
>
>
> Truncating a Clob to zero length is allowed according to the JDBC
> specification, which says the following about the len argument (in the
> @throws tag):
> "SQLException - if there is an error accessing the CLOB value or if len is
> less than 0 "
> Derby throws an exception if zero is passed to truncate.
> A quick inspection of the code suggests that truncating a Clob to the empty
> string is easy to support.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.