db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1031973 - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/DatabaseMetaData.java testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java
Date Sat, 06 Nov 2010 08:30:06 GMT
Author: kahatlen
Date: Sat Nov  6 08:30:06 2010
New Revision: 1031973

URL: http://svn.apache.org/viewvc?rev=1031973&view=rev
Log:
DERBY-4888: ClassCastException when calling boolean meta-data functions with 10.7 client against
10.6 server

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java?rev=1031973&r1=1031972&r2=1031973&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java Sat Nov
 6 08:30:06 2010
@@ -2385,7 +2385,7 @@ public abstract class DatabaseMetaData i
      * @return true if the server supports this
      */
     final public boolean serverSupportsBooleanValues() {
-        return supportsUDTs_;
+        return supportsBooleanValues_;
     }
 
     //------------helper methods for meta data info call methods------------------

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java?rev=1031973&r1=1031972&r2=1031973&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java
Sat Nov  6 08:30:06 2010
@@ -254,6 +254,7 @@ public	class	JDBCDriverTest	extends	Comp
         udtTest( conn );
         derby_2602_test( conn );
         derby_4613_test( conn );
+        derby_4888_test( conn );
 
 		close( conn );
 	}
@@ -372,6 +373,15 @@ public	class	JDBCDriverTest	extends	Comp
         int expectedResult = correctBehavior ? 976255123  : 976255000;
         assertEquals( expectedResult, resultNanos );
     }
+
+    /**
+     * Test case for DERBY-4888. Check that we can call DatabaseMetaData
+     * methods returning a boolean without errors.
+     */
+    private void derby_4888_test(Connection conn) throws SQLException {
+        // Used to get a ClassCastException here in some combinations.
+        assertFalse(conn.getMetaData().storesLowerCaseIdentifiers());
+    }
     
 	/////////////////////////////////////////////////////////////
     //



Mime
View raw message