Bug #6975 | MySqlDataAdapter.Fill locks up with null or blank fields | ||
---|---|---|---|
Submitted: | 3 Dec 2004 4:32 | Modified: | 7 Dec 2004 17:00 |
Reporter: | Mark White | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S1 (Critical) |
Version: | 1.0.2-gamma | OS: | Windows (Windows XP) |
Assigned to: | Reggie Burnett | CPU Architecture: | Any |
[3 Dec 2004 4:32]
Mark White
[7 Dec 2004 17:00]
Reggie Burnett
Thank you for taking the time to report a problem. Unfortunately you are not using a current version of the product your reported a problem with -- the problem might already be fixed. Please download a new version from http://www.mysql.com/downloads/ If you are able to reproduce the bug with one of the latest versions, please change the version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of MySQL. Additional info: Mark I fixed another bug this morning that would cause a data reader to "stall" when multiple resultsets are returned. Perhaps this is what you are seeing? In any event, I have a test case that inserts nulls into a table and then reads them back in using .Fill() and it works ok. Here is the test case. If you are able to modify this to show the problem, please let me know. Thanks! [Test()] public void TestFill() { execSQL("INSERT INTO Test (id, id2, name, dt) VALUES (NULL, 1, 'Name 1', Now())"); execSQL("INSERT INTO Test (id, id2, name, dt) VALUES (NULL, 2, NULL, Now())"); execSQL("INSERT INTO Test (id, id2, name, dt) VALUES (NULL, 3, 'Name 3', Now())"); MySqlDataAdapter da = new MySqlDataAdapter("select * from Test", conn); DataSet ds = new DataSet(); da.Fill( ds, "Test" ); Assert.AreEqual( 1, ds.Tables.Count ); Assert.AreEqual( 3, ds.Tables[0].Rows.Count ); Assert.AreEqual( 1, ds.Tables[0].Rows[0]["id"] ); Assert.AreEqual( 2, ds.Tables[0].Rows[1]["id"] ); Assert.AreEqual( 3, ds.Tables[0].Rows[2]["id"] ); Assert.AreEqual( 1, ds.Tables[0].Rows[0]["id2"] ); Assert.AreEqual( 2, ds.Tables[0].Rows[1]["id2"] ); Assert.AreEqual( 3, ds.Tables[0].Rows[2]["id2"] ); Assert.AreEqual( "Name 1", ds.Tables[0].Rows[0]["name"] ); Assert.AreEqual( DBNull.Value, ds.Tables[0].Rows[1]["name"] ); Assert.AreEqual( "Name 3", ds.Tables[0].Rows[2]["name"] ); }