#At file:///C:/work/connector-net/6.2/ based on revid:reggie.burnett@stripped
912 Reggie Burnett 2010-12-08 [merge]
merged
modified:
CHANGES
MySql.Data.Entity/Provider/EFMySqlDataReader.cs
=== modified file 'CHANGES'
=== modified file 'CHANGES'
--- a/CHANGES 2010-11-30 18:32:09 +0000
+++ b/CHANGES 2010-12-09 03:36:45 +0000
@@ -11,6 +11,9 @@
- fixed our DDEX code so that dragging tables from server explorer onto a typed data set
preserves the table name (bug #57894)
- fixed ReadFieldLength to return a long so bigint autoincrement columns can work (bug #58373)
+- fixed bug where older versions of MySQL would present cast(0 as decimal(0,0)) as string
+ that caused our EF code to throw an exception as it tried to convert that to bool
+ (bug #55349)
Version 6.2.4
- Fix authorization popup after modifying stored procedure in VS (Bug #44715)
=== modified file 'MySql.Data.Entity/Provider/EFMySqlDataReader.cs'
--- a/MySql.Data.Entity/Provider/EFMySqlDataReader.cs 2010-08-18 19:48:34 +0000
+++ b/MySql.Data.Entity/Provider/EFMySqlDataReader.cs 2010-12-09 03:36:45 +0000
@@ -27,6 +27,7 @@
using System.Data;
using System.Data.Metadata.Edm;
using System.Globalization;
+using System.Text;
namespace MySql.Data.Entity
{
@@ -207,9 +208,15 @@
private object ChangeType(object sourceValue, Type targetType)
{
- if (sourceValue is byte[] && targetType == typeof(Guid))
+ if (sourceValue is byte[])
{
- return new Guid((byte[])sourceValue);
+ if (targetType == typeof(Guid))
+ return new Guid((byte[])sourceValue);
+ else if (targetType == typeof(bool))
+ {
+ byte[] bytes = (byte[])sourceValue;
+ return bytes[0] == '1';
+ }
}
if (sourceValue is DateTime && targetType == typeof(DateTimeOffset))
Attachment: [text/bzr-bundle] bzr/reggie.burnett@oracle.com-20101209033645-c5ffifegx9rub631.bundle
Thread |
---|
• bzr commit into connector-net-6.2 branch (reggie.burnett:912) | Reggie Burnett | 9 Dec |