#At file:///C:/work/connector-net/6.2/ based on revid:reggie.burnett@stripped
901 Reggie Burnett 2010-10-07 [merge]
merge
modified:
CHANGES
MySql.Data.Entity/Tests/ProceduresAndFunctions.cs
MySql.Data.Entity/Tests/Properties/procs.sql
MySql.Data/Provider/Source/command.cs
=== modified file 'CHANGES'
=== modified file 'CHANGES'
--- a/CHANGES 2010-10-06 20:39:51 +0000
+++ b/CHANGES 2010-10-07 21:11:55 +0000
@@ -1,5 +1,7 @@
- Added MySqlHelper.ExecuteReader that takes an external connection and array of paramters (bug #56755)
- fixed problem with using bit parameters as output (bug #56756)
+- fixed MySqlCommand.Clone so that the default command timeoout functionality is not disabled when
+ you clone a command (bug #56806)
Version 6.2.4
- Fix authorization popup after modifying stored procedure in VS (Bug #44715)
=== modified file 'MySql.Data.Entity/Tests/ProceduresAndFunctions.cs'
--- a/MySql.Data.Entity/Tests/ProceduresAndFunctions.cs 2010-08-18 19:48:34 +0000
+++ b/MySql.Data.Entity/Tests/ProceduresAndFunctions.cs 2010-10-07 21:11:55 +0000
@@ -124,6 +124,36 @@
Assert.AreEqual(6, reader[0]);
}
}
- }
+ }
+
+ /// <summary>
+ /// Bug #56806 Default Command Timeout has no effect in connection string
+ /// </summary>
+ [Test]
+ public void CommandTimeout()
+ {
+ string connectionString = String.Format(
+ "metadata=res://*/TestModel.csdl|res://*/TestModel.ssdl|res://*/TestModel.msl;provider=MySql.Data.MySqlClient; provider connection string=\"{0};default command timeout=5\"", GetConnectionString(true));
+ EntityConnection connection = new EntityConnection(connectionString);
+
+ using (testEntities context = new testEntities(connection))
+ {
+ Author a = new Author();
+ a.Id = 66; // special value to indicate the routine should take 30 seconds
+ a.Name = "Test name";
+ a.Age = 44;
+ context.AddToAuthors(a);
+ try
+ {
+ context.SaveChanges();
+ Assert.Fail("This should have timed out");
+ }
+ catch (Exception ex)
+ {
+ string s = ex.Message;
+ }
+ }
+ }
+
}
}
\ No newline at end of file
=== modified file 'MySql.Data.Entity/Tests/Properties/procs.sql'
--- a/MySql.Data.Entity/Tests/Properties/procs.sql 2010-01-05 22:09:58 +0000
+++ b/MySql.Data.Entity/Tests/Properties/procs.sql 2010-10-07 21:10:46 +0000
@@ -5,7 +5,11 @@
CREATE PROCEDURE AddAuthor(theid INT, thename VARCHAR(20), theage INT)
BEGIN
- INSERT INTO authors VALUES (theid, thename, theage);
+ IF theid = 66 THEN
+ SELECT SLEEP(30);
+ ELSE
+ INSERT INTO authors VALUES (theid, thename, theage);
+ END IF;
END $$
CREATE PROCEDURE DeleteAuthor(theid int)
=== modified file 'MySql.Data/Provider/Source/command.cs'
--- a/MySql.Data/Provider/Source/command.cs 2010-08-18 19:48:34 +0000
+++ b/MySql.Data/Provider/Source/command.cs 2010-10-07 21:11:55 +0000
@@ -807,7 +807,7 @@
{
MySqlCommand clone = new MySqlCommand(cmdText, connection, curTransaction);
clone.CommandType = CommandType;
- clone.CommandTimeout = CommandTimeout;
+ clone.commandTimeout = commandTimeout;
clone.batchableCommandText = batchableCommandText;
clone.UpdatedRowSource = UpdatedRowSource;
Attachment: [text/bzr-bundle] bzr/reggie.burnett@oracle.com-20101007211155-l93gqkuop5xkwt39.bundle
| Thread |
|---|
| • bzr commit into connector-net-6.2 branch (reggie.burnett:901) | Reggie Burnett | 7 Oct |