db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r454312 - /db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java
Date Mon, 09 Oct 2006 08:54:59 GMT
Author: tmnk
Date: Mon Oct  9 01:54:58 2006
New Revision: 454312

URL: http://svn.apache.org/viewvc?view=rev&rev=454312
Log:
- DERBY-1610 Resolve difference of type compatibility between Embedded and NetworkServer/NetworkDriver
- adjust index for parameter using checkForEscapedCallWithResult method. - Patch by Tomohito
Nakayama (tomonaka@basil.ocn.ne.jp)

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java?view=diff&rev=454312&r1=454311&r2=454312
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement.java Mon
Oct  9 01:54:58 2006
@@ -405,7 +405,8 @@
                     agent_.logWriter_.traceEntry(this, "setNull", parameterIndex, jdbcType);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex)
;
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult(parameterIndex)
) ;
                 
                 if( ! PossibleTypes.getPossibleTypesForNull( paramType ).checkType( jdbcType
)){
                     
@@ -465,7 +466,8 @@
                     agent_.logWriter_.traceEntry(this, "setBoolean", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_GENERIC_SCALAR.checkType(paramType)
) {
                     
@@ -494,7 +496,8 @@
                     agent_.logWriter_.traceEntry(this, "setByte", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
                 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_GENERIC_SCALAR.checkType( paramType
) ){
                     
@@ -523,7 +526,8 @@
                     agent_.logWriter_.traceEntry(this, "setShort", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_GENERIC_SCALAR.checkType(paramType)
){
                     
@@ -559,7 +563,8 @@
                     agent_.logWriter_.traceEntry(this, "setInt", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_GENERIC_SCALAR.checkType(paramType)
){
                     
@@ -593,7 +598,8 @@
                     agent_.logWriter_.traceEntry(this, "setLong", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
                 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_GENERIC_SCALAR.checkType(paramType)
){
                     
@@ -621,7 +627,8 @@
                     agent_.logWriter_.traceEntry(this, "setFloat", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_GENERIC_SCALAR.checkType(paramType)
){
                     
@@ -650,7 +657,8 @@
                     agent_.logWriter_.traceEntry(this, "setDouble", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
                 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_GENERIC_SCALAR.checkType(paramType)
){
                     
@@ -679,7 +687,8 @@
                     agent_.logWriter_.traceEntry(this, "setBigDecimal", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_GENERIC_SCALAR.checkType( paramType
) ){
                     
@@ -713,7 +722,8 @@
                     agent_.logWriter_.traceEntry(this, "setDate", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
                 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_DATE.checkType(paramType) ){
                     
@@ -781,7 +791,8 @@
                     agent_.logWriter_.traceEntry(this, "setTime", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_TIME.checkType( paramType ) ){
                     
@@ -848,7 +859,8 @@
                     agent_.logWriter_.traceEntry(this, "setTimestamp", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_TIMESTAMP.checkType( paramType
) ) {
                     
@@ -922,7 +934,8 @@
                     agent_.logWriter_.traceEntry(this, "setString", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_STRING.checkType( paramType ) ){
                     PossibleTypes.throw22005Exception(agent_.logWriter_ ,
@@ -958,7 +971,8 @@
                     agent_.logWriter_.traceEntry(this, "setBytes", parameterIndex, x);
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
                 
                 if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_BYTES.checkType( paramType ) ){
                     
@@ -1007,7 +1021,8 @@
                     agent_.logWriter_.traceEntry(this, "setBinaryStream", parameterIndex,
"<input stream>", new Long(length));
                 }
                 
-                final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
+                final int paramType = 
+                    getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex
) );
 
                 if ( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_BINARYSTREAM.checkType( paramType
) ){
                     PossibleTypes.throw22005Exception(agent_.logWriter_,
@@ -1085,7 +1100,7 @@
                     agent_.logWriter_.traceEntry(this, "setAsciiStream", parameterIndex,
"<input stream>", new Long(length));
                 }
                 
-                checkTypeForSetAsciiStream(getColumnMetaDataX().getColumnType(parameterIndex),
+                checkTypeForSetAsciiStream(getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult(
parameterIndex ) ),
                                            agent_.logWriter_);
 
                 parameterIndex = checkSetterPreconditions(parameterIndex);
@@ -1213,7 +1228,7 @@
             }
             try {
                 
-                checkTypeForSetCharacterStream(getColumnMetaDataX().getColumnType(parameterIndex),
+                checkTypeForSetCharacterStream(getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult(
parameterIndex ) ),
                                                agent_.logWriter_);
                 
                 parameterIndex = checkSetterPreconditions(parameterIndex);
@@ -1252,7 +1267,7 @@
                     agent_.logWriter_.traceEntry(this, "setCharacterStream", parameterIndex,
x, new Long(length));
                 }
 
-                checkTypeForSetCharacterStream(getColumnMetaDataX().getColumnType(parameterIndex),
+                checkTypeForSetCharacterStream(getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult(
parameterIndex ) ),
                                                agent_.logWriter_);
                 
                 parameterIndex = checkSetterPreconditions(parameterIndex);
@@ -1316,7 +1331,7 @@
                     agent_.logWriter_.traceEntry(this, "setBlob", parameterIndex, x);
                 }
                 
-                checkTypeForSetBlob(getColumnMetaDataX().getColumnType(parameterIndex),
+                checkTypeForSetBlob(getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult(
parameterIndex ) ),
                                     agent_.logWriter_);
                     
                 setBlobX(parameterIndex, x);
@@ -1347,7 +1362,7 @@
                     agent_.logWriter_.traceEntry(this, "setClob", parameterIndex, x);
                 }
                 
-                checkTypeForSetClob(getColumnMetaDataX().getColumnType(parameterIndex),
+                checkTypeForSetClob(getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult(
parameterIndex ) ),
                                     agent_.logWriter_);
                 
                 setClobX(parameterIndex, x);
@@ -2666,7 +2681,7 @@
             
             try {
                 
-                checkTypeForSetClob(getColumnMetaDataX().getColumnType(parameterIndex),
+                checkTypeForSetClob(getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult(
parameterIndex ) ),
                                 agent_.logWriter_);
                 
                 checkForClosedStatement();
@@ -2736,7 +2751,7 @@
             }
 
             try {
-                checkTypeForSetBlob(getColumnMetaDataX().getColumnType(parameterIndex),
+                checkTypeForSetBlob(getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult(
parameterIndex ) ),
                                     agent_.logWriter_);
                 
                 setBinaryStreamX(parameterIndex, inputStream, -1);



Mime
View raw message