Modified:
branches/5.0/Driver/Source/Connection.cs
Log:
small fix to only do a rollback on close if the connection is pooled.
Modified: branches/5.0/Driver/Source/Connection.cs
===================================================================
--- branches/5.0/Driver/Source/Connection.cs 2007-05-21 14:51:44 UTC (rev 729)
+++ branches/5.0/Driver/Source/Connection.cs 2007-05-22 12:20:57 UTC (rev 730)
@@ -487,14 +487,17 @@
if (dataReader != null)
dataReader.Close();
- if ((driver.ServerStatus & ServerStatusFlags.InTransaction) != 0)
+ if (settings.Pooling)
{
- MySqlTransaction t = new MySqlTransaction(this, IsolationLevel.Unspecified);
- t.Rollback();
- }
+ // if we are in a transaction, roll it back
+ if ((driver.ServerStatus & ServerStatusFlags.InTransaction) != 0)
+ {
+ MySqlTransaction t = new MySqlTransaction(this, IsolationLevel.Unspecified);
+ t.Rollback();
+ }
- if (settings.Pooling)
MySqlPoolManager.ReleaseConnection(driver);
+ }
else
driver.Close();
| Thread |
|---|
| • Connector/NET commit: r730 - branches/5.0/Driver/Source | rburnett | 22 May |