db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r574726 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Date Tue, 11 Sep 2007 23:29:25 GMT
Author: kmarsden
Date: Tue Sep 11 16:29:24 2007
New Revision: 574726

URL: http://svn.apache.org/viewvc?rev=574726&view=rev
Log:
DERBY-2972 (followup) Change postive lock table test to use parameter markers instead of casts



Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java?rev=574726&r1=574725&r2=574726&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Tue Sep 11 16:29:24 2007
@@ -1078,9 +1078,12 @@
     s.executeUpdate("insert into lockfunctesttable values(1)");
     // This statement should error because of collation mismatch
     assertStatementError("42818",s,"select * from SYSCS_DIAG.LOCK_TABLE where tablename =
'LOCKFUNCTESTTABLE'");
-    // we have to cast for it to work.
-    rs = s.executeQuery("select * from SYSCS_DIAG.LOCK_TABLE where CAST(tablename as VARCHAR(128))=
'LOCKFUNCTESTTABLE'");
+    // we have to use parameter markers for it to work.
+    ps = prepareStatement("select * from SYSCS_DIAG.LOCK_TABLE where tablename = ?");
+    ps.setString(1,"LOCKFUNCTESTTABLE");
+    rs = ps.executeQuery();
     JDBC.assertDrainResults(rs,2);
+    
     s.executeUpdate("drop table lockfunctesttable");
     
     



Mime
View raw message