List:Commits« Previous MessageNext Message »
From:rburnett Date:October 30 2006 4:25pm
Subject:Connector/NET commit: r439 - in trunk: . mysqlclient mysqlclient/common
View as plain text  
Modified:
   trunk/CHANGES
   trunk/mysqlclient/command.cs
   trunk/mysqlclient/common/StreamCreator.cs
Log:
Bug #23758 Unable to connect to any server - IPv6 related 
[fixed]

Command.cs - Forgot to add check that command timeout > 0 before creating timeout thread.  Added it in with this patch.



Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES	2006-10-30 16:22:30 UTC (rev 438)
+++ trunk/CHANGES	2006-10-30 16:25:45 UTC (rev 439)
@@ -5,6 +5,7 @@
     Bug #23268 System.FormatException when invoking procedure with ENUM input parameter 	
     Bug #23538 Exception thrown when GetSchemaTable is called and "fields" is null. 
     Bug #23245 Connector Net 5.01 Beta Installer produces Antivirus Error Message 
+    Bug #23758 Unable to connect to any server - IPv6 related 
     
     Other changes
     -------------

Modified: trunk/mysqlclient/command.cs
===================================================================
--- trunk/mysqlclient/command.cs	2006-10-30 16:22:30 UTC (rev 438)
+++ trunk/mysqlclient/command.cs	2006-10-30 16:25:45 UTC (rev 439)
@@ -364,21 +364,22 @@
 
 				// start a threading timer on our command timeout 
 				timedOut = false;
-//				Timer t = null;
-//				if (connection.driver.Version.isAtLeast(5, 0, 0))
-//				{
-//					TimerCallback timerDelegate =
-//						 new TimerCallback(TimeoutExpired);
-//					t = new Timer(timerDelegate, this, this.CommandTimeout * 1000, Timeout.Infinite);
-//				}
+				Timer t = null;
+				if (connection.driver.Version.isAtLeast(5, 0, 0) &&
+					 commandTimeout > 0)
+				{
+					TimerCallback timerDelegate =
+						 new TimerCallback(TimeoutExpired);
+					t = new Timer(timerDelegate, this, this.CommandTimeout * 1000, Timeout.Infinite);
+				}
 
 				// execute the statement
 				statement.Execute(parameters);
 
 				canCancel = true;
 				reader.NextResult();
-//				if (t != null)
-//					t.Dispose();
+				if (t != null)
+					t.Dispose();
 				canCancel = false;
 				connection.Reader = reader;
 				return reader;

Modified: trunk/mysqlclient/common/StreamCreator.cs
===================================================================
--- trunk/mysqlclient/common/StreamCreator.cs	2006-10-30 16:22:30 UTC (rev 438)
+++ trunk/mysqlclient/common/StreamCreator.cs	2006-10-30 16:25:45 UTC (rev 439)
@@ -77,6 +77,10 @@
 
 					foreach (IPAddress address in ipHE.AddressList)
 					{
+						// MySQL doesn't currently support IPv6 addresses
+						if (address.AddressFamily == AddressFamily.InterNetworkV6)
+							continue;
+
 						stream = CreateSocketStream(address, port, false);
 						if (stream != null)
 							break;

Thread
Connector/NET commit: r439 - in trunk: . mysqlclient mysqlclient/commonrburnett30 Oct