Bug #6036 | System.OverflowException when using YEAR datatype | ||
---|---|---|---|
Submitted: | 11 Oct 2004 19:30 | Modified: | 13 Oct 2004 16:25 |
Reporter: | Ben Reichelt | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S2 (Serious) |
Version: | 1.0.0.22708 | OS: | Windows (WinXP Pro) |
Assigned to: | Reggie Burnett | CPU Architecture: | Any |
[11 Oct 2004 19:30]
Ben Reichelt
[11 Oct 2004 19:31]
Ben Reichelt
NUnit test to replicate this bug.
Attachment: YearDatatypeFixture.zip (application/x-zip-compressed, text), 949 bytes.
[13 Oct 2004 16:25]
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 Additional info: The following nunit test case now passes. [Test()] public void YearType() { execSQL("DROP TABLE IF EXISTS Test"); execSQL("CREATE TABLE Test (yr YEAR)"); execSQL("INSERT INTO Test VALUES (98)"); execSQL("INSERT INTO Test VALUES (1990)"); execSQL("INSERT INTO Test VALUES (2004)"); MySqlCommand cmd = new MySqlCommand("SELECT * FROM Test", conn); MySqlDataReader reader = null; try { reader = cmd.ExecuteReader(); reader.Read(); Assert.AreEqual( 1998, reader.GetUInt32(0) ); reader.Read(); Assert.AreEqual( 1990, reader.GetUInt32(0) ); reader.Read(); Assert.AreEqual( 2004, reader.GetUInt32(0) ); } catch (Exception ex) { Assert.Fail( ex.Message ); } finally { if (reader != null) reader.Close(); } }