Modified:
branches/5.0/CHANGES
branches/5.0/Driver/Source/command.cs
Log:
Fixed problem where a command timing out just after it actually finished would cause an exception to be thrown on the command timeout thread which would then be seen as an unhandled exception.
Modified: branches/5.0/CHANGES
===================================================================
--- branches/5.0/CHANGES 2007-07-10 16:01:44 UTC (rev 781)
+++ branches/5.0/CHANGES 2007-07-13 17:40:54 UTC (rev 782)
@@ -21,6 +21,9 @@
- Fixed problem where a statement that has parameters that is executed without
defining those parameters would throw a System.FormatException rather than
a MySqlException (bug #29312)
+ - Fixed problem where a command timing out just after it actually finished would cause
+ an exception to be thrown on the command timeout thread which would then be seen
+ as an unhandled exception.
Version 5.0.7 5/16/2007
Modified: branches/5.0/Driver/Source/command.cs
===================================================================
--- branches/5.0/Driver/Source/command.cs 2007-07-10 16:01:44 UTC (rev 781)
+++ branches/5.0/Driver/Source/command.cs 2007-07-13 17:40:54 UTC (rev 782)
@@ -235,10 +235,10 @@
using(MySqlConnection c = new MySqlConnection(connection.Settings.GetConnectionString(true)))
{
- c.Open();
- MySqlCommand cmd = new MySqlCommand(String.Format("KILL QUERY {0}",
- connection.ServerThread), c);
- cmd.ExecuteNonQuery();
+ c.Open();
+ MySqlCommand cmd = new MySqlCommand(String.Format("KILL QUERY {0}",
+ connection.ServerThread), c);
+ cmd.ExecuteNonQuery();
}
}
@@ -317,7 +317,17 @@
if (cmd.canCancel)
{
cmd.timedOut = true;
- cmd.Cancel();
+ try
+ {
+ cmd.Cancel();
+ }
+ catch (Exception ex)
+ {
+ // if something goes wrong, we log it and eat it. There's really nothing
+ // else we can do.
+ if (connection.Settings.Logging)
+ Logger.LogException(ex);
+ }
}
}
| Thread |
|---|
| • Connector/NET commit: r782 - in branches/5.0: . Driver/Source | rburnett | 13 Jul |