List:Commits« Previous MessageNext Message »
From:rburnett Date:September 21 2007 9:09pm
Subject:Connector/NET commit: r1019 - in branches/1.0: . mysqlclient
View as plain text  
Modified:
   branches/1.0/CHANGES
   branches/1.0/mysqlclient/datareader.cs
Log:
Changed from using Array.Copy to Buffer.BlockCopy in MySqlDataReader.GetBytes.  This helps with memory usage as we expect the source and destination arrays to not be overlapping. (Bug #31090)

Modified: branches/1.0/CHANGES
===================================================================
--- branches/1.0/CHANGES	2007-09-21 21:01:08 UTC (rev 1018)
+++ branches/1.0/CHANGES	2007-09-21 21:09:26 UTC (rev 1019)
@@ -1,7 +1,10 @@
 Version 1.0.11
   - Fixed problem where fields that were blobs but did not include the BLOB flag were treated
     as binary when they should have been treated as text.  (Bug #30233) 
-    
+  - Changed from using Array.Copy to Buffer.BlockCopy in MySqlDataReader.GetBytes.  This
+    helps with memory usage as we expect the source and destination arrays to not be overlapping.
+    (Bug #31090)
+        
 Version 1.0.10
     Bugs
     ----

Modified: branches/1.0/mysqlclient/datareader.cs
===================================================================
--- branches/1.0/mysqlclient/datareader.cs	2007-09-21 21:01:08 UTC (rev 1018)
+++ branches/1.0/mysqlclient/datareader.cs	2007-09-21 21:09:26 UTC (rev 1019)
@@ -262,7 +262,7 @@
 				length = (int)((ulong)binary.Value.Length - (ulong)dataIndex);
 			}
 
-			Array.Copy(bytes, (int)dataIndex, buffer, (int)bufferIndex, (int)length);
+			Buffer.BlockCopy(bytes, (int)dataIndex, buffer, (int)bufferIndex, (int)length);
 
 			return length;
 		}

Thread
Connector/NET commit: r1019 - in branches/1.0: . mysqlclientrburnett21 Sep