db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r312801 - in /db/derby/code/branches/10.1/java: drda/org/apache/derby/impl/drda/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ testing/org/apache/derbyTesting/functionTe...
Date Tue, 11 Oct 2005 03:47:05 GMT
Author: kmarsden
Date: Mon Oct 10 20:46:53 2005
New Revision: 312801

URL: http://svn.apache.org/viewcvs?rev=312801&view=rev
Log:
DERBY-149
Server hang when invalid string is bound to datetime columns.
Merge change 291721 from trunk


Modified:
    db/derby/code/branches/10.1/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/parameterMapping.out
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ver2.6/parameterMapping.out
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/parameterMapping.out
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/parameterMapping.out
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/parameterMapping.java
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java

Modified: db/derby/code/branches/10.1/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?rev=312801&r1=312800&r2=312801&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ db/derby/code/branches/10.1/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Mon
Oct 10 20:46:53 2005
@@ -3793,7 +3793,7 @@
 		} 
 		catch (SQLException se)
 		{
-			skipRemainder(false);
+			skipRemainder(true);
 			throw se;
 		}
 	}

Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/parameterMapping.out
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/parameterMapping.out?rev=312801&r1=312800&r2=312801&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/parameterMapping.out
(original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/parameterMapping.out
Mon Oct 10 20:46:53 2005
@@ -113,6 +113,7 @@
   setString() as batch getShort=97 was null false JDBC MATCH(OK)
   setString(null) getShort=0 was null true JDBC MATCH(OK)
   setString(null) as batch getShort=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getShort=0 was null true CLOUD EXT (OK)
@@ -285,6 +286,7 @@
   setString() as batch getInt=97 was null false JDBC MATCH(OK)
   setString(null) getInt=0 was null true JDBC MATCH(OK)
   setString(null) as batch getInt=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getInt=0 was null true CLOUD EXT (OK)
@@ -457,6 +459,7 @@
   setString() as batch getLong=97 was null false JDBC MATCH(OK)
   setString(null) getLong=0 was null true JDBC MATCH(OK)
   setString(null) as batch getLong=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getLong=0 was null true CLOUD EXT (OK)
@@ -629,6 +632,7 @@
   setString() as batch getFloat=97.0 was null false JDBC MATCH(OK)
   setString(null) getFloat=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getFloat=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getFloat=0.0 was null true CLOUD EXT (OK)
@@ -802,6 +806,7 @@
   setString() as batch getDouble=97.0 was null false JDBC MATCH(OK)
   setString(null) getDouble=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getDouble=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getDouble=0.0 was null true CLOUD EXT (OK)
@@ -974,6 +979,7 @@
   setString() as batch getDouble=97.0 was null false JDBC MATCH(OK)
   setString(null) getDouble=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getDouble=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getDouble=0.0 was null true CLOUD EXT (OK)
@@ -1146,6 +1152,7 @@
   setString() as batch getBigDecimal=97.00000 was null false JDBC MATCH(OK)
   setString(null) getBigDecimal=null was null true JDBC MATCH(OK)
   setString(null) as batch getBigDecimal=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getBigDecimal=null was null true CLOUD EXT (OK)
@@ -1842,6 +1849,7 @@
   setString() as batch IC JDBC MATCH (INVALID)
   setString(null) getBytes=null was null true CLOUD EXT (OK)
   setString(null) as batch getBytes=null was null true CLOUD EXT (OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() getBytes=0x4,0x3 was null false JDBC MATCH(OK)
   setBytes() as batchgetBytes=0x4,0x3 was null false JDBC MATCH(OK)
   setBytes(null) getBytes=null was null true JDBC MATCH(OK)
@@ -2018,6 +2026,7 @@
  JDBC FAIL DATE
   setString(null) getDate=null was null true JDBC MATCH(OK)
   setString(null) as batch getDate=null was null true JDBC MATCH(OK)
+ setString("Invalid Value") Date/Time must be JDBC format
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getDate=null was null true CLOUD EXT (OK)
@@ -2191,6 +2200,7 @@
  JDBC FAIL TIME
   setString(null) getTime=null was null true JDBC MATCH(OK)
   setString(null) as batch getTime=null was null true JDBC MATCH(OK)
+ setString("Invalid Value") Date/Time must be JDBC format
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getTime=null was null true CLOUD EXT (OK)
@@ -2364,6 +2374,7 @@
  JDBC FAIL TIMESTAMP
   setString(null) getTimestamp=null was null true JDBC MATCH(OK)
   setString(null) as batch getTimestamp=null was null true JDBC MATCH(OK)
+ setString("Invalid Value") Date/Time must be JDBC format
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getTimestamp=null was null true CLOUD EXT (OK)
@@ -2707,6 +2718,7 @@
   setString() as batch IC JDBC MATCH (INVALID)
   setString(null) getBlob=null was null true CLOUD EXT (OK)
   setString(null) as batch getBlob=null was null true CLOUD EXT (OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() getBlob=0x4,0x3 was null false CLOUD EXT (OK)
   setBytes() as batchgetBlob=0x4,0x3 was null false CLOUD EXT (OK)
   setBytes(null) getBlob=null was null true CLOUD EXT (OK)

Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ver2.6/parameterMapping.out
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ver2.6/parameterMapping.out?rev=312801&r1=312800&r2=312801&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ver2.6/parameterMapping.out
(original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ver2.6/parameterMapping.out
Mon Oct 10 20:46:53 2005
@@ -113,6 +113,7 @@
   setString() as batch getShort=97 was null false JDBC MATCH(OK)
   setString(null) getShort=0 was null true JDBC MATCH(OK)
   setString(null) as batch getShort=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getShort=0 was null true CLOUD EXT (OK)
@@ -285,6 +286,7 @@
   setString() as batch getInt=97 was null false JDBC MATCH(OK)
   setString(null) getInt=0 was null true JDBC MATCH(OK)
   setString(null) as batch getInt=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getInt=0 was null true CLOUD EXT (OK)
@@ -457,6 +459,7 @@
   setString() as batch getLong=97 was null false JDBC MATCH(OK)
   setString(null) getLong=0 was null true JDBC MATCH(OK)
   setString(null) as batch getLong=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getLong=0 was null true CLOUD EXT (OK)
@@ -629,6 +632,7 @@
   setString() as batch getFloat=97.0 was null false JDBC MATCH(OK)
   setString(null) getFloat=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getFloat=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getFloat=0.0 was null true CLOUD EXT (OK)
@@ -802,6 +806,7 @@
   setString() as batch getDouble=97.0 was null false JDBC MATCH(OK)
   setString(null) getDouble=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getDouble=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getDouble=0.0 was null true CLOUD EXT (OK)
@@ -974,6 +979,7 @@
   setString() as batch getDouble=97.0 was null false JDBC MATCH(OK)
   setString(null) getDouble=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getDouble=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getDouble=0.0 was null true CLOUD EXT (OK)
@@ -1146,6 +1152,7 @@
   setString() as batch getBigDecimal=97.00000 was null false JDBC MATCH(OK)
   setString(null) getBigDecimal=null was null true JDBC MATCH(OK)
   setString(null) as batch getBigDecimal=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getBigDecimal=null was null true CLOUD EXT (OK)
@@ -1842,6 +1849,7 @@
   setString() as batch IC JDBC MATCH (INVALID)
   setString(null) getBytes=null was null true CLOUD EXT (OK)
   setString(null) as batch getBytes=null was null true CLOUD EXT (OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() getBytes=0x4,0x3 was null false JDBC MATCH(OK)
   setBytes() as batchgetBytes=0x4,0x3 was null false JDBC MATCH(OK)
   setBytes(null) getBytes=null was null true JDBC MATCH(OK)
@@ -2018,6 +2026,7 @@
  JDBC FAIL DATE
   setString(null) getDate=null was null true JDBC MATCH(OK)
   setString(null) as batch getDate=null was null true JDBC MATCH(OK)
+ setString("Invalid Value") Date/Time must be JDBC format
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getDate=null was null true CLOUD EXT (OK)
@@ -2191,6 +2200,7 @@
  JDBC FAIL TIME
   setString(null) getTime=null was null true JDBC MATCH(OK)
   setString(null) as batch getTime=null was null true JDBC MATCH(OK)
+ setString("Invalid Value") Date/Time must be JDBC format
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getTime=null was null true CLOUD EXT (OK)
@@ -2364,6 +2374,7 @@
  JDBC FAIL TIMESTAMP
   setString(null) getTimestamp=null was null true JDBC MATCH(OK)
   setString(null) as batch getTimestamp=null was null true JDBC MATCH(OK)
+ setString("Invalid Value") Date/Time must be JDBC format
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) getTimestamp=null was null true CLOUD EXT (OK)
@@ -2707,6 +2718,7 @@
   setString() as batch IC JDBC MATCH (INVALID)
   setString(null) getBlob=null was null true CLOUD EXT (OK)
   setString(null) as batch getBlob=null was null true CLOUD EXT (OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() getBlob=0x4,0x3 was null false CLOUD EXT (OK)
   setBytes() as batchgetBlob=0x4,0x3 was null false CLOUD EXT (OK)
   setBytes(null) getBlob=null was null true CLOUD EXT (OK)

Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out?rev=312801&r1=312800&r2=312801&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out
(original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/parameterMapping.out
Mon Oct 10 20:46:53 2005
@@ -113,6 +113,7 @@
   setString() as batch getShort=97 was null false JDBC MATCH(OK)
   setString(null) getShort=0 was null true JDBC MATCH(OK)
   setString(null) as batch getShort=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batch (?????):Non-atomic batch failure.  The batch was submitted, but at
least one exception occurred on an individual member of the batch. Use getNextException()
to retrieve the exceptions for specific batched elements. (XCL12):Error for batch element
#0: An attempt was made to put a data value of type 'byte[]' into a data value of type 'SMALLINT'.
JDBC MATCH (INVALID)
   setBytes(null) getShort=0 was null true CLOUD EXT (OK)
@@ -285,6 +286,7 @@
   setString() as batch getInt=97 was null false JDBC MATCH(OK)
   setString(null) getInt=0 was null true JDBC MATCH(OK)
   setString(null) as batch getInt=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batch (?????):Non-atomic batch failure.  The batch was submitted, but at
least one exception occurred on an individual member of the batch. Use getNextException()
to retrieve the exceptions for specific batched elements. (XCL12):Error for batch element
#0: An attempt was made to put a data value of type 'byte[]' into a data value of type 'INTEGER'.
JDBC MATCH (INVALID)
   setBytes(null) getInt=0 was null true CLOUD EXT (OK)
@@ -457,6 +459,7 @@
   setString() as batch getLong=97 was null false JDBC MATCH(OK)
   setString(null) getLong=0 was null true JDBC MATCH(OK)
   setString(null) as batch getLong=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batch (?????):Non-atomic batch failure.  The batch was submitted, but at
least one exception occurred on an individual member of the batch. Use getNextException()
to retrieve the exceptions for specific batched elements. (XCL12):Error for batch element
#0: An attempt was made to put a data value of type 'byte[]' into a data value of type 'BIGINT'.
JDBC MATCH (INVALID)
   setBytes(null) getLong=0 was null true CLOUD EXT (OK)
@@ -629,6 +632,7 @@
   setString() as batch getFloat=97.0 was null false JDBC MATCH(OK)
   setString(null) getFloat=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getFloat=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batch (?????):Non-atomic batch failure.  The batch was submitted, but at
least one exception occurred on an individual member of the batch. Use getNextException()
to retrieve the exceptions for specific batched elements. (XCL12):Error for batch element
#0: An attempt was made to put a data value of type 'byte[]' into a data value of type 'REAL'.
JDBC MATCH (INVALID)
   setBytes(null) getFloat=0.0 was null true CLOUD EXT (OK)
@@ -802,6 +806,7 @@
   setString() as batch getDouble=97.0 was null false JDBC MATCH(OK)
   setString(null) getDouble=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getDouble=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batch (?????):Non-atomic batch failure.  The batch was submitted, but at
least one exception occurred on an individual member of the batch. Use getNextException()
to retrieve the exceptions for specific batched elements. (XCL12):Error for batch element
#0: An attempt was made to put a data value of type 'byte[]' into a data value of type 'DOUBLE'.
JDBC MATCH (INVALID)
   setBytes(null) getDouble=0.0 was null true CLOUD EXT (OK)
@@ -974,6 +979,7 @@
   setString() as batch getDouble=97.0 was null false JDBC MATCH(OK)
   setString(null) getDouble=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getDouble=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batch (?????):Non-atomic batch failure.  The batch was submitted, but at
least one exception occurred on an individual member of the batch. Use getNextException()
to retrieve the exceptions for specific batched elements. (XCL12):Error for batch element
#0: An attempt was made to put a data value of type 'byte[]' into a data value of type 'DOUBLE'.
JDBC MATCH (INVALID)
   setBytes(null) getDouble=0.0 was null true CLOUD EXT (OK)
@@ -1146,6 +1152,7 @@
   setString() as batch getBigDecimal=97.00000 was null false JDBC MATCH(OK)
   setString(null) getBigDecimal=null was null true JDBC MATCH(OK)
   setString(null) as batch getBigDecimal=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batch (?????):Non-atomic batch failure.  The batch was submitted, but at
least one exception occurred on an individual member of the batch. Use getNextException()
to retrieve the exceptions for specific batched elements. (XCL12):Error for batch element
#0: An attempt was made to put a data value of type 'byte[]' into a data value of type 'DECIMAL'.
JDBC MATCH (INVALID)
   setBytes(null) getBigDecimal=null was null true CLOUD EXT (OK)
@@ -1831,6 +1838,7 @@
   setBoolean() IC JDBC MATCH (INVALID)
   setString() IC JDBC MATCH (INVALID)
   setString(null) getBytes=null was null true CLOUD EXT (OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() getBytes=0x4,0x3 was null false JDBC MATCH(OK)
   setBytes(null) getBytes=null was null true JDBC MATCH(OK)
   setDate() IC JDBC MATCH (INVALID)
@@ -1963,6 +1971,7 @@
   setBoolean() IC JDBC MATCH (INVALID)
   setString()  (22007):The syntax of the string representation of a datetime value is incorrect.
JDBC FAIL DATE
   setString(null) getDate=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes(null) getDate=null was null true CLOUD EXT (OK)
   setDate() getDate=2004-02-14 was null false JDBC MATCH(OK)
@@ -2093,6 +2102,7 @@
   setBoolean() IC JDBC MATCH (INVALID)
   setString()  (22007):The syntax of the string representation of a datetime value is incorrect.
JDBC FAIL TIME
   setString(null) getTime=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes(null) getTime=null was null true CLOUD EXT (OK)
   setDate() IC JDBC MATCH (INVALID)
@@ -2223,6 +2233,7 @@
   setBoolean() IC JDBC MATCH (INVALID)
   setString()  (22007):The syntax of the string representation of a datetime value is incorrect.
JDBC FAIL TIMESTAMP
   setString(null) getTimestamp=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes(null) getTimestamp=null was null true CLOUD EXT (OK)
   setDate() getTimestamp=xxxxxxFILTERED-TIMESTAMPxxxxxwas null false JDBC MATCH(OK)
@@ -2483,6 +2494,7 @@
   setBoolean() IC JDBC MATCH (INVALID)
   setString() IC JDBC MATCH (INVALID)
   setString(null) getBlob=null was null true CLOUD EXT (OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() getBlob=0x4,0x3 was null false CLOUD EXT (OK)
   setBytes(null) getBlob=null was null true CLOUD EXT (OK)
   setDate() IC JDBC MATCH (INVALID)

Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/parameterMapping.out
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/parameterMapping.out?rev=312801&r1=312800&r2=312801&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/parameterMapping.out
(original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/parameterMapping.out
Mon Oct 10 20:46:53 2005
@@ -113,6 +113,7 @@
   setString() as batch getShort=97 was null false JDBC MATCH(OK)
   setString(null) getShort=0 was null true JDBC MATCH(OK)
   setString(null) as batch getShort=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -352,6 +353,7 @@
   setString() as batch getInt=97 was null false JDBC MATCH(OK)
   setString(null) getInt=0 was null true JDBC MATCH(OK)
   setString(null) as batch getInt=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -591,6 +593,7 @@
   setString() as batch getLong=97 was null false JDBC MATCH(OK)
   setString(null) getLong=0 was null true JDBC MATCH(OK)
   setString(null) as batch getLong=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -830,6 +833,7 @@
   setString() as batch getFloat=97.0 was null false JDBC MATCH(OK)
   setString(null) getFloat=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getFloat=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -1070,6 +1074,7 @@
   setString() as batch getDouble=97.0 was null false JDBC MATCH(OK)
   setString(null) getDouble=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getDouble=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -1309,6 +1314,7 @@
   setString() as batch getDouble=97.0 was null false JDBC MATCH(OK)
   setString(null) getDouble=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getDouble=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -1548,6 +1554,7 @@
   setString() as batch getBigDecimal=97.00000 was null false JDBC MATCH(OK)
   setString(null) getBigDecimal=null was null true JDBC MATCH(OK)
   setString(null) as batch getBigDecimal=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -2441,6 +2448,7 @@
   setString() as batch IC JDBC MATCH (INVALID)
   setString(null) IC JDBC MATCH (INVALID)
   setString(null) as batch IC JDBC MATCH (INVALID)
+ setString("Invalid Value")  IC (Expected)
   setBytes() getBytes=0x4,0x3 was null false JDBC MATCH(OK)
   setBytes() as batchgetBytes=0x4,0x3 was null false JDBC MATCH(OK)
   setBytes(null) getBytes=null was null true JDBC MATCH(OK)
@@ -2660,6 +2668,7 @@
   setString() as batch  (22007):The syntax of the string representation of a datetime value
is incorrect. JDBC FAIL DATE
   setString(null) getDate=null was null true JDBC MATCH(OK)
   setString(null) as batch getDate=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -2881,6 +2890,7 @@
   setString() as batch  (22007):The syntax of the string representation of a datetime value
is incorrect. JDBC FAIL TIME
   setString(null) getTime=null was null true JDBC MATCH(OK)
   setString(null) as batch getTime=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -3103,6 +3113,7 @@
   setString() as batch  (22007):The syntax of the string representation of a datetime value
is incorrect. JDBC FAIL TIMESTAMP
   setString(null) getTimestamp=null was null true JDBC MATCH(OK)
   setString(null) as batch getTimestamp=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -3503,6 +3514,7 @@
   setString() as batch IC JDBC MATCH (INVALID)
   setString(null) IC JDBC MATCH (INVALID)
   setString(null) as batch IC JDBC MATCH (INVALID)
+ setString("Invalid Value")  IC (Expected)
   setBytes() getBlob=0x4,0x3 was null false CLOUD EXT (OK)
   setBytes() as batchgetBlob=0x4,0x3 was null false CLOUD EXT (OK)
   setBytes(null) getBlob=null was null true CLOUD EXT (OK)

Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/parameterMapping.out
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/parameterMapping.out?rev=312801&r1=312800&r2=312801&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/parameterMapping.out
(original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/parameterMapping.out
Mon Oct 10 20:46:53 2005
@@ -113,6 +113,7 @@
   setString() as batch getShort=97 was null false JDBC MATCH(OK)
   setString(null) getShort=0 was null true JDBC MATCH(OK)
   setString(null) as batch getShort=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -352,6 +353,7 @@
   setString() as batch getInt=97 was null false JDBC MATCH(OK)
   setString(null) getInt=0 was null true JDBC MATCH(OK)
   setString(null) as batch getInt=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -591,6 +593,7 @@
   setString() as batch getLong=97 was null false JDBC MATCH(OK)
   setString(null) getLong=0 was null true JDBC MATCH(OK)
   setString(null) as batch getLong=0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -830,6 +833,7 @@
   setString() as batch getFloat=97.0 was null false JDBC MATCH(OK)
   setString(null) getFloat=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getFloat=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -1070,6 +1074,7 @@
   setString() as batch getDouble=97.0 was null false JDBC MATCH(OK)
   setString(null) getDouble=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getDouble=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -1309,6 +1314,7 @@
   setString() as batch getDouble=97.0 was null false JDBC MATCH(OK)
   setString(null) getDouble=0.0 was null true JDBC MATCH(OK)
   setString(null) as batch getDouble=0.0 was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -1548,6 +1554,7 @@
   setString() as batch getBigDecimal=97.00000 was null false JDBC MATCH(OK)
   setString(null) getBigDecimal=null was null true JDBC MATCH(OK)
   setString(null) as batch getBigDecimal=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -2441,6 +2448,7 @@
   setString() as batch IC JDBC MATCH (INVALID)
   setString(null) IC JDBC MATCH (INVALID)
   setString(null) as batch IC JDBC MATCH (INVALID)
+ setString("Invalid Value")  IC (Expected)
   setBytes() getBytes=0x4,0x3 was null false JDBC MATCH(OK)
   setBytes() as batchgetBytes=0x4,0x3 was null false JDBC MATCH(OK)
   setBytes(null) getBytes=null was null true JDBC MATCH(OK)
@@ -2660,6 +2668,7 @@
   setString() as batch  (22007):The syntax of the string representation of a datetime value
is incorrect. JDBC FAIL DATE
   setString(null) getDate=null was null true JDBC MATCH(OK)
   setString(null) as batch getDate=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -2881,6 +2890,7 @@
   setString() as batch  (22007):The syntax of the string representation of a datetime value
is incorrect. JDBC FAIL TIME
   setString(null) getTime=null was null true JDBC MATCH(OK)
   setString(null) as batch getTime=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -3103,6 +3113,7 @@
   setString() as batch  (22007):The syntax of the string representation of a datetime value
is incorrect. JDBC FAIL TIMESTAMP
   setString(null) getTimestamp=null was null true JDBC MATCH(OK)
   setString(null) as batch getTimestamp=null was null true JDBC MATCH(OK)
+ setString("Invalid Value")  IC (Expected)
   setBytes() IC JDBC MATCH (INVALID)
   setBytes() as batchIC JDBC MATCH (INVALID)
   setBytes(null) IC JDBC MATCH (INVALID)
@@ -3503,6 +3514,7 @@
   setString() as batch IC JDBC MATCH (INVALID)
   setString(null) IC JDBC MATCH (INVALID)
   setString(null) as batch IC JDBC MATCH (INVALID)
+ setString("Invalid Value")  IC (Expected)
   setBytes() getBlob=0x4,0x3 was null false CLOUD EXT (OK)
   setBytes() as batchgetBlob=0x4,0x3 was null false CLOUD EXT (OK)
   setBytes(null) getBlob=null was null true CLOUD EXT (OK)

Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/parameterMapping.java
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/parameterMapping.java?rev=312801&r1=312800&r2=312801&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/parameterMapping.java
(original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/parameterMapping.java
Mon Oct 10 20:46:53 2005
@@ -448,7 +448,7 @@
 					CallableStatement csp = conn.prepareCall("CALL PMP.TYPE_AS(?, ?, ?)");
 
 					boolean bothRegistered = true;
-					System.out.print("INOUT " + sqlType + " registerOutParameter(" + TestUtil.jdbcNameFromJdbc(jopt)
+ ") ");
+					System.out.print("INOUT " + sqlType + " registerOutParameter(" + TestUtil.getNameFromJdbcType(jopt)
+ ") ");
 					try {
 						csp.registerOutParameter(2, jopt);
 						System.out.println("-- OK");
@@ -456,7 +456,7 @@
 						System.out.println("-- " + sqle.getSQLState());
 						bothRegistered = false;
 					}
-					System.out.print("OUT " + sqlType + " registerOutParameter(" + TestUtil.jdbcNameFromJdbc(jopt)
+ ") ");
+					System.out.print("OUT " + sqlType + " registerOutParameter(" + TestUtil.getNameFromJdbcType(jopt)
+ ") ");
 					try {
 						csp.registerOutParameter(3, jopt);
 						System.out.println("-- OK");
@@ -1596,6 +1596,12 @@
 		judge_setXXX(worked, sqleResult, 8, type);
 		}
 		{
+		 s.execute("DELETE FROM PM.TYPE_AS");	
+		
+		 // Set Invalid String for nonString types (DERBY-149)
+		 testSetStringInvalidValue(type,psi);
+		}
+		{
 		s.execute("DELETE FROM PM.TYPE_AS");
 
 		SQLException sqleResult = null;
@@ -2867,6 +2873,60 @@
 			System.out.println("SQLSTATE("+se.getSQLState()+"): " + se.toString());
 			se = se.getNextException();
 		}
+	}
+
+	/**
+	 * Test for DERBY-149 fix 
+	 * Check that setString to an invalid value throws an exception
+	 * rather than causing a hang
+	 * 
+	 * @param type   type for SQLTypes array
+	 * @param psi     - insert prepared statement.
+	 * 
+	 */
+	private static void testSetStringInvalidValue(int type, PreparedStatement psi) {
+		// Do not perform this test for string types. 
+		// Only test for types wich will fail with setString("InvalidValue");
+		switch (jdbcTypes[type]) 
+		{
+			case Types.CHAR:
+			case Types.VARCHAR:
+			case Types.LONGVARCHAR:
+			case Types.CLOB:
+				return;
+		}
+		
+		String sqlType = SQLTypes[type];
+		try {
+			System.out.print(" setString(\"Invalid Value\") " );
+			psi.setString(1,"Invalid Value");	 
+			psi.executeUpdate();
+			// Should have gotten exception. Test fails
+			String  error = "FAIL - setString(1,\"Invalld Value\") for type " +
+			sqlType + " did not throw an exception as expected";		 				
+		 	}
+			catch (SQLException sqle)
+			{
+		 		
+				if ("22018".equals(sqle.getSQLState())||
+					"XCL12".equals(sqle.getSQLState())||
+					"22007".equals(sqle.getSQLState())||
+					(sqle.getMessage().indexOf("Invalid data conversion") != -1) ||
+					(sqle.getMessage().indexOf("Illegal Conversion") != -1))
+					System.out.println(" IC (Expected)"); 
+				else
+					dumpSQLExceptions(sqle);				 		
+			}
+			catch (Exception e)
+			{
+				// JCC may throw Illegal argument exception for 
+				// String conversion error for date/time/timestamp
+				if (TestUtil.isJCCFramework() && 
+						e instanceof IllegalArgumentException)
+					System.out.println( e.getMessage());
+				else
+					System.out.println("FAIL: Unexpected Exception " + e.getMessage());
+			}		 	
 	}
 
 	private static String showFirstTwo(java.io.Reader in) throws java.io.IOException {

Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java?rev=312801&r1=312800&r2=312801&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
(original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
Mon Oct 10 20:46:53 2005
@@ -439,7 +439,7 @@
 			default : return String.valueOf(jdbcType);
 		}
 	}
-	  public static String jdbcNameFromJdbc(int jdbcType) {
+	  public static String getNameFromJdbcType(int jdbcType) {
 		switch (jdbcType) {
 			case Types.BIT 		:  return "Types.BIT";
 			case JDBC30Translation.SQL_TYPES_BOOLEAN  : return "Types.BOOLEAN";



Mime
View raw message