List:Commits« Previous MessageNext Message »
From:rburnett Date:July 7 2009 7:39pm
Subject:Connector/NET commit: r1672 - in branches/5.1: . Driver/Properties Driver/Source
View as plain text  
Modified:
   branches/5.1/CHANGES
   branches/5.1/Driver/Properties/Resources.Designer.cs
   branches/5.1/Driver/Properties/Resources.resx
   branches/5.1/Driver/Source/command.cs
Log:
  - added null check in TimeoutExpired handler.  This should not ever happen but it apparently
    is in some cases (bug #  40005)


Modified: branches/5.1/CHANGES
===================================================================
--- branches/5.1/CHANGES	2009-07-07 18:57:46 UTC (rev 1671)
+++ branches/5.1/CHANGES	2009-07-07 19:39:16 UTC (rev 1672)
@@ -22,6 +22,8 @@
     packet is fully read (bug #43678)
   - fixed ReservedWords schema collection to not incorrectly include blank words and to use the
     right column name
+  - added null check in TimeoutExpired handler.  This should not ever happen but it apparently
+    is in some cases (bug #  40005)
   
 Version 5.1.7 - 8/20/08
  - Fixed problem with DDEX provider that could sometimes prevent table altering when working with

Modified: branches/5.1/Driver/Properties/Resources.Designer.cs
===================================================================
--- branches/5.1/Driver/Properties/Resources.Designer.cs	2009-07-07 18:57:46 UTC (rev 1671)
+++ branches/5.1/Driver/Properties/Resources.Designer.cs	2009-07-07 19:39:16 UTC (rev 1672)
@@ -625,6 +625,14 @@
                 return ResourceManager.GetString("Timeout", resourceCulture);
             }
         }
+
+        internal static string TimeoutExpiredNullObject
+        {
+            get
+            {
+                return ResourceManager.GetString("TimeoutExpiredNullObject", resourceCulture);
+            }
+        }
         
         /// <summary>
         ///   Looks up a localized string similar to error connecting: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached..

Modified: branches/5.1/Driver/Properties/Resources.resx
===================================================================
--- branches/5.1/Driver/Properties/Resources.resx	2009-07-07 18:57:46 UTC (rev 1671)
+++ branches/5.1/Driver/Properties/Resources.resx	2009-07-07 19:39:16 UTC (rev 1672)
@@ -330,4 +330,7 @@
   <data name="DistributedTxnNotSupported" xml:space="preserve">
     <value>MySQL Connector/Net does not currently support distributed transactions.</value>
   </data>
+  <data name="TimeoutExpiredNullObject" xml:space="preserve">
+    <value>Timeout expired but command object was null.  This should not happen.</value>
+  </data>
 </root>
\ No newline at end of file

Modified: branches/5.1/Driver/Source/command.cs
===================================================================
--- branches/5.1/Driver/Source/command.cs	2009-07-07 18:57:46 UTC (rev 1671)
+++ branches/5.1/Driver/Source/command.cs	2009-07-07 19:39:16 UTC (rev 1672)
@@ -331,6 +331,11 @@
 		private void TimeoutExpired(object commandObject)
 		{
 			MySqlCommand cmd = (commandObject as MySqlCommand);
+            if (cmd == null)
+            {
+                Logger.LogWarning(Resources.TimeoutExpiredNullObject);
+                return;
+            }
 
             cmd.timedOut = true;
             try

Thread
Connector/NET commit: r1672 - in branches/5.1: . Driver/Properties Driver/Sourcerburnett7 Jul