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 "Lynh Nguyen (JIRA)" <de...@db.apache.org> on 2005/01/15 03:20:17 UTC

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

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


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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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

Posted by Myrna van Lunteren <m....@gmail.com>.
On 6/2/05, Army <qo...@sbcglobal.net> wrote: 
> 
> [ http://issues.apache.org/jira/browse/DERBY-121 ]
> 
> Attached is a patch to fix the bit-shift error described in DERBY-121. The
> error exists both in the Network Server code and in the Derby Client code.

 ... since Mike brought that up, and since the situation applies to the test 
that
I wrote for DERBY-121, I went ahead and created a generic "largeData" suite 
that
contains my test for DERBY-121. 
 ...
For the new suite, I tried to create one that mimics other suites in the
harness--but as I've never created a suite before, I hope someone with more
knowledge will review the suite (ex. Myrna, do you have time? ;) 
 I looked at this (_3.patch) & it looks good to me.

Myrna

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

Posted by "A B (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-121?page=all ]

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

    Description: 
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.

  was:
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 ...)



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


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

Posted by "A B (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-121?page=all ]

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

    Attachment: derby-121_3.patch

Modified patch so that lobLengthTests.java uses a table name that correctly indicates the size of the test table we're using.

Also, per Kathey M's request, I'm including a "check-in comment" here:

----
1) Change Network Server and Derby Client code to do correct bit-shifting when processing the length of LOBs that are larger than 2^24 bytes (DERBY-121).  2) Add a new suite, "largeData", for running tests that require extra machine resources, and add the test for DERBY-121 to that suite (because the test for DERBY-121 requires extra heap memory for the server's JVM).
----

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




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

Posted by "A B (JIRA)" <de...@db.apache.org>.
     [ 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


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

Posted by "A B (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-121?page=all ]
     
A B closed DERBY-121:
---------------------


> 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


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

Posted by "A B (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-121?page=all ]

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

    Fix Version: 10.1.0.0

> 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


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

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-121?page=comments#action_66220 ]
     
Kathey Marsden commented on DERBY-121:
--------------------------------------

A corresponding change also needs to be made for the 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

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


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

Posted by "Samuel Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-121?page=all ]
     
Samuel Andrew McIntyre reopened DERBY-121:
------------------------------------------


Reopening to fix resolved field in JIRA.

> 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


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

Posted by "Samuel Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-121?page=all ]
     
Samuel Andrew McIntyre closed DERBY-121:
----------------------------------------

    Resolution: Fixed

Patch was committed with svn revision 179859. Closing.

> 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


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

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
    [ 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


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

Posted by "A B (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-121?page=all ]

A B reassigned DERBY-121:
-------------------------

    Assign To: A B

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