#At file:///C:/work/connector-net/6.3/ based on revid:reggie.burnett@stripped
953 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:44:43 +0000
+++ b/CHANGES 2010-12-09 03:38:07 +0000
@@ -14,6 +14,9 @@
- fixed ReadFieldLength to return a long so bigint autoincrement columns can work (bug #58373)
- fixed MySqlHelper.ExecuteReader bug where it was opening the connection inside a using block
which was closing the connection before we were really done with it (bug #57501)
+- 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.3.5
- Fix installer bug related to .NET FW 4.0 (bug #56580)
=== 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-20101209033807-3eeno66f9rs0tpwu.bundle
| Thread |
|---|
| • bzr commit into connector-net-trunk branch (reggie.burnett:953) | Reggie Burnett | 9 Dec |