[ 
http://issues.apache.org/jira/browse/DERBY-121?page=comments#action_12312556 ] 

Kathey Marsden commented on DERBY-121:
--------------------------------------

Committed ...

Sending        java\client\org\apache\derby\client\net\Reply.java
Sending        java\drda\org\apache\derby\impl\drda\DDMReader.java
Sending        java\testing\README.htm
Sending        java\testing\build.xml
Sending        
java\testing\org\apache\derbyTesting\functionTests\harness\NetServer.java
Adding         
java\testing\org\apache\derbyTesting\functionTests\master\lobLengthTests.out
Adding         
java\testing\org\apache\derbyTesting\functionTests\suites\largeData.properties
Adding         
java\testing\org\apache\derbyTesting\functionTests\suites\largeDataClient.properties
Adding         
java\testing\org\apache\derbyTesting\functionTests\suites\largeDataNet.properties
Adding         
java\testing\org\apache\derbyTesting\functionTests\suites\largeDataTests.runall
Adding         
java\testing\org\apache\derbyTesting\functionTests\tests\largedata
Adding         
java\testing\org\apache\derbyTesting\functionTests\tests\largedata\build.xml
Adding         
java\testing\org\apache\derbyTesting\functionTests\tests\largedata\copyfiles.ant
Adding         
java\testing\org\apache\derbyTesting\functionTests\tests\largedata\lobLengthTests.java
Adding         
java\testing\org\apache\derbyTesting\functionTests\tests\largedata\lobLengthTests_app.properties
Transmitting file data ..............
Committed revision 179859.

> Network Server reading blob/clob data size
> ------------------------------------------
>
>          Key: DERBY-121
>          URL: http://issues.apache.org/jira/browse/DERBY-121
>      Project: Derby
>         Type: Bug
>   Components: Network Server
>     Versions: 10.1.0.0
>  Environment: The is a bit shift typo in Network Server reading clob/blob 
> data size
>     Reporter: Lynh Nguyen
>     Assignee: A B
>     Priority: Minor
>      Fix For: 10.1.0.0
>  Attachments: derby-121_2.stat, derby-121_3.patch
>
> in DDMReader.java 
> ...
> ... readLengthAndCodePoint() ... { 
> ...
> switch (numberOfExtendedLenBytes) {
>                       case 8:
>                                ddmScalarLen =
>                                       ((buffer[pos++] & 0xff) << 64) +
>                                       ((buffer[pos++] & 0xff) << 56) +
>                                       ((buffer[pos++] & 0xff) << 48) +
>                                       ((buffer[pos++] & 0xff) << 40) +
>                                       ((buffer[pos++] & 0xff) << 32) +
>                                       ((buffer[pos++] & 0xff) << 16) +
>                                       ((buffer[pos++] & 0xff) << 8) +
>                                       ((buffer[pos++] & 0xff) << 0);
>                               adjustSize = 12;
>                               break;
>                       case 6:
>                               ddmScalarLen =
>                                       ((buffer[pos++] & 0xff) << 48) +
>                                       ((buffer[pos++] & 0xff) << 40) +
>                                       ((buffer[pos++] & 0xff) << 32) +
>                                       ((buffer[pos++] & 0xff) << 16) +
>                                       ((buffer[pos++] & 0xff) << 8) +
>                                       ((buffer[pos++] & 0xff) << 0);
>                               adjustSize = 10;
>                               break;
>                       case 4:
>                               ddmScalarLen =
>                                       ((buffer[pos++] & 0xff) << 32) +
>                                       ((buffer[pos++] & 0xff) << 16) +
>                                       ((buffer[pos++] & 0xff) << 8) +
>                                       ((buffer[pos++] & 0xff) << 0);
>                               adjustSize = 8;
>                               break;
> ...
> The shift bits should be in order:
> 0,8,16,24 
> 0,8,16,24,32,40
> 0,8,16,24,32,40,48,56
> This will only affect a lob if its length requires at least 24 bits--i.e. if 
> the lob has a length of at least 2^24 bytes.

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

Reply via email to