Modified:
branches/branch_5_1/src/testsuite/regression/ConnectionRegressionTest.java
Log:
Fixed BUG#34937 - MysqlConnectionPoolDataSource does not support
ReplicationConnection. Notice that we implemented com.mysql.jdbc.Connection
for ReplicationConnection, however, only accessors from ConnectionProperties
are implemented (not the mutators), and they return values from the currently
active connection. All other methods from com.mysql.jdbc.Connection are
implemented, and operate on the currently active connection, with the exception of
resetServerState() and changeUser().
Modified: branches/branch_5_1/src/testsuite/regression/ConnectionRegressionTest.java
===================================================================
--- branches/branch_5_1/src/testsuite/regression/ConnectionRegressionTest.java 2008-02-28
18:26:22 UTC (rev 6752)
+++ branches/branch_5_1/src/testsuite/regression/ConnectionRegressionTest.java 2008-02-29
03:39:49 UTC (rev 6753)
@@ -35,6 +35,7 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
+import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
@@ -2356,4 +2357,27 @@
Thread.sleep(2000);
assertTrue(((Boolean)isValid.invoke(newConn, new Object[] {new
Integer(0)})).booleanValue());
}
+
+ public void testBug34937() throws Exception {
+ com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource ds = new
+ com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource();
+ StringBuffer urlBuf = new StringBuffer();
+ urlBuf.append(getMasterSlaveUrl());
+ urlBuf.append("?");
+ Properties props = getMasterSlaveProps();
+ String key = null;
+
+ Enumeration keyEnum = props.keys();
+
+ while (keyEnum.hasMoreElements()) {
+ key = (String)keyEnum.nextElement();
+ urlBuf.append(key);
+ urlBuf.append("=");
+ urlBuf.append(props.get(key));
+ urlBuf.append("&");
+ }
+
+ ds.setURL(urlBuf.toString());
+ ds.getPooledConnection().close();
+ }
}
\ No newline at end of file
| Thread |
|---|
| • Connector/J commit: r6753 - branches/branch_5_1/src/testsuite/regression | mmatthews | 29 Feb 2008 |