MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:January 15 2010 7:09pm
Subject:bzr commit into connector-net-6.2 branch (vvaintroub:824) Bug#50321
View as plain text  
#At file:///H:/connector_net/6.2/ based on revid:reggie.burnett@stripped

  824 Vladislav Vaintroub	2010-01-15
      Bug #50321 Connecting to mySQL from mobile device throws InvalidOperationException.
      fix is to avoid accessing stream.readTimeout and streamWritetimeout properties on CF.

    modified:
      CHANGES
      MySql.Data/Provider/Properties/AssemblyInfo.cs
      MySql.Data/Provider/Source/TimedStream.cs
=== modified file 'CHANGES'
--- a/CHANGES	2010-01-13 17:34:14 +0000
+++ b/CHANGES	2010-01-15 19:09:26 +0000
@@ -1,3 +1,5 @@
+- fixed InvalidOperationException when accessing Stream.ReadTimeout or Stream.WriteTimeout on CF
+  (bug #50321)
 - fixed entity framework function processing so that it handles stored functions properly
   (bug #45277)
 - fixed a bug with prepared statements and unsigned bigint.  Patch also provided a nice speedup to reading

=== modified file 'MySql.Data/Provider/Properties/AssemblyInfo.cs'
--- a/MySql.Data/Provider/Properties/AssemblyInfo.cs	2009-07-28 20:40:35 +0000
+++ b/MySql.Data/Provider/Properties/AssemblyInfo.cs	2010-01-15 19:09:26 +0000
@@ -71,5 +71,5 @@ using System.Security;
 //       documentation for more information on this.
 //
 [assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyName("ConnectorNet")]
+//[assembly: AssemblyKeyName("ConnectorNet")]
 

=== modified file 'MySql.Data/Provider/Source/TimedStream.cs'
--- a/MySql.Data/Provider/Source/TimedStream.cs	2009-10-07 20:30:34 +0000
+++ b/MySql.Data/Provider/Source/TimedStream.cs	2010-01-15 19:09:26 +0000
@@ -57,7 +57,11 @@ namespace MySql.Data.MySqlClient
         public TimedStream(Stream baseStream)
         {
             this.baseStream = baseStream;
+#if !CF
             timeout = baseStream.ReadTimeout;
+#else
+            timeout = System.Threading.Timeout.Infinite;
+#endif
             isClosed = false;
             stopwatch = new LowResolutionStopwatch();
         }
@@ -100,14 +104,20 @@ namespace MySql.Data.MySqlClient
             {
                 if (ShouldResetStreamTimeout(lastReadTimeout, streamTimeout))
                 {
-                    baseStream.ReadTimeout = lastReadTimeout = streamTimeout;
+#if !CF
+                    baseStream.ReadTimeout = streamTimeout;
+#endif
+                    lastReadTimeout = streamTimeout;
                 }
             }
             else
             {
                 if (ShouldResetStreamTimeout(lastWriteTimeout, streamTimeout))
                 {
-                    baseStream.WriteTimeout = lastWriteTimeout = streamTimeout;
+#if !CF
+                    baseStream.WriteTimeout = streamTimeout;
+#endif
+                    lastWriteTimeout = streamTimeout;
                 }
             }
 


Attachment: [text/bzr-bundle] bzr/vvaintroub@mysql.com-20100115190926-wf4nrxk28muipbph.bundle
Thread
bzr commit into connector-net-6.2 branch (vvaintroub:824) Bug#50321Vladislav Vaintroub15 Jan