You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "A B (JIRA)" <de...@db.apache.org> on 2005/06/02 20:28:53 UTC

[jira] Updated: (DERBY-121) Network Server reading blob/clob data size

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

A B updated DERBY-121:
----------------------

    Attachment: derby-121_2.stat
                derby-121_2.patch

Attaching patch to test and resolve this issue.  In order to test, I had to create a new suite (separate from "derbyall") since the test case requires more JVM heap size than usual.  The actual fix for the problem is as given in the description for this defect--I made that fix in both the Network Server code and in the Derby Client.

> 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
>     Priority: Minor
>  Attachments: derby-121_2.patch, derby-121_2.stat
>
> 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 the larger clob/blob (over 64K ...)

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


Re: [jira] Updated: (DERBY-121) Network Server reading blob/clob data size

Posted by Army <qo...@sbcglobal.net>.
Kathey Marsden wrote:

> I seem to recall that the client also needed the same change in
> Reply.java. Could you check that?

It did, and I think the change is already in the patch (way down at the bottom 
of the patch).

> In the test I think we should rename lob64KTable(bl blob(100M);  to
> something more suited to its size.

Oops, sorry.  Yes, I'll rename this.  I pulled it from the JIRA entry when I 
first started writing the test, and forgot to change the name later.

> When you repost your patch could you add a comment that I can use as  a
> check-in comment.

Okay.

> Could you also change the bug description to have the correct size
> instead of 64K?

Yep, will do.

Army


Re: [jira] Updated: (DERBY-121) Network Server reading blob/clob data size

Posted by Kathey Marsden <km...@sbcglobal.net>.
A B (JIRA) wrote:

>     [ http://issues.apache.org/jira/browse/DERBY-121?page=all ]
>
>A B updated DERBY-121:
>----------------------
>
>    Attachment: derby-121_2.stat
>                derby-121_2.patch
>
>Attaching patch to test and resolve this issue.  
>
>
Hi Army,

I seem to recall that the client also needed the same change in
Reply.java. Could you check that?
In the test I think we should rename lob64KTable(bl blob(100M);  to
something more suited to its size.
When you repost your patch could you add a comment that I can use as  a
check-in comment.
Could you also change the bug description to have the correct size
instead of 64K?


Thanks

Kathey