Bug #7951 Error reading a timestamp column
Submitted: 17 Jan 2005 4:31 Modified: 1 Jun 2005 3:26
Reporter: Kris Kimbrough Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:1.0.3 OS:Windows (Win/XP)
Assigned to: Reggie Burnett CPU Architecture:Any

[17 Jan 2005 4:31] Kris Kimbrough
Description:
I'm having trouble reading a timestamp value from one of my tables.  Below is the stack trace for the error.  I have other tables which also have timestamps, which I am able to read with no issues. 

[FormatException: Input string was not in a correct format.]
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +0
   System.Int16.Parse(String s, NumberStyles style, IFormatProvider provider) +37
   System.Int16.Parse(String s) +12
   MySql.Data.Types.MySqlDateTime.Parse40Timestamp(String s)
   MySql.Data.Types.MySqlDateTime.ParseMySql(String s, Boolean is41)
   MySql.Data.Types.MySqlDateTime.ReadValue(PacketReader reader, Int64 length)
   MySql.Data.MySqlClient.NativeDriver.ReadFieldValue(Int32 index, MySqlField field, MySqlValue valObject)
   MySql.Data.MySqlClient.CommandResult.ReadDataRow(Boolean loadFields)
   MySql.Data.MySqlClient.MySqlDataReader.Read()

How to repeat:
The code where I am reading the data is a common base class, so in some cases it works and in others it doesn't.  Not sure what additional information I can provide to help track it down.  The timestamp values are all recent as most records were updated last week.
[17 Jan 2005 18:52] Reggie Burnett
Can you tell me what version of MySQL you are using?  ALso, can you pinpoint the row that is causing the problem and give me the values of the columns you think are causing the problem?
[19 Jan 2005 4:56] Kris Kimbrough
I am using MySQL 4.0.23 on windows/xp

a sample value from the column (as reported by 3rd party tool MySQL-Front):

1/14/2005 7:33:16 AM

I tried taking a timestamp value I am able to read from one table and updating a sample row in the larger table I'm having troubles with.  This doesn't help, so I think it isn't just a simple parsing issue.
[24 May 2005 21:04] 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
    http://www.mysql.com/doc/en/Installing_source_tree.html
[1 Jun 2005 3:26] Paul DuBois
Noted in Connector/NET 1.0.5 changelog.