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 ka...@apache.org on 2007/10/22 13:16:06 UTC
svn commit: r587058 - in /db/derby/code/branches/10.3/java:
client/org/apache/derby/jdbc/ClientDriver.java
testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java
Author: kahatlen
Date: Mon Oct 22 04:16:04 2007
New Revision: 587058
URL: http://svn.apache.org/viewvc?rev=587058&view=rev
Log:
DERBY-974: ClientDriver can lose some connection properties
Merged fix from trunk (revision 587056).
Modified:
db/derby/code/branches/10.3/java/client/org/apache/derby/jdbc/ClientDriver.java
db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java
Modified: db/derby/code/branches/10.3/java/client/org/apache/derby/jdbc/ClientDriver.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/client/org/apache/derby/jdbc/ClientDriver.java?rev=587058&r1=587057&r2=587058&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/client/org/apache/derby/jdbc/ClientDriver.java (original)
+++ db/derby/code/branches/10.3/java/client/org/apache/derby/jdbc/ClientDriver.java Mon Oct 22 04:16:04 2007
@@ -169,7 +169,8 @@
private String appendDatabaseAttributes(String database, Properties augmentedProperties) {
StringBuffer longDatabase = new StringBuffer(database);
- for (Enumeration keys = augmentedProperties.keys(); keys.hasMoreElements() ;)
+ for (Enumeration keys = augmentedProperties.propertyNames();
+ keys.hasMoreElements() ;)
{
String key = (String) keys.nextElement();
if (key.equals(Attribute.USERNAME_ATTR) ||
Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java?rev=587058&r1=587057&r2=587058&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java (original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java Mon Oct 22 04:16:04 2007
@@ -67,6 +67,7 @@
DB_NAME_WITH_SPACES,
"testcreatedb1",
"testcreatedb2",
+ "testcreatedb3",
"'wombat'"
};
@@ -386,6 +387,15 @@
assertConnect(false, url, info);
assertTraceFilesExist();
shutdownDB(url + ";shutdown=true", null);
+
+ // Derby-974: test that connection sees default properties as well
+ info.setProperty("create","true");
+ Properties infoWithDefaults = new Properties(info);
+
+ url = TestConfiguration.getCurrent().getJDBCUrl("testcreatedb3");
+ assertConnect(false, url, infoWithDefaults);
+
+ shutdownDB(url+";shutdown=true", null);
}