Modified:
branches/1.0/CHANGES
branches/1.0/mysqlclient/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/1.0/CHANGES
===================================================================
--- branches/1.0/CHANGES 2007-01-23 17:13:01 UTC (rev 564)
+++ branches/1.0/CHANGES 2007-01-23 17:13:31 UTC (rev 565)
@@ -22,6 +22,7 @@
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 #25651 SELECT does not work properly when WHERE contains UTF-8 characters
+ Bug #25726 MySqlConnection throws NullReferenceException and ArgumentNullException
Other changes
-------------
Modified: branches/1.0/mysqlclient/nativedriver.cs
===================================================================
--- branches/1.0/mysqlclient/nativedriver.cs 2007-01-23 17:13:01 UTC (rev 564)
+++ branches/1.0/mysqlclient/nativedriver.cs 2007-01-23 17:13:31 UTC (rev 565)
@@ -71,20 +71,23 @@
/// </summary>
public override bool SupportsBatch
{
- get
- {
- if ((Flags & ClientFlags.MULTI_STATEMENTS) != 0)
- {
- 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;
- }
- return true;
- }
- return false;
- }
- }
+ get
+ {
+ if ((Flags & ClientFlags.MULTI_STATEMENTS) != 0)
+ {
+ if (version.isAtLeast(4, 1, 0) && !version.isAtLeast(4, 1, 10))
+ {
+ 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;
+ }
+ return false;
+ }
+ }
private void ExecuteCommand(DBCmd cmd, byte[] bytes, int length)
{
| Thread |
|---|
| • Connector/NET commit: r565 - in branches/1.0: . mysqlclient | rburnett | 23 Jan |