#At file:///C:/work/connector-net/trunk/ based on revid:reggie.burnett@stripped
946 Reggie Burnett 2010-11-30 [merge]
merged
modified:
MySql.Data/Provider/Source/MySqlHelper.cs
MySql.Data/Tests/Source/CommandTests.cs
=== modified file 'MySql.Data/Provider/Source/MySqlHelper.cs'
=== modified file 'MySql.Data/Provider/Source/MySqlHelper.cs'
--- a/MySql.Data/Provider/Source/MySqlHelper.cs 2010-09-17 16:24:05 +0000
+++ b/MySql.Data/Provider/Source/MySqlHelper.cs 2010-11-30 18:44:43 +0000
@@ -298,13 +298,11 @@
public static MySqlDataReader ExecuteReader(string connectionString, string commandText, params MySqlParameter[] commandParameters)
{
//create & open a SqlConnection
- using (MySqlConnection cn = new MySqlConnection(connectionString))
- {
- cn.Open();
+ MySqlConnection cn = new MySqlConnection(connectionString);
+ cn.Open();
- //call the private overload that takes an internally owned connection in place of the connection string
- return ExecuteReader(cn, null, commandText, commandParameters, false);
- }
+ //call the private overload that takes an internally owned connection in place of the connection string
+ return ExecuteReader(cn, null, commandText, commandParameters, false);
}
/// <summary>
=== modified file 'MySql.Data/Tests/Source/CommandTests.cs'
--- a/MySql.Data/Tests/Source/CommandTests.cs 2010-10-07 21:26:37 +0000
+++ b/MySql.Data/Tests/Source/CommandTests.cs 2010-11-30 18:44:43 +0000
@@ -449,6 +449,21 @@
Assert.AreEqual("B", reader.GetString(3));
}
}
+
+ /// <summary>
+ /// Bug #57501 MySql Connector/NET 6.3.5.0 fails to read from DataReader
+ /// </summary>
+ [Test]
+ public void HelperTest()
+ {
+ string connStr = GetConnectionString(true);
+ using (MySqlDataReader reader = MySqlHelper.ExecuteReader(connStr, "SHOW TABLES"))
+ {
+ while (reader.Read())
+ {
+ }
+ }
+ }
}
Attachment: [text/bzr-bundle] bzr/reggie.burnett@oracle.com-20101130184509-adlk2gjh1uy9ueh2.bundle
| Thread |
|---|
| • bzr commit into connector-net-trunk branch (reggie.burnett:946) | Reggie Burnett | 30 Nov |