From: rburnett Date: January 16 2007 7:03pm Subject: Connector/NET commit: r555 - in branches/5.0: . Driver/Source List-Archive: http://lists.mysql.com/commits/18210 X-Bug: 25458 Message-Id: <200701161903.l0GJ3kPX024655@bk-internal.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified: branches/5.0/CHANGES branches/5.0/Driver/Source/NativeDriver.cs branches/5.0/Driver/Source/Resources.Designer.cs branches/5.0/Driver/Source/Resources.resx branches/5.0/Driver/Source/datareader.cs Log: Bug #25458 Opening connection hangs Fixed this by adding code that reset server status to zero when we are dealing with a mysql version < than 4.1. Modified: branches/5.0/CHANGES =================================================================== --- branches/5.0/CHANGES 2007-01-15 21:45:15 UTC (rev 554) +++ branches/5.0/CHANGES 2007-01-16 19:03:45 UTC (rev 555) @@ -6,6 +6,7 @@ Bug #24802 Error Handling Bug #25614 After connection is closed, and opened again UTF-8 characters are not read well Bug #25625 Crashes when calling with CommandType set to StoredProcedure + Bug #25458 Opening connection hangs Other changes ------------- Modified: branches/5.0/Driver/Source/NativeDriver.cs =================================================================== --- branches/5.0/Driver/Source/NativeDriver.cs 2007-01-15 21:45:15 UTC (rev 554) +++ branches/5.0/Driver/Source/NativeDriver.cs 2007-01-16 19:03:45 UTC (rev 555) @@ -271,9 +271,11 @@ stream.MaxBlockSize = maxSinglePacket; isOpen = true; - } + } - private void StartSSL() + #region SSL + + private void StartSSL() { RemoteCertificateValidationCallback sslValidateCallback; @@ -307,9 +309,13 @@ X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; - } + } - /// + #endregion + + #region Authentication + + /// /// Return the appropriate set of connection flags for our /// server capabilities and our user requested options. /// @@ -415,9 +421,11 @@ Authenticate411(); else AuthenticateOld(); - } + } - public override void Reset() + #endregion + + public override void Reset() { stream.StartOutput(0, true); stream.WriteByte((byte)DBCmd.CHANGE_USER); @@ -720,7 +728,9 @@ stream.ReadByte(); // read off the 254 - if (stream.HasMoreData && version.isAtLeast(4, 1, 0)) + if (version.isAtLeast(3, 0, 0) && !version.isAtLeast(4,1,0)) + serverStatus = 0; + if (stream.HasMoreData && version.isAtLeast(4, 1, 0)) { warningCount = stream.ReadInteger(2); serverStatus = (ServerStatusFlags)stream.ReadInteger(2); Modified: branches/5.0/Driver/Source/Resources.Designer.cs =================================================================== --- branches/5.0/Driver/Source/Resources.Designer.cs 2007-01-15 21:45:15 UTC (rev 554) +++ branches/5.0/Driver/Source/Resources.Designer.cs 2007-01-16 19:03:45 UTC (rev 555) @@ -349,6 +349,15 @@ } /// + /// Looks up a localized string similar to Invalid attempt to call NextResult when the reader is closed.. + /// + internal static string NextResultIsClosed { + get { + return ResourceManager.GetString("NextResultIsClosed", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Nested transactions are not supported.. /// internal static string NoNestedTransactions { Modified: branches/5.0/Driver/Source/Resources.resx =================================================================== --- branches/5.0/Driver/Source/Resources.resx 2007-01-15 21:45:15 UTC (rev 554) +++ branches/5.0/Driver/Source/Resources.resx 2007-01-16 19:03:45 UTC (rev 555) @@ -303,4 +303,7 @@ Unable to retrieve stored procedure metadata. Either grant SELECTprivilege to mysql.proc for this user or use "noAccessToProcedureBody=true" with your connection string. + + Invalid attempt to call NextResult when the reader is closed. + \ No newline at end of file Modified: branches/5.0/Driver/Source/datareader.cs =================================================================== --- branches/5.0/Driver/Source/datareader.cs 2007-01-15 21:45:15 UTC (rev 554) +++ branches/5.0/Driver/Source/datareader.cs 2007-01-16 19:03:45 UTC (rev 555) @@ -808,7 +808,7 @@ public override bool NextResult() { if (!isOpen) - throw new MySqlException("Invalid attempt to NextResult when reader is closed."); + throw new MySqlException(Resources.NextResultIsClosed); bool firstResult = fields == null; if (fields != null)