Bug #107618 .NET 6 - equality check on Datetime.Date throws ArgumentOutOfRangeException
Submitted: 21 Jun 2022 6:42 Modified: 18 Aug 2022 13:50
Reporter: Yujie Zhe Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:8.0.29 OS:Any
Assigned to: CPU Architecture:Any

[21 Jun 2022 6:42] Yujie Zhe
Description:
When using MySQL .NET connector 6.0.1 in .NET 6, performing an equality check on Datetime.Date throws an ArgumentOutOfRangeException.

Environment:
MySQL 8.0.29
MySQL .NET connector 6.0.1
.NET 6
VS 2022

How to repeat:
I have created a simple console app to demonstrate the issue.
https://github.com/zheyujie/my-sql-net-6-datetime-issue
[24 Jun 2022 9:05] MySQL Verification Team
Hello Yujie Zhe,

Thank you for the report and test case.

regards,
Umesh
[4 Jul 2022 10:51] Yujie Zhe
Hey team, any updates on this? 
.NET 5 is out of support now and I can't upgrade my project to .NET 6 because of this issue.

Thanks!
[4 Jul 2022 15:59] Daniel Valdez
Posted by developer:
 
Hi Yujie Zhe,

We have addressed the issue, so we are working on it. Please expect the fix for a future release.

Thanks,
Daniel
[18 Aug 2022 13:50] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Connector/NET 8.0.31 release, and here's the proposed changelog entry from the documentation team:

On systems running .NET 6, Connector/NET could throw an exception when
trying to perform an equality check involving type Datetime.Date.

Thank you for the bug report.