List:Commits« Previous MessageNext Message »
From:Reggie Burnett Date:November 3 2010 8:36pm
Subject:bzr commit into connector-net-trunk branch (reggie.burnett:938)
View as plain text  
#At file:///C:/work/connector-net/trunk/ based on revid:reggie.burnett@stripped

  938 Reggie Burnett	2010-11-03 [merge]
      merged

    modified:
      CHANGES
      MySql.Data/Provider/Source/ISSchemaProvider.cs
      MySql.Data/Provider/Source/TracingDriver.cs
      MySql.Data/Tests/Source/Logging.cs
=== modified file 'CHANGES'
=== modified file 'CHANGES'
--- a/CHANGES	2010-10-11 18:29:42 +0000
+++ b/CHANGES	2010-10-22 19:01:14 +0000
@@ -1,3 +1,8 @@
+Version 6.3.6
+- Fixed TracingDriver so that it normalizes long queries before truncation so we don't get exceptions when quoted
+  tokens land on the 300th character (bug #57641)
+
+Version 6.3.5
 - Fix installer bug related to .NET FW 4.0 (bug #56580)
 - Added MySqlHelper.ExecuteReader that takes an external connection and array of paramters (bug #56755)
 - fixed database methods in EF4 provider services to use the database name from the connection string (bug #56589)

=== modified file 'MySql.Data/Provider/Source/ISSchemaProvider.cs'
--- a/MySql.Data/Provider/Source/ISSchemaProvider.cs	2010-08-18 19:48:34 +0000
+++ b/MySql.Data/Provider/Source/ISSchemaProvider.cs	2010-11-03 20:35:00 +0000
@@ -188,6 +188,9 @@
         /// <returns></returns>
         public override DataTable GetProcedures(string[] restrictions)
         {
+            if (connection.Settings.UseProcedureBodies)
+                return base.GetProcedures(restrictions); 
+            
             string[] keys = new string[4];
             keys[0] = "ROUTINE_CATALOG";
             keys[1] = "ROUTINE_SCHEMA";

=== modified file 'MySql.Data/Provider/Source/TracingDriver.cs'
--- a/MySql.Data/Provider/Source/TracingDriver.cs	2010-08-18 19:42:41 +0000
+++ b/MySql.Data/Provider/Source/TracingDriver.cs	2010-10-22 19:01:14 +0000
@@ -66,9 +66,9 @@
 
             if (cmdText.Length > 300)
             {
-                cmdText = cmdText.Substring(0, 300);
                 QueryNormalizer normalizer = new QueryNormalizer();
                 normalized_query = normalizer.Normalize(cmdText);
+                cmdText = cmdText.Substring(0, 300);
             }
 
             base.SendQuery(p);

=== modified file 'MySql.Data/Tests/Source/Logging.cs'
--- a/MySql.Data/Tests/Source/Logging.cs	2010-08-18 19:42:41 +0000
+++ b/MySql.Data/Tests/Source/Logging.cs	2010-10-22 19:01:14 +0000
@@ -110,5 +110,24 @@
             Assert.IsTrue(listener.Strings[1].EndsWith("SELECT ?"));
         }
 
+        /// <summary>
+        /// Bug #57641	Substring out of range exception in ConsumeQuotedToken
+        /// </summary>
+        [Test]
+        public void QuotedTokenAt300()
+        {
+            MySqlTrace.Listeners.Clear();
+            MySqlTrace.Switch.Level = SourceLevels.All;
+            GenericListener listener = new GenericListener();
+            MySqlTrace.Listeners.Add(listener);
+
+            string sql = @"SELECT 1 AS `AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1`,  2 AS `AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2`,
+                3 AS `AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3`,  4 AS `AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4`,
+                5 AS `AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5`,  6 AS `AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6`;";
+            MySqlCommand cmd = new MySqlCommand(sql, conn);
+            using (MySqlDataReader reader = cmd.ExecuteReader())
+            {
+            }
+        }
     }
 }


Attachment: [text/bzr-bundle] bzr/reggie.burnett@oracle.com-20101103203645-mkmrzvkhre0512g6.bundle
Thread
bzr commit into connector-net-trunk branch (reggie.burnett:938) Reggie Burnett3 Nov