You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by km...@apache.org on 2006/04/22 01:40:40 UTC
svn commit: r396034 - in
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet:
csPrepStmt.java prepStmt.java
Author: kmarsden
Date: Fri Apr 21 16:40:38 2006
New Revision: 396034
URL: http://svn.apache.org/viewcvs?rev=396034&view=rev
Log:
DERBY-972 tests derbynet/csPrepStmt and prepStmt use mechanisms that are not portable over encodings
Contributed by Sunitha Kambhampati
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/csPrepStmt.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/csPrepStmt.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/csPrepStmt.java?rev=396034&r1=396033&r2=396034&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/csPrepStmt.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/csPrepStmt.java Fri Apr 21 16:40:38 2006
@@ -157,12 +157,12 @@
ps.setBigDecimal(8, new BigDecimal("88.88"));
ps.setBigDecimal(9, new BigDecimal("99.1"));
ps.setString(10, "column11string");
- byte[] c11ba = new String("column11vcstring").getBytes();
+ byte[] c11ba = new String("column11vcstring").getBytes("UTF-8");
int len = c11ba.length;
ps.setAsciiStream(11, new ByteArrayInputStream(c11ba), len);
- byte[] c12ba = new String("column12lvcstring").getBytes();
+ byte[] c12ba = new String("column12lvcstring").getBytes("UTF-8");
len = c12ba.length;
- ps.setCharacterStream(12, new InputStreamReader(new ByteArrayInputStream(c12ba)),len);
+ ps.setCharacterStream(12, new InputStreamReader(new ByteArrayInputStream(c12ba),"UTF-8"),len);
ps.setBytes(13,ba);
ps.setBinaryStream(14, new ByteArrayInputStream(ba), ba.length);
ps.setBytes(15,ba);
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java?rev=396034&r1=396033&r2=396034&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java Fri Apr 21 16:40:38 2006
@@ -158,12 +158,12 @@
ps.setBigDecimal(7, new BigDecimal("77.77"));
ps.setBigDecimal(8, new BigDecimal("8.1"));
ps.setString(9, "column9string");
- byte[] c10ba = new String("column10vcstring").getBytes();
+ byte[] c10ba = new String("column10vcstring").getBytes("UTF-8");
int len = c10ba.length;
ps.setAsciiStream(10, new ByteArrayInputStream(c10ba), len);
- byte[] c11ba = new String("column11lvcstring").getBytes();
+ byte[] c11ba = new String("column11lvcstring").getBytes("UTF-8");
len = c11ba.length;
- ps.setCharacterStream(11, new InputStreamReader(new ByteArrayInputStream(c11ba)),len);
+ ps.setCharacterStream(11, new InputStreamReader(new ByteArrayInputStream(c11ba),"UTF-8"),len);
ps.setBytes(12,ba);
// Calling setBytes on the varchar for bit data type because it
// Appears DB2 UDB accepts this only for the BLOB data type...