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

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

    modified:
      MySql.Data/Tests/Source/ScriptExecution.cs
      MySql.VisualStudio/DDEX/StoredProcedureColumnEnumerator.cs
=== modified file 'MySql.Data/Tests/Source/ScriptExecution.cs'
=== modified file 'MySql.Data/Tests/Source/ScriptExecution.cs'
--- a/MySql.Data/Tests/Source/ScriptExecution.cs	2010-04-10 01:39:23 +0000
+++ b/MySql.Data/Tests/Source/ScriptExecution.cs	2010-08-11 22:13:41 +0000
@@ -199,7 +199,7 @@
         [Test]
         public void DelimiterInScriptV2()
         {
-            var sql = new StringBuilder();
+            StringBuilder sql = new StringBuilder();
 
             sql.AppendLine("DELIMITER MySuperDelimiter");
             sql.AppendLine("CREATE PROCEDURE TestProcedure1()");
@@ -213,7 +213,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-20100811221341-rqlz9ygrj7z203q4.bundle
Thread
bzr commit into connector-net-6.2 branch (reggie.burnett:889) Reggie Burnett12 Aug