db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1032667 - in /db/derby/code/trunk/java: drda/org/apache/derby/impl/drda/DRDAConnThread.java testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
Date Mon, 08 Nov 2010 18:53:39 GMT
Author: rhillegas
Date: Mon Nov  8 18:53:39 2010
New Revision: 1032667

URL: http://svn.apache.org/viewvc?rev=1032667&view=rev
Log:
DERBY-4889: Make client behavior agree with embedded behavior when calling setByte(), setShort(),
setObject( Short ), and setObject( Byte ) on BOOLEAN-valued parameters.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java

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=1032667&r1=1032666&r2=1032667&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 Mon Nov 
8 18:53:39 2010
@@ -4640,11 +4640,7 @@ class DRDAConnThread extends Thread {
 				short paramVal = (short) reader.readShort(getByteOrder());
 				if (SanityManager.DEBUG)
 					trace("short parameter value is: "+paramVal);
- 				// DB2 does not have a BOOLEAN java.sql.bit type, it's sent as small
-				if (pmeta.getParameterType(i+1) == Types.BOOLEAN)
-					ps.setBoolean(i+1, (paramVal == 1));
-				else
-					ps.setShort(i+1, paramVal);
+                ps.setShort(i+1, paramVal);
 				break;
 			}
 			case  DRDAConstants.DRDA_TYPE_NINTEGER:

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java?rev=1032667&r1=1032666&r2=1032667&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
Mon Nov  8 18:53:39 2010
@@ -3531,13 +3531,6 @@ public class ParameterMappingTest extend
             boolean wn = rs.wasNull();
             if (wn) {
                 assertFalse(b);
-            } else if (usingDerbyNetClient() &&
-                    ("setByte".equals(method) ||
-                     "setObject(java.lang.Byte)".equals(method) ||
-                     "setShort".equals(method) ||
-                     "setObject(java.lang.Short)".equals(method))) {
-                // Special case for DERBY-4889.
-                assertFalse(b);
             } else {
                 assertTrue(b);
             }



Mime
View raw message