db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r433655 - in /db/derby/code/trunk/java: drda/org/apache/derby/impl/drda/DDMReader.java drda/org/apache/derby/impl/drda/DRDAConnThread.java testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out
Date Tue, 22 Aug 2006 14:57:59 GMT
Author: tmnk
Date: Tue Aug 22 07:57:58 2006
New Revision: 433655

URL: http://svn.apache.org/viewvc?rev=433655&view=rev
Log:
- Rollback DERBY-1513_DERBY-1535 see DERBY-1610 for detail - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java?rev=433655&r1=433654&r2=433655&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java Tue Aug 22 07:57:58
2006
@@ -950,19 +950,17 @@
   {
     boolean readHeader;
     int copySize;
-    MemorySavedByteArrayOutputStream baos;
+    ByteArrayOutputStream baos;
     boolean isLengthAndNullabilityUnknown = false;
 
 	
 	if (desiredLength != -1) {
         // allocate a stream based on a known amount of data
-        baos = new MemorySavedByteArrayOutputStream ((int) desiredLength - 
-													 ( checkNullability ? 1:0 )
-													 );
+        baos = new ByteArrayOutputStream ((int) desiredLength);
 	}
 	else {
         // allocate a stream to hold an unknown amount of data
-        baos = new MemorySavedByteArrayOutputStream ();
+        baos = new ByteArrayOutputStream ();
         //isLengthAndNullabilityUnknown = true;
 		// If we aren't given a  length get the whole thing.
 		desiredLength = MAX_EXTDTA_SIZE;
@@ -1786,41 +1784,6 @@
 
 		return DssConstants.DSSCHAIN;
 
-	}
-	
-
-	/**
-	 *
-	 * This class supress to allocate another memory when toByteArray() method was called.
-	 * In compensation for the saving memory, program using this class should not modify the
return value of  toByteArray() method.
-	 *
-	 */
-	static class MemorySavedByteArrayOutputStream extends ByteArrayOutputStream {
-		
-		
-		MemorySavedByteArrayOutputStream(){
-			super();
-		}
-		
-		
-		MemorySavedByteArrayOutputStream(int size){
-			buf = new byte[size];
-			count = 0;
-		}
-		
-		
-		public byte[] toByteArray() {
-			
-			if(buf.length == count){
-				return buf;
-				
-			}else{
-				return super.toByteArray();
-
-			}
-		}
-		
-		
 	}
 
 }

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?rev=433655&r1=433654&r2=433655&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Tue Aug 22
07:57:58 2006
@@ -4509,9 +4509,7 @@
 									  paramBytes.length);
 							}
 						}
-						ps.setBinaryStream(i+1, 
-										   new ByteArrayInputStream(paramBytes),
-										   paramBytes.length);
+						ps.setBytes(i+1, paramBytes);
 						break;
 					case DRDAConstants.DRDA_TYPE_LOBCSBCS:
 					case DRDAConstants.DRDA_TYPE_NLOBCSBCS:

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out?rev=433655&r1=433654&r2=433655&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out
Tue Aug 22 07:57:58 2006
@@ -1351,8 +1351,8 @@
   setAsciiStream() as batch getString=eg012d                                            
          was null false JDBC MATCH(OK)
   setAsciiStream(null) getString=null was null true JDBC MATCH(OK)
   setAsciiStream(null) as batch getString=null was null true JDBC MATCH(OK)
-  setBinaryStream() IC JDBC MATCH (INVALID)
-  setBinaryStream() as batch IC JDBC MATCH (INVALID)
+  setBinaryStream() getString=EncodedString: > 33347 51966 50 32 32 32 32 32 32 32 32
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 < was null false CLOUD EXT (OK)
+  setBinaryStream() as batch getString=EncodedString: > 33347 51966 50 32 32 32 32 32
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 < was null false CLOUD
EXT (OK)
   setBinaryStream(null) getString=null was null true CLOUD EXT (OK)
   setBinaryStream(null) as batch getString=null was null true CLOUD EXT (OK)
   setCharacterStream() getString=89                                                     
     was null false JDBC MATCH(OK)
@@ -1363,8 +1363,8 @@
   setClob() as batch getString=72                                                       
   was null false CLOUD EXT (OK)
   setClob(null) getString=null was null true CLOUD EXT (OK)
   setClob(null) as batch getString=null was null true CLOUD EXT (OK)
