[ 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.
The fix, which is described in the description of the JIRA entry, is to include
a bit-shift for bits 24 thru 31 of a lob's length. Before this patch, bits 0
thru 23 were shifted, and then bits 32 thru <max> were shifted, but bits 24 thru
31 were excluded.
The problem with the old code only shows up with lobs that have a declared
length that is represented by at least 24 bits--in other words, the lob must
have a length of at least 2^24 bytes (2^23 chars for a clob).
The fix itself is straightforward, but the catch was in creating a _test_. In
order to reproduce the problem and then verify the fix, a test must create a LOB
that is at least 2^24 bytes long and pass that on to the server. In order for
that to succeed, the server JVM must be started with more memory than usual--in
my own experience, the server required "-ms128M -mx128M" in order to correctly
handle the test case.
Since every Derby contributor is asked to run the "derbyall" suite before
submitting a patch, and since we don't want to require that all such
contributors have a machine with lots of spare memory, I did NOT want to put the
new test for DERBY-121 into the "derbyall" suite. Instead, I decided to work
off the notion described by Mike Matrigali in the following email:
http://thread.gmane.org/gmane.comp.apache.db.derby.devel/4713
In a word, Mike suggested that we create a new test suite (separate from
derbyall) intended for tests that require "large resources". We would NOT
include this new suite in "derbyall", nor would we ask every Derby contributor
to run it. Instead, we would hope that someone could volunteer the
machines/resources required to run the new suite at some regular interval (not
yet determined).
So, 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. I then created a properties file for the new
test and, in that file, specified (using the "jvmflags" property) that the test
requires at least "-mx128M -ms128M". And finally, I made a small change in the
harness/NetServer.java file so that it recognizes if heap size properties were
specified by the test and, if so, it uses them instead of the default server
heap size.
-- Patch details: The new suite.
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? ;)
To create the new suite and include my test for DERBY-121, I had to add the
following files:
- suites/largeDataTests.runall: A list of all tests that should be included in
the new "largeData" suite. Right now this just has one entry--the test for
DERBY-121.
- suites/largeData.properties: The new, top-level suite. Runs all tests listed
in largeDataTests.runall, and then calls two subsuites for running with the
DerbyNet and DerbyNetClient frameworks.
- suites/largeDataNet.properties: A new subsuite that runs all tests listed in
largeDataTests.runall, but specifies that they should all be run with the
"DerbyNet" framework.
- suites/largeDataClient.properties: A new subsuite that runs all tests listed
in largeDataTests.runall, but specifies that they should all be run with the
"DerbyNetClient" framework.
- tests/largedata/lobLengthTests.java: A new test written for DERBY-121. I've
tried to make the test generic enough that other cases related to the lengths of
very large LOBs can be added in the future (if needed).
- tests/largedata/lobLengthTests_app.properties: A properties file for the new
test. This file sets the "jvmflags" property so that the server JVM will start
with a sufficient heap size to complete the test.
- tests/largedata/copyfiles.ant: A file required so that the *_app.properties
files will be copied to the build path at compile time. I based this on files
of the same name in different test directories (ex. tests/jdbcapi).
- tests/largedata/build.xml: A build file for the new suite. I have to admit
that I'm not entirely sure how necessary this is, but since all of the other
test directories had a similar file (ex. tests/jdbcapi), I copied one of them
and made changes where I thought appropriate. If this file is unnecessary, or
if the contents need to be altered, could someone please tell me? (and in
particular, Andrew (fuzzylogic), can you take a look at this?)
** This new suite is NOT meant to completely satisfy the requirements listed by
Mike in his email above. Rather, this is just a starting point--something that
can hopefully be extended/expanded in the future to more closely fulfill the
functionality that Mike was asking about (at least, the "large resources"
functionality; the idea of long-running tests may require its own suite...)
-- Other patch info.
In order to apply the patch, you may need to create the following directory
first:
java/testing/org/apache/derbyTesting/functionTests/tests/largedata
I've successfully built and ran the new suite (using harness.RunSuite), and have
also run the new test in standalone mode (using harness.RunTest), and everything
ran correctly. I then ran the full "derbyall" suite to make sure my changes
didn't break anything: on a Windows 2000 machine with Sun JDK 1.4.2, all tests
passed (except for those that are known issues, unrelated to my changes).
I know there are a lot of patches out there for review right now, but since this
patch (namely, the new "largeData" suite) could have an impact on future
tests/patches in this area, I'm hoping some people can review this and let me
know if I need to change anything...
Feedback is appreciated,
Army
M java\drda\org\apache\derby\impl\drda\DDMReader.java
M java\testing\README.htm
A java\testing\org\apache\derbyTesting\functionTests\tests\largedata
A
java\testing\org\apache\derbyTesting\functionTests\tests\largedata\lobLengthTests.java
A
java\testing\org\apache\derbyTesting\functionTests\tests\largedata\lobLengthTests_app.properties
A
java\testing\org\apache\derbyTesting\functionTests\tests\largedata\build.xml
A
java\testing\org\apache\derbyTesting\functionTests\tests\largedata\copyfiles.ant
M java\testing\org\apache\derbyTesting\functionTests\harness\NetServer.java
A
java\testing\org\apache\derbyTesting\functionTests\master\lobLengthTests.out
A
java\testing\org\apache\derbyTesting\functionTests\suites\largeData.properties
A
java\testing\org\apache\derbyTesting\functionTests\suites\largeDataNet.properties
A
java\testing\org\apache\derbyTesting\functionTests\suites\largeDataTests.runall
A
java\testing\org\apache\derbyTesting\functionTests\suites\largeDataClient.properties
M java\testing\build.xml
M java\client\org\apache\derby\client\net\Reply.java
Index: java/drda/org/apache/derby/impl/drda/DDMReader.java
===================================================================
--- java/drda/org/apache/derby/impl/drda/DDMReader.java (revision 179619)
+++ java/drda/org/apache/derby/impl/drda/DDMReader.java (working copy)
@@ -537,11 +537,11 @@
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) << 24) +
((buffer[pos++] & 0xff) << 16) +
((buffer[pos++] & 0xff) << 8) +
((buffer[pos++] & 0xff) << 0);
@@ -549,9 +549,9 @@
break;
case 6:
ddmScalarLen =
- ((buffer[pos++] & 0xff) << 48) +
((buffer[pos++] & 0xff) << 40) +
((buffer[pos++] & 0xff) << 32) +
+ ((buffer[pos++] & 0xff) << 24) +
((buffer[pos++] & 0xff) << 16) +
((buffer[pos++] & 0xff) << 8) +
((buffer[pos++] & 0xff) << 0);
@@ -559,7 +559,7 @@
break;
case 4:
ddmScalarLen =
- ((buffer[pos++] & 0xff) << 32) +
+ ((buffer[pos++] & 0xff) << 24) +
((buffer[pos++] & 0xff) << 16) +
((buffer[pos++] & 0xff) << 8) +
((buffer[pos++] & 0xff) << 0);
Index: java/testing/README.htm
===================================================================
--- java/testing/README.htm (revision 179619)
+++ java/testing/README.htm (working copy)
@@ -452,8 +452,26 @@
</li>
</ul>
<ul>
- <li>tested on a variety of hardware takes from 3.00 - 6.00 hours </li>
+ <li>tested on a variety of hardware takes from 3.00 - 6.00 hours</li>
</ul>
+ <li>largeData<br>
+ </li>
+ <ul>
+ <li>Contains tests that deal with large amounts of data and thus
+require more machine resources. This suite is NOT run as part of
+'derbyall' because the tests it contains require either 1) more machine
+resources than what the typical Derby developer might have, and/or 2) a
+significant amount of time to run, and thus shouldn't be run every
+night.<br>
+ </li>
+ </ul>
+ <ul>
+ <li>As tests are added to this quite, it could require more and
+more
+time to run (several minutes to several hours to several days), which
+is why it is NOT included as part of the derbyall suite.<br>
+ </li>
+ </ul>
<li><a href="#Note2:"><small>See Note2</small></a><br>
</li>
</ul>
@@ -1187,12 +1205,15 @@
-DTestSpecialProps=derby.infolog.append=true
org.apache.derbyTesting.functionTests.RunTest lang/arithmetic.sql <br>
jvmflags<br>
- sets specific jvm properties for the jvm used in the test
harness, for
-instance initial memory, and heap size, or properties normally passed on with
a -D. For instance:
-<br>
+ sets specific jvm properties for the jvm used in the
+test harness, for
+instance initial memory, and heap size, or properties normally passed
+on with a -D. For instance:
+ <br>
java
-Djvmflags=ms32M -mx128M
-org.apache.derbyTesting.functionTests.RunTest lang/streamingColumn.java <br>
+org.apache.derbyTesting.functionTests.RunTest lang/streamingColumn.java
+ <br>
excludeJCC<br>
See above section <a
href="#skipping">4.10</a><br>
Index:
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/lobLengthTests.java
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/lobLengthTests.java
(revision 0)
+++
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/lobLengthTests.java
(revision 0)
@@ -0,0 +1,142 @@
+/*
+
+ Derby - Class
org.apache.derbyTesting.functionTests.tests.largedata.lobLengthTests
+
+ Copyright 2003, 2005 The Apache Software Foundation or its licensors, as
applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+
+package org.apache.derbyTesting.functionTests.tests.largedata;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.Statement;
+import java.sql.SQLException;
+
+import java.io.ByteArrayInputStream;
+
+import org.apache.derby.tools.ij;
+import org.apache.derby.tools.JDBCDisplayUtil;
+
+/**
+ * This test is part of the "largedata" suite because the use of
+ * very large LOBs can require extra memory for the server JVM.
+ * If this test was run as part of the normal 'derbyall' suite,
+ * it would require that any developer running the derbyall suite
+ * have a machine with a good deal of memory. And since _every_
+ * developer is encouraged to run 'derbyall' before submitting
+ * any patches, that would mean that _every_ developer would
+ * need a machine with lots of memory--and that's something we
+ * do NOT want to require.
+ *
+ * The specific JVM memory requirements for this test are set in the
+ * properties file for this test (lobLengthTests_app.properties).
+ * It started out as -mx128M -ms128M, but that could change in the
+ * future as more test cases are added to this class. If it's not
+ * at least 128M, the result will be OutOfMemory exceptions when
+ * running against Network Server.
+ */
+
+public class lobLengthTests {
+
+ /**
+ * Create an instance of this class and do the test.
+ */
+ public static void main(String [] args)
+ {
+ new lobLengthTests().go(args);
+ }
+
+ /**
+ * Create a JDBC connection using the arguments passed
+ * in from the harness, and then run the LOB length
+ * tests.
+ * @param args Arguments from the harness.
+ */
+ public void go(String [] args)
+ {
+ try {
+
+ // use the ij utility to read the property file and
+ // make the initial connection.
+ ij.getPropertyArg(args);
+ Connection conn = ij.startJBMS();
+
+ // Add additional tests here.
+ derby_121Test(conn);
+
+ } catch (Exception e) {
+
+ System.out.println("FAIL -- Unexpected exception:");
+ e.printStackTrace(System.out);
+
+ }
+ }
+
+ /**
+ * There was a defect (DERBY-121) where the server and client
+ * were processing lob lengths incorrectly. For lob lengths
+ * that are represented by 24 or more bits, the server and
+ * Derby client were doing incorrect bit-shifting. This
+ * test makes sure that problem no longer occurs.
+ */
+ private static void derby_121Test(Connection conn)
+ throws SQLException
+ {
+ System.out.println("Testing server read of lob length > 2^24 bytes.");
+
+ boolean autoc = conn.getAutoCommit();
+ conn.setAutoCommit(false);
+
+ // Create a test table.
+ Statement st = conn.createStatement();
+ st.execute("create table lob64KTable(bl blob(100M))");
+
+ PreparedStatement pSt = conn.prepareStatement(
+ "insert into lob64KTable(bl) values (?)");
+
+ // The error we're testing occurs when the server
+ // is shifting bits 24 and higher of the lob's
+ // length (in bytes). This means that, in order
+ // to check for the error, we have to specify a
+ // lob length (in bytes) that requires at least
+ // 24 bits to represent. Thus for a blob the
+ // length of the test data must be specified as
+ // at least 2^24 bytes (hence the '16800000' in
+ // the next line).
+ byte [] bA = new byte[16800000];
+ pSt.setBinaryStream(1,
+ new java.io.ByteArrayInputStream(bA), bA.length);
+
+ // Now try the insert; this is where the server processes
+ // the lob length.
+ try {
+ pSt.execute();
+ System.out.println("PASS.");
+ } catch (Exception e) {
+ System.out.println("FAIL -- unexpected exception:");
+ e.printStackTrace(System.out);
+ }
+
+ // Clean up.
+ try {
+ st.execute("drop table lob64KTable");
+ } catch (SQLException se) {}
+
+ conn.setAutoCommit(autoc);
+ return;
+
+ }
+}
Property changes on:
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/lobLengthTests.java
___________________________________________________________________
Name: svn:eol-style
+ native
Index:
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/lobLengthTests_app.properties
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/lobLengthTests_app.properties
(revision 0)
+++
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/lobLengthTests_app.properties
(revision 0)
@@ -0,0 +1,14 @@
+#
+# This is the system properties file for lobLengthTests.java
+#
+# *** DO NOT PUT PROPERTIES FOR THE DERBY SYSTEM IN THIS FILE.
+# *** THEY BELONG IN lobLengthTests_derby.properties.
+#
+# This file will get handed to the test on the command line in a -p <filename>
+# argument.
+#
+# The .java test has to call util.getPropertyArg and util.startJBMS
+# to process the property file. See any of the .java tests for this code.
+#
+database=jdbc:derby:wombat;create=true
+jvmflags=-mx128M -ms128M
Property changes on:
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/lobLengthTests_app.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Index:
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/build.xml
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/build.xml
(revision 0)
+++
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/build.xml
(revision 0)
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+
+<!-- ==================================================================== -->
+<!-- Derby build file -->
+<!-- ==================================================================== -->
+
+<project default="FTOtestsubdir" basedir="../../../../../../../.." >
+
+<!-- ==================================================================== -->
+<!-- Set properties -->
+<!-- ==================================================================== -->
+
+ <!-- User settings -->
+ <property file="${user.home}/ant.properties"/>
+
+ <!-- Set property lib dir -->
+ <property name="properties.dir" value="tools/ant/properties" />
+
+ <!-- Significant dirs -->
+ <property file="${properties.dir}/dirs.properties"/>
+ <property file="${properties.dir}/derbytesting.properties"/>
+
+ <!-- Compiler settings -->
+ <property file="${properties.dir}/sane${sanity}.properties"/>
+ <property file="${properties.dir}/defaultcompiler.properties"/>
+ <property file="${properties.dir}/${build.compiler}.properties"/>
+
+ <!-- Parser properties -->
+ <!--property file="${properties.dir}/parser.properties"/-->
+
+ <!-- Compile-time classpath properties files -->
+ <property file="${properties.dir}/extrapath.properties"/>
+ <property file="${properties.dir}/compilepath.properties"/>
+
+ <!-- Release and Version info -->
+ <property file="${properties.dir}/release.properties"/>
+
+ <!-- derby testing specific properties files -->
+ <property file="${ant.home}/properties/derbytesting.properties"/>
+ <property file="${user.home}/properties/derbytesting.properties"/>
+ <property name="this.dir"
value="${derby.testing.functest.dir}/tests/largedata"/>
+
+<!-- ============ Begin Targets ============== -->
+
+ <target name="FTOtestsubdir" depends="compilet1,copyfiles"/>
+
+ <!-- mkdir / init target may not be necessary, just here for reference... -->
+ <target name="init">
+ <mkdir dir="${out.dir}/${derby.testing.functest.dir}/tests/largedata"/>
+ </target>
+
+ <target name="compilet1">
+ <javac
+ bootclasspath="${empty}"
+ nowarn="on"
+ debug="${debug}"
+ depend="${depend}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ proceed="${proceed}"
+ verbose="${verbose}"
+ srcdir="${derby.testing.src.dir}"
+ destdir="${out.dir}">
+ <classpath>
+ <!--pathelement location="${oro}"/-->
+ <pathelement path="${compile.classpath}"/>
+ </classpath>
+ <include name="${this.dir}/*.java"/>
+ </javac>
+ </target>
+
+ <target name="copyfiles">
+ <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/largedata">
+ <fileset
dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/largedata"
+
includesfile="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/largedata/copyfiles.ant"/>
+ </copy>
+ </target>
+
+
+<!-- ============= End Targets ============== -->
+
+<!-- ============= End Project ============== -->
+
+</project>
+
Property changes on:
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/build.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Index:
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/copyfiles.ant
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/copyfiles.ant
(revision 0)
+++
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/copyfiles.ant
(revision 0)
@@ -0,0 +1 @@
+lobLengthTests_app.properties
Property changes on:
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/copyfiles.ant
___________________________________________________________________
Name: svn:eol-style
+ native
Index: java/testing/org/apache/derbyTesting/functionTests/harness/NetServer.java
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/harness/NetServer.java
(revision 179619)
+++ java/testing/org/apache/derbyTesting/functionTests/harness/NetServer.java
(working copy)
@@ -158,14 +158,21 @@
if ( (clPath != null) && (clPath.length()>0) )
jvm.setClasspath(clPath);
- if ( (jvmflags != null) && (jvmflags.length()>0) )
+ boolean setJvmFlags = false;
+ if ( (jvmflags != null) && (jvmflags.length()>0) ) {
jvm.setFlags(jvmflags);
+ setJvmFlags = true;
+ }
if (!jvmName.equals("jview"))
{
- jvm.setMs(16*1024*1024); // -ms16m
- jvm.setMx(32*1024*1024); // -mx32m
+ if (setJvmFlags && (jvmflags.indexOf("-ms") == -1))
+ // only setMs if no starting memory was given
+ jvm.setMs(16*1024*1024); // -ms16m
+ if (setJvmFlags && (jvmflags.indexOf("-mx") == -1))
+ // only setMx if no max memory was given
+ jvm.setMx(32*1024*1024); // -mx32m
jvm.setNoasyncgc(true); // -noasyncgc
}
Index:
java/testing/org/apache/derbyTesting/functionTests/master/lobLengthTests.out
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/master/lobLengthTests.out
(revision 0)
+++
java/testing/org/apache/derbyTesting/functionTests/master/lobLengthTests.out
(revision 0)
@@ -0,0 +1,2 @@
+Testing server read of lob length > 2^24 bytes.
+PASS.
Index:
java/testing/org/apache/derbyTesting/functionTests/suites/largeData.properties
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/suites/largeData.properties
(revision 0)
+++
java/testing/org/apache/derbyTesting/functionTests/suites/largeData.properties
(revision 0)
@@ -0,0 +1 @@
+suites=largeDataTests largeDataNet largeDataClient
Property changes on:
java/testing/org/apache/derbyTesting/functionTests/suites/largeData.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Index:
java/testing/org/apache/derbyTesting/functionTests/suites/largeDataNet.properties
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/suites/largeDataNet.properties
(revision 0)
+++
java/testing/org/apache/derbyTesting/functionTests/suites/largeDataNet.properties
(revision 0)
@@ -0,0 +1,2 @@
+framework=DerbyNet
+suites=largeDataTests
Property changes on:
java/testing/org/apache/derbyTesting/functionTests/suites/largeDataNet.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Index:
java/testing/org/apache/derbyTesting/functionTests/suites/largeDataTests.runall
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/suites/largeDataTests.runall
(revision 0)
+++
java/testing/org/apache/derbyTesting/functionTests/suites/largeDataTests.runall
(revision 0)
@@ -0,0 +1 @@
+largedata/lobLengthTests.java
Property changes on:
java/testing/org/apache/derbyTesting/functionTests/suites/largeDataTests.runall
___________________________________________________________________
Name: svn:eol-style
+ native
Index:
java/testing/org/apache/derbyTesting/functionTests/suites/largeDataClient.properties
===================================================================
---
java/testing/org/apache/derbyTesting/functionTests/suites/largeDataClient.properties
(revision 0)
+++
java/testing/org/apache/derbyTesting/functionTests/suites/largeDataClient.properties
(revision 0)
@@ -0,0 +1,2 @@
+framework=DerbyNetClient
+suites=largeDataTests
Property changes on:
java/testing/org/apache/derbyTesting/functionTests/suites/largeDataClient.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Index: java/testing/build.xml
===================================================================
--- java/testing/build.xml (revision 179619)
+++ java/testing/build.xml (working copy)
@@ -52,6 +52,7 @@
<ant
dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/derbynet"/>
<ant
dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/unit"/>
<ant
dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/i18n"/>
+ <ant
dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/largedata"/>
<ant
dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/multi/stress"/>
<ant dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/master"/>
<ant dir="${derby.testing.src.dir}/${derby.testing.suites.dir}"/>
Index: java/client/org/apache/derby/client/net/Reply.java
===================================================================
--- java/client/org/apache/derby/client/net/Reply.java (revision 179619)
+++ java/client/org/apache/derby/client/net/Reply.java (working copy)
@@ -1105,7 +1105,7 @@
case 4:
ensureBLayerDataInBuffer(4);
ddmScalarLen_ =
- ((buffer_[pos_++] & 0xff) << 32) +
+ ((buffer_[pos_++] & 0xff) << 24) +
((buffer_[pos_++] & 0xff) << 16) +
((buffer_[pos_++] & 0xff) << 8) +
((buffer_[pos_++] & 0xff) << 0);
@@ -1199,7 +1199,7 @@
// correctly in parseLengthAndMatchCodePoint(). (since the
adjustLengths() method will
// subtract the length from ddmScalarLen_)
peekedLength_ =
- ((buffer_[pos_ + 4] & 0xff) << 32) +
+ ((buffer_[pos_ + 4] & 0xff) << 24) +
((buffer_[pos_ + 5] & 0xff) << 16) +
((buffer_[pos_ + 6] & 0xff) << 8) +
((buffer_[pos_ + 7] & 0xff) << 0);