List:Commits« Previous MessageNext Message »
From:Reggie Burnett Date:August 11 2010 10:12pm
Subject:bzr commit into connector-net-6.1 branch (reggie.burnett:842)
View as plain text  
#At file:///C:/bzr-connector-net/6.1/ based on revid:vvaintroub@stripped

  842 Reggie Burnett	2010-08-11 [merge]
      merged

    modified:
      CHANGES
      MySql.Data/Tests/Source/ScriptExecution.cs
      MySql.VisualStudio/DDEX/StoredProcedureColumnEnumerator.cs
=== modified file 'CHANGES'
=== modified file 'CHANGES'
--- a/CHANGES	2010-08-06 10:27:49 +0000
+++ b/CHANGES	2010-08-11 22:12:04 +0000
@@ -32,6 +32,8 @@
 - fixed recognition of char(36) columns to be guids when used in views with entity models (bug #52085)
 - added code to default 'respect binary flags' in the visual studio wizard so that older
   versions of MySQL will work when creating/editing stored procedures (bug #55170)
+- fixed stored procedure enumeration code that would barf if a proc was used in a dataset
+  that did not actually return any resultsets (bug #50671)
 
 Version 6.1.4
 - SessionProvider : Avoid SQLNullValueException if lockId returned by select is 

=== modified file 'MySql.Data/Tests/Source/ScriptExecution.cs'
--- a/MySql.Data/Tests/Source/ScriptExecution.cs	2010-02-17 21:03:01 +0000
+++ b/MySql.Data/Tests/Source/ScriptExecution.cs	2010-08-11 22:12:04 +0000
@@ -198,7 +198,7 @@
         [Test]
         public void DelimiterInScriptV2()
         {
-            var sql = new StringBuilder();
+            StringBuilder sql = new StringBuilder();
 
             sql.AppendLine("DELIMITER MySuperDelimiter");
             sql.AppendLine("CREATE PROCEDURE TestProcedure1()");
@@ -212,7 +212,7 @@
 
             sql.AppendLine("DELIMITER ;");
 
-            var script = new MySqlScript(conn, sql.ToString());
+            MySqlScript script = new MySqlScript(conn, sql.ToString());
             script.Execute();
         }
 

=== modified file 'MySql.VisualStudio/DDEX/StoredProcedureColumnEnumerator.cs'
--- a/MySql.VisualStudio/DDEX/StoredProcedureColumnEnumerator.cs	2009-05-18 20:35:46 +0000
+++ b/MySql.VisualStudio/DDEX/StoredProcedureColumnEnumerator.cs	2010-08-11 22:12:04 +0000
@@ -58,15 +58,19 @@
                 using (IDataReader reader = cmd.ExecuteReader(CommandBehavior.SchemaOnly))
                 {
                     DataTable dt = reader.GetSchemaTable();
-                    dt.Columns.Add(new DataColumn("RoutineName", typeof(string)));
-                    foreach (DataRow row in dt.Rows)
+                    if (dt == null)
+                        dt = new DataTable();
+                    else
                     {
-                        row["RoutineName"] = restrictions[2];
-                        string basedb = row["BaseSchemaName"] as string;
-                        if (String.IsNullOrEmpty(basedb) || row["BaseSchemaName"] == DBNull.Value)
-                            row["BaseSchemaName"] = cmd.Connection.Database;
+                        dt.Columns.Add(new DataColumn("RoutineName", typeof(string)));
+                        foreach (DataRow row in dt.Rows)
+                        {
+                            row["RoutineName"] = restrictions[2];
+                            string basedb = row["BaseSchemaName"] as string;
+                            if (String.IsNullOrEmpty(basedb) || row["BaseSchemaName"] == DBNull.Value)
+                                row["BaseSchemaName"] = cmd.Connection.Database;
+                        }
                     }
-
                     return new AdoDotNetDataTableReader(dt);
                 }
             }


Attachment: [text/bzr-bundle] bzr/reggie.burnett@oracle.com-20100811221204-gqbh1cs8k77qa4z0.bundle
Thread
bzr commit into connector-net-6.1 branch (reggie.burnett:842) Reggie Burnett12 Aug