List:Commits« Previous MessageNext Message »
From:Julio Casal Date:May 10 2011 5:49pm
Subject:bzr commit into connector-net-6.1 branch (julio.casal:884) Bug#48007
Bug#12539685
View as plain text  
#At file:///D:/Users/jcasalt/Dev/connector-net/6.1/ based on revid:julio.casal@stripped

  884 Julio Casal	2011-05-10
      Fixed ISSchemaProvider to use the information schema to retrieve parameter metadata when running against server 5.5.3 or greater (MySQL bug #48007, Oracle bug #12539685).

    modified:
      CHANGES
      MySql.Data/Provider/Properties/AssemblyInfo.cs
      MySql.Data/Provider/Source/ISSchemaProvider.cs
      MySql.Data/Tests/Properties/AssemblyInfo.cs
      MySql.Data/Tests/Source/StoredProcedure.cs
=== modified file 'CHANGES'
=== modified file 'CHANGES'
--- a/CHANGES	2011-04-27 18:48:02 +0000
+++ b/CHANGES	2011-05-10 17:49:50 +0000
@@ -33,6 +33,8 @@
 - added batching support for updates and deletes (bug #59616)
 - Introduced workaround to unexpected query aborts (server 5.1+) when executing a datareader after a command.Cancel() (MySQL bug#60541).
 - modified schema1.sql in MySql.Web to remove ENGINE declaration on table creation (Oracle bug #12311974).
+- fixed ISSchemaProvider to use the information schema to retrieve parameter metadata when running 
+  against server 5.5.3 or greater (MySQL bug #48007, Oracle bug #12539685).
 
 Version 6.1.5
 - Fix authorization popup after modifying stored procedure in VS (Bug #44715)

=== modified file 'MySql.Data/Provider/Properties/AssemblyInfo.cs'
--- a/MySql.Data/Provider/Properties/AssemblyInfo.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Data/Provider/Properties/AssemblyInfo.cs	2011-05-10 17:49:50 +0000
@@ -74,4 +74,4 @@
 //
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyName("ConnectorNet")]
-
+[assembly: InternalsVisibleTo("MySql.Data.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d973bda91f71752c78294126974a41a08643168271f65fc0fb3cd45f658da01fbca75ac74067d18e7afbf1467d7a519ce0248b13719717281bb4ddd4ecd71a580dfe0912dfc3690b1d24c7e1975bf7eed90e4ab14e10501eedf763bff8ac204f955c9c15c2cf4ebf6563d8320b6ea8d1ea3807623141f4b81ae30a6c886b3ee1")]
\ No newline at end of file

=== modified file 'MySql.Data/Provider/Source/ISSchemaProvider.cs'
--- a/MySql.Data/Provider/Source/ISSchemaProvider.cs	2010-11-17 22:55:49 +0000
+++ b/MySql.Data/Provider/Source/ISSchemaProvider.cs	2011-05-10 17:49:50 +0000
@@ -334,7 +334,7 @@
         public virtual DataTable GetProcedureParameters(string[] restrictions,
             DataTable routines)
         {
-            if (connection.driver.Version.isAtLeast(6, 0, 6))
+            if (connection.driver.Version.isAtLeast(5, 5, 3))
                 return GetParametersFromIS(restrictions, routines);
             try
             {

=== modified file 'MySql.Data/Tests/Properties/AssemblyInfo.cs'
--- a/MySql.Data/Tests/Properties/AssemblyInfo.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Data/Tests/Properties/AssemblyInfo.cs	2011-05-10 17:49:50 +0000
@@ -64,4 +64,4 @@
 //
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
-[assembly: AssemblyKeyName("")]
+[assembly: AssemblyKeyName("ConnectorNet")]
\ No newline at end of file

=== modified file 'MySql.Data/Tests/Source/StoredProcedure.cs'
--- a/MySql.Data/Tests/Source/StoredProcedure.cs	2010-10-06 20:39:21 +0000
+++ b/MySql.Data/Tests/Source/StoredProcedure.cs	2011-05-10 17:49:50 +0000
@@ -1334,5 +1334,37 @@
             cmd.ExecuteNonQuery();
             Assert.AreEqual(0, cmd.Parameters[0].Value);
         }
+
+        /// <summary>
+        /// Verifies that GetProcedureParameters does not require SELECT permission on mysql.proc table.
+        /// </summary>
+        [Test]
+        public void GetProcedureParametersDoesNotRequireSelectFromMySqlProceduresTable()
+        {
+            if (Version < new Version(5, 5, 3)) return;
+
+            suExecSQL(String.Format("GRANT ALL ON `{0}`.* to 'simpleuser' identified by 'simpleuser'",database0));
+            execSQL("DROP PROCEDURE IF EXISTS spTest");
+            execSQL(@"CREATE  PROCEDURE spTest(id INT, name VARCHAR(20))
+                    BEGIN SELECT name; END");
+
+            string connStr = GetConnectionString("simpleuser", "simpleuser", true) + ";use procedure bodies=false";
+
+            using (MySqlConnection c = new MySqlConnection(connStr))
+            {
+                c.Open();
+
+                string[] restrictions = new string[4];
+                restrictions[1] = c.Database;
+                restrictions[2] = "spTest";
+                DataTable procTable = c.GetSchema("procedures", restrictions);
+                ISSchemaProvider isp = new ISSchemaProvider(c);
+                string[] rest = isp.CleanRestrictions(restrictions);
+
+                DataTable parametersTable = isp.GetProcedureParameters(rest, procTable);
+
+                Assert.IsNotNull(parametersTable);
+            }
+        }
     }
 }


Attachment: [text/bzr-bundle] bzr/julio.casal@oracle.com-20110510174950-o1x1l1u9pj3pf30o.bundle
Thread
bzr commit into connector-net-6.1 branch (julio.casal:884) Bug#48007Bug#12539685Julio Casal10 May
  • Re: bzr commit into connector-net-6.1 branch (julio.casal:884) Bug#48007Bug#12539685Reggie Burnett10 May