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

  919 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-11 20:29:58 +0000
+++ b/CHANGES	2010-08-11 22:14:35 +0000
@@ -7,6 +7,7 @@
 - fixed visual studio plugin so that stored procedure editing works on older versions of MySQL (bug #55170)
 - Improve performance of write operaitons (e.g insert) if compression is enabled (Bug #48243)
 - Changed timestamp columns in entity framework models to be DateTime objects instead of DateTimeOffset (bug #52550)
+- fixed visual studio plugin so that stored procedure editing works on older versions of MySQL (bug #55170)
 
 Version 6.3.3 (beta 2)
 - fix "There is already an open DataReader..." after exceptions in DataReader.Close()

=== 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-20100811221435-blralilalf6jzlwu.bundle
Thread
bzr commit into connector-net-trunk branch (reggie.burnett:919) Reggie Burnett12 Aug