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;
}
| Thread |
|---|
| • Connector/NET commit: r564 - in branches/5.0: . Driver/Source | rburnett | 23 Jan |