db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1516) Inconsistent behavior for getBytes and getSubString for embedded versus network
Date Sun, 30 Jul 2006 21:31:14 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1516?page=all ]

Kathey Marsden updated DERBY-1516:
----------------------------------

    Derby Info:   (was: [Patch Available])

Thanks Craig for the patch and thanks for volunteering for 10.2.  You bring us up to 43 contributors.
 I hope we make 50  #:)

 The code change looks good.

For the test 
  - I  think  it would be good  to test both 0 and -1 length.
  - I think we need a  full derbyall run with the patch in case other tests are affected.
  I noticed with DerbyNetClient framework the blobclob4BLOB test fails with 

753 del
< EXPECTED SQLSTATE(XJ071): Zero or negative length argument '-76' passed in a BLOB or
CLOB method.
753a753,754
> EXPECTED SQLSTATE(XJ071): Negative length argument '-76' passed in a BLOB or CLOB method.
> EXPECTED SQLSTATE(XJ071): Negative length argument '-1' passed in a BLOB or CLOB method.
Test Failed.
*** End:   blobclob4BLOB jdk1.4.2_07 DerbyNetClient 2006-07-30 14:14:40 ***

I think the output is expected but the master needs to be updated, which is a necessary pain
with our diff based harness.

I see the following  masters for blobclob4BLOB
./blobclob4BLOB.out
./DerbyNet/blobclob4BLOB.out
./DerbyNetClient/blobclob4BLOB.out

For DerbyNet some folks don't test with that framework.  If you don't please just make a not
when you submit the patch that there is a master there that may need to be updated.  Also
please assign yourself if you are working actively on this issue.  It is always confusing
when there are patches on unassigned issues because it is not really clear whether the patch
author intends to pursue the fix furthur.

Thanks

Kathey


> 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

        

Mime
View raw message