Modified:
branches/5.0/CHANGES
branches/5.0/Driver/Source/MySqlPoolManager.cs
branches/5.0/TestSuite/Source/PoolingTests.cs
Log:
Fixed problem with pooling where a bogus host info combined with a pool with a minimum
size > 0 can combine to create an exception. The pool fails to create from the bogus
host info but the driver finalizer code will still try to remove the driver from a
non-existant pool. (bug #36432)
Modified: branches/5.0/CHANGES
===================================================================
--- branches/5.0/CHANGES 2008-05-01 17:48:09 UTC (rev 1268)
+++ branches/5.0/CHANGES 2008-05-02 16:00:18 UTC (rev 1269)
@@ -1,3 +1,9 @@
+Version 5.0.10 -
+ - Fixed problem with pooling where a bogus host info combined with a pool with a
minimum
+ size > 0 can combine to create an exception. The pool fails to create from the
bogus
+ host info but the driver finalizer code will still try to remove the driver from
+ a non-existant pool. (bug #36432)
+
Version 5.0.9 - 4/14/08
- Fixed problem where fields that were blobs but did not include the BLOB flag were
treated
Modified: branches/5.0/Driver/Source/MySqlPoolManager.cs
===================================================================
--- branches/5.0/Driver/Source/MySqlPoolManager.cs 2008-05-01 17:48:09 UTC (rev 1268)
+++ branches/5.0/Driver/Source/MySqlPoolManager.cs 2008-05-02 16:00:18 UTC (rev 1269)
@@ -64,9 +64,17 @@
{
string key = driver.Settings.GetConnectionString(true);
MySqlPool pool = (MySqlPool)pools[key];
+ // if we can't find the pool but we did get a thread id then we assume
+ // something is bad wrong. If we didn't get a thread id then we assume
that
+ // the driver connection info was bogus and that led to the pool failing
+ // to create
if (pool == null)
- throw new MySqlException("Pooling exception: Unable to find original
pool for connection");
- pool.RemoveConnection(driver);
+ {
+ if (driver.ThreadID != -1)
+ throw new MySqlException("Pooling exception: Unable to find
original pool for connection");
+ }
+ else
+ pool.RemoveConnection(driver);
}
}
Modified: branches/5.0/TestSuite/Source/PoolingTests.cs
===================================================================
--- branches/5.0/TestSuite/Source/PoolingTests.cs 2008-05-01 17:48:09 UTC (rev 1268)
+++ branches/5.0/TestSuite/Source/PoolingTests.cs 2008-05-02 16:00:18 UTC (rev 1269)
@@ -642,6 +642,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
| Thread |
|---|
| • Connector/NET commit: r1269 - in branches/5.0: . Driver/Source TestSuite/Source | rburnett | 2 May 2008 |