Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dapper/SqlMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3716,7 +3716,7 @@ private static void LoadReaderValueOrBranchToDBNullLabel(ILGenerator il, int ind
{
TypeCode dataTypeCode = Type.GetTypeCode(colType), unboxTypeCode = Type.GetTypeCode(unboxType);
bool hasTypeHandler;
if ((hasTypeHandler = typeHandlers.ContainsKey(unboxType)) || colType == unboxType || dataTypeCode == unboxTypeCode || dataTypeCode == Type.GetTypeCode(nullUnderlyingType))
if ((hasTypeHandler = typeHandlers.ContainsKey(unboxType)) || colType == unboxType || dataTypeCode == (nullUnderlyingType != null ? Type.GetTypeCode(nullUnderlyingType) : unboxTypeCode))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is why I hate writing ref-emit code; what's the impact of this change... "who knows?"

I'll need to read this while very very awake...

{
if (hasTypeHandler)
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Dapper.Tests/Providers/MySQLTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void Issue295_NullableDateTime_MySql_ConvertZeroDatetime()
}
}

[FactMySql(Skip = "See https://github.com/DapperLib/Dapper/issues/295, AllowZeroDateTime=True is not supported")]
[FactMySql]
public void Issue295_NullableDateTime_MySql_AllowZeroDatetime()
{
using (var conn = Provider.GetMySqlConnection(true, false, true))
Expand All @@ -105,7 +105,7 @@ public void Issue295_NullableDateTime_MySql_AllowZeroDatetime()
}
}

[FactMySql(Skip = "See https://github.com/DapperLib/Dapper/issues/295, AllowZeroDateTime=True is not supported")]
[FactMySql]
public void Issue295_NullableDateTime_MySql_ConvertAllowZeroDatetime()
{
using (var conn = Provider.GetMySqlConnection(true, true, true))
Expand Down