Modified:
trunk/Driver/Source/MySqlPoolManager.cs
trunk/TestSuite/Source/PoolingTests.cs
Log:
fixed problem reported by user. Got great test case from Barry that showed a problem with our new pool clearing code when connections fail during open.
Modified: trunk/Driver/Source/MySqlPoolManager.cs
===================================================================
--- trunk/Driver/Source/MySqlPoolManager.cs 2007-10-19 20:08:55 UTC (rev 1036)
+++ trunk/Driver/Source/MySqlPoolManager.cs 2007-10-19 20:10:33 UTC (rev 1037)
@@ -63,20 +63,22 @@
public static void RemoveConnection(Driver driver)
{
+ MySqlPool pool = driver.Pool;
+ if (pool == null) return;
+
lock (pools.SyncRoot)
{
- MySqlPool pool = driver.Pool;
- Debug.Assert(pool != null);
pool.RemoveConnection(driver);
}
}
public static void ReleaseConnection(Driver driver)
{
- lock (pools.SyncRoot)
+ MySqlPool pool = driver.Pool;
+ if (pool == null) return;
+
+ lock (pools.SyncRoot)
{
- MySqlPool pool = driver.Pool;
- Debug.Assert(pool != null);
pool.ReleaseConnection(driver);
}
}
Modified: trunk/TestSuite/Source/PoolingTests.cs
===================================================================
--- trunk/TestSuite/Source/PoolingTests.cs 2007-10-19 20:08:55 UTC (rev 1036)
+++ trunk/TestSuite/Source/PoolingTests.cs 2007-10-19 20:10:33 UTC (rev 1037)
@@ -351,6 +351,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
| Thread |
|---|
| • Connector/NET commit: r1037 - in trunk: Driver/Source TestSuite/Source | rburnett | 19 Oct |