Modified:
branches/1.0/CHANGES
branches/1.0/mysqlclient/Driver.cs
branches/1.0/mysqlclient/PreparedStatement.cs
Log:
Bug #18186 Problem with implementation of PreparedStatement
Apparently Mono doesn't ignore the the case where BitArray yields a byte array of zero length and we try to copy that to an array so we put a check in.
Modified: branches/1.0/CHANGES
===================================================================
--- branches/1.0/CHANGES 2006-10-30 21:50:59 UTC (rev 443)
+++ branches/1.0/CHANGES 2006-10-30 21:54:53 UTC (rev 444)
@@ -13,6 +13,7 @@
Bug #23538 Exception thrown when GetSchemaTable is called and "fields" is null.
Bug #23758 Unable to connect to any server - IPv6 related
Bug #23749 VarChar field size over 255 causes a System.OverflowException
+ Bug #18186 Problem with implementation of PreparedStatement
Version 1.0.8 RC
Modified: branches/1.0/mysqlclient/Driver.cs
===================================================================
--- branches/1.0/mysqlclient/Driver.cs 2006-10-30 21:50:59 UTC (rev 443)
+++ branches/1.0/mysqlclient/Driver.cs 2006-10-30 21:54:53 UTC (rev 444)
@@ -146,8 +146,7 @@
{
this.connection = connection;
- // if we have already configured this driver and we are supposed
- // to cache server config, then exit
+ // if we have already configured this driver then exit
if (serverProps != null)
return;
Modified: branches/1.0/mysqlclient/PreparedStatement.cs
===================================================================
--- branches/1.0/mysqlclient/PreparedStatement.cs 2006-10-30 21:50:59 UTC (rev 443)
+++ branches/1.0/mysqlclient/PreparedStatement.cs 2006-10-30 21:54:53 UTC (rev 444)
@@ -81,8 +81,12 @@
if (p.Value == DBNull.Value || p.Value == null)
nullMap[x] = true;
}
+
byte[] nullMapBytes = new byte[(parameters.Count + 7) / 8];
- nullMap.CopyTo(nullMapBytes, 0);
+ // we check this because Mono doesn't ignore the case where nullMapBytes
+ // is zero length.
+ if (nullMapBytes.Length > 0)
+ nullMap.CopyTo(nullMapBytes, 0);
// start constructing our packet
packet.WriteInteger(StatementId, 4);
| Thread |
|---|
| • Connector/NET commit: r444 - in branches/1.0: . mysqlclient | rburnett | 30 Oct |