-  setBlob() IC JDBC MATCH (INVALID)
-  setBlob() as batch IC JDBC MATCH (INVALID)
+  setBlob() getString=EncodedString: > 12867 29251 55 32 32 32 32 32 32 32 32 32 32 32
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 < was null false CLOUD EXT (OK)
+  setBlob() as batch getString=EncodedString: > 12867 29251 55 32 32 32 32 32 32 32 32
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 < was null false CLOUD EXT (OK)
   setBlob(null) getString=null was null true CLOUD EXT (OK)
   setBlob(null) as batch getString=null was null true CLOUD EXT (OK)
   setUnicodeStream()  (0A000):Feature not implemented: setUnicodeStream. JDBC MATCH (INVALID)
@@ -1523,8 +1523,8 @@
   setAsciiStream() as batch getString=eg012d was null false JDBC MATCH(OK)
   setAsciiStream(null) getString=null was null true JDBC MATCH(OK)
   setAsciiStream(null) as batch getString=null was null true JDBC MATCH(OK)
-  setBinaryStream() IC JDBC MATCH (INVALID)
-  setBinaryStream() as batch IC JDBC MATCH (INVALID)
+  setBinaryStream() getString=EncodedString: > 33347 51966 50 < was null false CLOUD
EXT (OK)
+  setBinaryStream() as batch getString=EncodedString: > 33347 51966 50 < was null false
CLOUD EXT (OK)
   setBinaryStream(null) getString=null was null true CLOUD EXT (OK)
   setBinaryStream(null) as batch getString=null was null true CLOUD EXT (OK)
   setCharacterStream() getString=89 was null false JDBC MATCH(OK)
@@ -1535,8 +1535,8 @@
   setClob() as batch getString=72 was null false CLOUD EXT (OK)
   setClob(null) getString=null was null true CLOUD EXT (OK)
   setClob(null) as batch getString=null was null true CLOUD EXT (OK)
-  setBlob() IC JDBC MATCH (INVALID)
-  setBlob() as batch IC JDBC MATCH (INVALID)
+  setBlob() getString=EncodedString: > 12867 29251 55 < was null false CLOUD EXT (OK)
+  setBlob() as batch getString=EncodedString: > 12867 29251 55 < was null false CLOUD
EXT (OK)
   setBlob(null) getString=null was null true CLOUD EXT (OK)
   setBlob(null) as batch getString=null was null true CLOUD EXT (OK)
   setUnicodeStream()  (0A000):Feature not implemented: setUnicodeStream. JDBC MATCH (INVALID)
@@ -1695,8 +1695,8 @@
   setAsciiStream() as batch getString=eg012d was null false JDBC MATCH(OK)
   setAsciiStream(null) getString=null was null true JDBC MATCH(OK)
   setAsciiStream(null) as batch getString=null was null true JDBC MATCH(OK)
-  setBinaryStream() IC JDBC MATCH (INVALID)
-  setBinaryStream() as batch IC JDBC MATCH (INVALID)
+  setBinaryStream() getString=EncodedString: > 33347 51966 50 < was null false CLOUD
EXT (OK)
+  setBinaryStream() as batch getString=EncodedString: > 33347 51966 50 < was null false
CLOUD EXT (OK)
   setBinaryStream(null) getString=null was null true CLOUD EXT (OK)
   setBinaryStream(null) as batch getString=null was null true CLOUD EXT (OK)
   setCharacterStream() getString=89 was null false JDBC MATCH(OK)
@@ -1707,8 +1707,8 @@
   setClob() as batch getString=72 was null false CLOUD EXT (OK)
   setClob(null) getString=null was null true CLOUD EXT (OK)
   setClob(null) as batch getString=null was null true CLOUD EXT (OK)
-  setBlob() IC JDBC MATCH (INVALID)
-  setBlob() as batch IC JDBC MATCH (INVALID)
+  setBlob() getString=EncodedString: > 12867 29251 55 < was null false CLOUD EXT (OK)
+  setBlob() as batch getString=EncodedString: > 12867 29251 55 < was null false CLOUD
EXT (OK)
   setBlob(null) getString=null was null true CLOUD EXT (OK)
   setBlob(null) as batch getString=null was null true CLOUD EXT (OK)
   setUnicodeStream()  (0A000):Feature not implemented: setUnicodeStream. JDBC MATCH (INVALID)



Mime
View raw message