db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r659264 - in /db/derby/code/branches/10.4/java: engine/org/apache/derby/impl/jdbc/ testing/org/apache/derbyTesting/functionTests/tests/lang/
Date Thu, 22 May 2008 21:26:26 GMT
Author: kmarsden
Date: Thu May 22 14:26:25 2008
New Revision: 659264

URL: http://svn.apache.org/viewvc?rev=659264&view=rev
Log:
DERBY-3546 Failed to get database schemas of a JAR database

port from trunk revision 657937 


Added:
    db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DBInJarTest.java
      - copied unchanged from r657937, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DBInJarTest.java
Modified:
    db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
    db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java

Modified: db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java?rev=659264&r1=659263&r2=659264&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
(original)
+++ db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
Thu May 22 14:26:25 2008
@@ -3536,14 +3536,15 @@
 		PreparedStatement s;
 		//We can safely goto system table since we are not in soft upgrade
 		//mode and hence metadata sql in system tables are uptodate
-		//with this Derby release.
-		if (notInSoftUpgradeMode())
+		//with this Derby release. We also need to be writable so 
+                // that we can update SPS statements (DERBY-3546)
+		if (notInSoftUpgradeMode() && !isReadOnly())
 			s = getPreparedQueryUsingSystemTables(queryName, net);
 		else {
 			try {
 				//Can't use stored prepared statements because we are in soft upgrade
-				//mode and hence need to get metadata sql from metadata.properties file 
-				//or metadata_net.properties
+				//mode or are read only, and hence need to get metadata sql from 
+                                //metadata.properties file or metadata_net.properties
 				String queryText = getQueryFromDescription(queryName, net);
 				s = getEmbedConnection().prepareMetaDataStatement(queryText);
 			} catch (Throwable t) {

Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java?rev=659264&r1=659263&r2=659264&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
(original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
Thu May 22 14:26:25 2008
@@ -154,6 +154,8 @@
 
             // test uses regex classes that are not available in Foundation 1.1
             suite.addTest(ErrorMessageTest.suite());
+            // Test uses DriverManager to connect to database in jar.
+            suite.addTest(DBInJarTest.suite());
         }
 
         return suite;



Mime
View raw message