db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r553004 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/tests/lang/CollationTest.java junit/JDBC.java
Date Tue, 03 Jul 2007 22:33:52 GMT
Author: djd
Date: Tue Jul  3 15:33:50 2007
New Revision: 553004

URL: http://svn.apache.org/viewvc?view=rev&rev=553004
Log:
DERBY-2896 (test) Add code to show the bug for DERBY-2896. Change the SQL used in JDBC.dropSchema()
so that it will run successfully in a terrority collated database.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.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?view=diff&rev=553004&r1=553003&r2=553004
==============================================================================
--- 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 Jul  3 15:33:50 2007
@@ -33,6 +33,7 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.apache.derbyTesting.functionTests.tests.jdbcapi.DatabaseMetaDataTest;
 import org.apache.derbyTesting.junit.XML;
 //import org.apache.derby.iapi.types.XML;
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
@@ -982,6 +983,9 @@
   {
       TestSuite suite = new TestSuite("CollationTest:territory="+locale);
       suite.addTest(new CollationTest(baseFixture));
+      
+      // DERBY-2986 - DMD.getTables() fails
+      // suite.addTest(DatabaseMetaDataTest.suite());
       return Decorator.territoryCollatedDatabase(suite, locale);
   }
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java?view=diff&rev=553004&r1=553003&r2=553004
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java Tue Jul  3 15:33:50
2007
@@ -207,10 +207,12 @@
 		Statement s = dmd.getConnection().createStatement();
         
         // Functions - not supported by JDBC meta data until JDBC 4
+        // Need to use the CHAR() function on A.ALIASTYPE
+        // so that the compare will work in any schema.
         PreparedStatement psf = conn.prepareStatement(
                 "SELECT ALIAS FROM SYS.SYSALIASES A, SYS.SYSSCHEMAS S" +
                 " WHERE A.SCHEMAID = S.SCHEMAID " +
-                " AND A.ALIASTYPE = 'F' " +
+                " AND CHAR(A.ALIASTYPE) = 'F' " +
                 " AND S.SCHEMANAME = ?");
         psf.setString(1, schema);
         ResultSet rs = psf.executeQuery();



Mime
View raw message