[
http://issues.apache.org/jira/browse/DERBY-1516?page=comments#action_12424448 ]
Craig Russell commented on DERBY-1516:
--------------------------------------
Hi Kathey,
Thanks for the feedback on the patch. A few notes:
1. I've added myself to the derby-developers list so I can assign the issue to
myself.
2. The differences in the master blobclob4BLOB.out files shows the
inconsistency of the behaviors quite nicely.
3. I can update the master blobclob4BLOB.out files once we agree what we should
test. What I understand from you is that you would like to see lengths of 0,
-1, and -76 tested, and the master files updated. But the tests in question
clobTest6 and blobTest6 are negative tests that look for exceptions. It's not
clear to me that the test for 0 (which works for the network case) should be
tested here.
4. I noticed an unusual comment in clobTest6:
// 0 or negative position value
if (isDerbyNet)
System.out.println(" negative tests for
clob.getSubstring won't run for network server until 5243 is fixed");
Can you translate this? What's a 5243?
Thanks,
Craig
> Inconsistent behavior for getBytes and getSubString for embedded versus
> network
> -------------------------------------------------------------------------------
>
> Key: DERBY-1516
> URL: http://issues.apache.org/jira/browse/DERBY-1516
> Project: Derby
> Issue Type: Bug
> Components: JDBC
> Reporter: Craig Russell
> Priority: Minor
> Attachments: DERBY-1516.patch, DERBY-1516.patch
>
>
> org.apache.derby.client.am.Clob.getSubString(pos, length) and
> org.apache.derby.client.am.Blob.getBytes(pos, length) check the length for
> less than zero.
> if ((pos <= 0) || (length < 0)) {
> throw new SqlException(agent_.logWriter_, "Invalid position "
> + pos + " or length " + length);
> But org.apache.derby.impl.jdbc.EmbedClob(pos, length) and
> org.apache.derby.impl.jdbc.EmbedBlob(pos, length) check the length for less
> than or equal to zero.
> if (length <= 0)
> throw Util.generateCsSQLException(
> SQLState.BLOB_NONPOSITIVE_LENGTH, new Integer(length));
> The specification does not disallow length of zero, so zero length should be
> allowed. I believe that the implementation in org.apache.derby.client.am is
> correct, and the implementation in org.apache.derby.impl.jdbc is incorrect.
--
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