From: Date: January 23 2007 6:13pm Subject: Connector/NET commit: r564 - in branches/5.0: . Driver/Source List-Archive: http://lists.mysql.com/commits/18642 X-Bug: 25726 Message-Id: <200701231713.l0NHD2nj003404@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 Log: Bug #25726 MySqlConnection throws NullReferenceException and ArgumentNullException during connection, SupportsBatch is called but the server props hash has not been populated. We add a check to make sure the values are not null before we check. Modified: branches/5.0/CHANGES =================================================================== --- branches/5.0/CHANGES 2007-01-18 19:52:29 UTC (rev 563) +++ branches/5.0/CHANGES 2007-01-23 17:13:01 UTC (rev 564) @@ -8,6 +8,7 @@ Bug #25625 Crashes when calling with CommandType set to StoredProcedure Bug #25458 Opening connection hangs Bug #25651 SELECT does not work properly when WHERE contains UTF-8 characters + Bug #25726 MySqlConnection throws NullReferenceException and ArgumentNullException Other changes ------------- Modified: branches/5.0/Driver/Source/NativeDriver.cs =================================================================== --- branches/5.0/Driver/Source/NativeDriver.cs 2007-01-18 19:52:29 UTC (rev 563) +++ branches/5.0/Driver/Source/NativeDriver.cs 2007-01-23 17:13:01 UTC (rev 564) @@ -72,8 +72,11 @@ { if (version.isAtLeast(4, 1, 0) && !version.isAtLeast(4, 1, 10)) { - if (serverProps["query_cache_type"].Equals("ON") && - !serverProps["query_cache_size"].Equals("0")) return false; + object qtType = serverProps["query_cache_type"]; + object qtSize = serverProps["query_cache_size"]; + if (qtType != null && qtType.Equals("ON") && + (qtSize != null && !qtSize.Equals("0"))) + return false; } return true; }