Bug #4149 Handling of Time column not correct
Submitted: 15 Jun 2004 17:40 Modified: 2 Jul 2004 22:11
Reporter: Alistair Maclean Email Updates:
Status: Closed Impact on me:
Category:Connector / NET Severity:S2 (Serious)
Version:0.76 OS:Windows (Windows)
Assigned to: Reggie Burnett CPU Architecture:Any

[15 Jun 2004 17:40] Alistair Maclean
In Field.cs the handling of a database time column has it such that a value of "00:00:00" returns a DBNull value. "00:00:00" is in fact midnight and a valid time. It should not return null, it should return "00:00:00".

Part of the problem here is that the .NET data type TimeSpan gets itself in a mess with times (it only does 00:00:00 to 23:59:59, and does nt handle 24:00:00), which the MySQL column type "Time" accepts.  

How to repeat:
Create a table with a Time column, set the value of the column to 00:00:00
Read the table record with the ByteFX driver
Get a DBNull value

Suggested fix:
Remove an "if" statement in the handling of MySqlDbType.Time. Maybe checking for 24:00:00 would be more appropriate.
[2 Jul 2004 1:13] Dean Ellis
Verified; thank you for the report.
[2 Jul 2004 22:11] Reggie Burnett
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

Values 00:00:00 and 24:00:00 should come through ok now.