List:Commits« Previous MessageNext Message »
From:Reggie Burnett Date:October 9 2009 9:45pm
Subject:bzr push into connector-net-trunk branch (reggie.burnett:780 to 781)
View as plain text  
  781 Reggie Burnett	2009-10-09
      a few changes to fix CF compilation and checking in a file that we left out of the logging refactoring cset

    removed:
      MySql.Data/Provider/Source/common/Utilities.cs
    added:
      MySql.Data/Provider/Source/TracingDriver.cs
    modified:
      MySQLClient.sln
      MySql.Data/Provider/MySql.Data.CF.csproj
      MySql.Data/Provider/MySql.Data.csproj
      MySql.Data/Provider/Source/Connection.cs
      MySql.Data/Provider/Source/Driver.cs
      MySql.Data/Provider/Source/MySqlConnectionStringBuilder.cs
      MySql.Data/Provider/Source/MySqlTrace.cs
      MySql.Data/Provider/Source/MysqlDefs.cs
      MySql.Data/Provider/Source/NativeDriver.cs
      MySql.Data/Provider/Source/PerformanceMonitor.cs
      MySql.Data/Provider/Source/ProcedureCache.cs
      MySql.Data/Provider/Source/command.cs
      MySql.Data/Provider/Source/datareader.cs
      MySql.Data/Tests/Source/ParameterTests.cs
      MySql.Data/Tests/Source/UsageAdvisor.cs
  780 Reggie Burnett	2009-10-09
      refactored logging system to increase peformance, increase clarity of log, and setup for
        future features

    removed:
      MySql.Data/Provider/Source/Logger.cs
      MySql.Data/Provider/Source/UsageAdvisor.cs
    added:
      MySql.Data/Provider/Source/MySqlTrace.cs
    modified:
      CHANGES
      MySQLClient.sln
      MySql.Data/Provider/MySql.Data.csproj
      MySql.Data/Provider/Source/Connection.cs
      MySql.Data/Provider/Source/Driver.cs
      MySql.Data/Provider/Source/Field.cs
      MySql.Data/Provider/Source/MySqlConnectionStringBuilder.cs
      MySql.Data/Provider/Source/MySqlPool.cs
      MySql.Data/Provider/Source/NativeDriver.cs
      MySql.Data/Provider/Source/PerformanceMonitor.cs
      MySql.Data/Provider/Source/PreparableStatement.cs
      MySql.Data/Provider/Source/ProcedureCache.cs
      MySql.Data/Provider/Source/ResultSet.cs
      MySql.Data/Provider/Source/command.cs
      MySql.Data/Provider/Source/datareader.cs
      MySql.Data/Tests/MySql.Data.Tests.csproj
      MySql.Data/Tests/Source/ParameterTests.cs
      MySql.Data/Tests/Source/Threading.cs
      MySql.Data/Tests/Source/UsageAdvisor.cs
=== modified file 'MySQLClient.sln'
=== modified file 'MySQLClient.sln'
--- a/MySQLClient.sln	2009-10-09 20:38:36 +0000
+++ b/MySQLClient.sln	2009-10-09 21:44:54 +0000
@@ -124,6 +124,7 @@
 		{587A47FB-C1CC-459D-93B6-179D95E41EFB}.Commercial|x64.ActiveCfg = Release|Any CPU
 		{587A47FB-C1CC-459D-93B6-179D95E41EFB}.Commercial|x86.ActiveCfg = Release|Any CPU
 		{587A47FB-C1CC-459D-93B6-179D95E41EFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{587A47FB-C1CC-459D-93B6-179D95E41EFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{587A47FB-C1CC-459D-93B6-179D95E41EFB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
 		{587A47FB-C1CC-459D-93B6-179D95E41EFB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
 		{587A47FB-C1CC-459D-93B6-179D95E41EFB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -171,6 +172,7 @@
 		{710D9251-17A3-4429-9A91-63F03267F310}.Commercial|x64.ActiveCfg = Release|Any CPU
 		{710D9251-17A3-4429-9A91-63F03267F310}.Commercial|x86.ActiveCfg = Release|Any CPU
 		{710D9251-17A3-4429-9A91-63F03267F310}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{710D9251-17A3-4429-9A91-63F03267F310}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{710D9251-17A3-4429-9A91-63F03267F310}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
 		{710D9251-17A3-4429-9A91-63F03267F310}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
 		{710D9251-17A3-4429-9A91-63F03267F310}.Debug|x64.ActiveCfg = Debug|Any CPU

=== modified file 'MySql.Data/Provider/MySql.Data.CF.csproj'
--- a/MySql.Data/Provider/MySql.Data.CF.csproj	2009-10-07 20:30:34 +0000
+++ b/MySql.Data/Provider/MySql.Data.CF.csproj	2009-10-09 21:44:54 +0000
@@ -96,7 +96,6 @@
     <Compile Include="Source\Exception.cs" />
     <Compile Include="Source\Field.cs" />
     <Compile Include="Source\ISSchemaProvider.cs" />
-    <Compile Include="Source\Logger.cs" />
     <Compile Include="Source\MySqlConnectionStringBuilder.cs" />
     <Compile Include="Source\MysqlDefs.cs" />
     <Compile Include="Source\MySqlError.cs" />
@@ -106,6 +105,7 @@
     <Compile Include="Source\MySqlPoolManager.cs" />
     <Compile Include="Source\MySqlScript.cs" />
     <Compile Include="Source\MySqlStream.cs" />
+    <Compile Include="Source\MySqlTrace.cs" />
     <Compile Include="Source\NativeDriver.cs" />
     <Compile Include="Source\parameter.cs" />
     <Compile Include="Source\parameter_collection.cs" />
@@ -137,7 +137,6 @@
     <Compile Include="Source\Types\MySqlUInt32.cs" />
     <Compile Include="Source\Types\MySqlUInt64.cs" />
     <Compile Include="Source\Types\MySqlValue.cs" />
-    <Compile Include="Source\UsageAdvisor.cs" />
     <Compile Include="Source\zlib\Adler32.cs" />
     <Compile Include="Source\zlib\Deflate.cs" />
     <Compile Include="Source\zlib\InfBlocks.cs" />

=== modified file 'MySql.Data/Provider/MySql.Data.csproj'
--- a/MySql.Data/Provider/MySql.Data.csproj	2009-10-09 20:38:36 +0000
+++ b/MySql.Data/Provider/MySql.Data.csproj	2009-10-09 21:44:54 +0000
@@ -248,7 +248,6 @@
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
     <Compile Include="Source\common\LowResolutionStopwatch.cs" />
-    <Compile Include="Source\common\Utilities.cs" />
     <Compile Include="Source\MySqlTrace.cs" />
     <Compile Include="Source\TimedStream.cs" />
     <Compile Include="Source\TracingDriver.cs" />

=== modified file 'MySql.Data/Provider/Source/Connection.cs'
--- a/MySql.Data/Provider/Source/Connection.cs	2009-10-09 20:38:36 +0000
+++ b/MySql.Data/Provider/Source/Connection.cs	2009-10-09 21:44:54 +0000
@@ -133,12 +133,6 @@
             }
         }
 
-        internal void LogEvent(TraceEventType type, string msg)
-        {
-            if (Settings.Logging)
-                MySqlTrace.Source.TraceEvent(type, driver.ThreadID, msg);
-        }
-
         #endregion
 
         #region Properties
@@ -471,7 +465,7 @@
 
             // if the user is using old syntax, let them know
             if (driver.Settings.UseOldSyntax)
-                LogEvent(TraceEventType.Warning, 
+                MySqlTrace.LogWarning(
                     "You are using old syntax that will be removed in future versions");
 
             SetState(ConnectionState.Open, false);
@@ -648,7 +642,7 @@
             }
             catch (Exception ex)
             {
-                LogEvent(TraceEventType.Warning, "Could not kill query in timeout handler, " +
+                MySqlTrace.LogWarning("Could not kill query in timeout handler, " +
                     " aborting connection. Exception was " + ex.Message);
                 Abort();
                 isFatal = true;

=== modified file 'MySql.Data/Provider/Source/Driver.cs'
--- a/MySql.Data/Provider/Source/Driver.cs	2009-10-09 20:38:36 +0000
+++ b/MySql.Data/Provider/Source/Driver.cs	2009-10-09 21:44:54 +0000
@@ -200,9 +200,11 @@
         {
             Driver d = null;
 
-            if (MySqlTrace.Enabled || settings.Logging || settings.UseUsageAdvisor)
+#if !CF
+            if (settings.Logging || settings.UseUsageAdvisor)
                 d = new TracingDriver(settings);
             else
+#endif
                 d = new Driver(settings);
             d.Open();
             return d;
@@ -251,7 +253,7 @@
                     }
                     catch (Exception ex)
                     {
-                        connection.LogEvent(TraceEventType.Error, ex.Message);
+                        MySqlTrace.LogError(ex.Message);
                         throw;
                     }
                 }
@@ -327,7 +329,7 @@
             }
             catch (Exception ex)
             {
-                connection.LogEvent(TraceEventType.Error, ex.Message);
+                MySqlTrace.LogError(ex.Message);
                 throw;
             }
         }

=== modified file 'MySql.Data/Provider/Source/MySqlConnectionStringBuilder.cs'
--- a/MySql.Data/Provider/Source/MySqlConnectionStringBuilder.cs	2009-10-09 20:38:36 +0000
+++ b/MySql.Data/Provider/Source/MySqlConnectionStringBuilder.cs	2009-10-09 21:44:54 +0000
@@ -766,17 +766,15 @@
 
         private object ParseEnum(Type t, string requestedValue, string key)
         {
-            object value;
-
-            if (Utilities.EnumTryParse(t, requestedValue, out value))
-                return value;
-            foreach (string enumValue in Enum.GetNames(t))
-            {
-                if (enumValue.ToLower(CultureInfo.InvariantCulture).Contains(requestedValue))
-                    return Enum.Parse(t, enumValue);
-            }
-            throw new InvalidOperationException(String.Format(
-                Resources.InvalidConnectionStringValue, requestedValue, key));
+            try
+            {
+                return Enum.Parse(t, requestedValue, true);
+            }
+            catch (ArgumentException)
+            {
+                throw new InvalidOperationException(String.Format(
+                    Resources.InvalidConnectionStringValue, requestedValue, key));
+            }
         }
 
         private object ChangeType(object value, Type t)

=== modified file 'MySql.Data/Provider/Source/MySqlTrace.cs'
--- a/MySql.Data/Provider/Source/MySqlTrace.cs	2009-10-09 20:38:36 +0000
+++ b/MySql.Data/Provider/Source/MySqlTrace.cs	2009-10-09 21:44:54 +0000
@@ -25,43 +25,35 @@
 
 namespace MySql.Data.MySqlClient
 {
-    public class MySqlTrace
+    internal class MySqlTrace
     {
-        internal static TraceSource Source;
-        public static bool Enabled;
-
         static MySqlTrace()
         {
-            Source = new TraceSource("MySQL", SourceLevels.All);
-            // check the app.config to see if we have any listeners registered for
-            // the mysql source
-            // if so then we have tracing enabled globally
         }
 
-        public static TraceListenerCollection Listeners
+        public static void LogInformation(string msg)
         {
-            get { return Source.Listeners; }
+#if !CF
+            Trace.TraceInformation(
+                String.Format("[{0}] - {1}", DateTime.Now, msg));
+#endif
         }
 
         public static void LogWarning(string msg)
         {
-            Source.TraceEvent(TraceEventType.Warning, 0, 
+#if !CF
+            Trace.TraceWarning(
                 String.Format("[{0}] - {1}", DateTime.Now, msg));
+#endif
         }
 
         public static void LogError(string msg)
         {
-            Source.TraceEvent(TraceEventType.Error, 0,
+#if !CF
+            Trace.TraceError(
                 String.Format("[{0}] - {1}", DateTime.Now, msg));
+#endif
         }
-
-        //public static void EnableEnterpriseMonitoring()
-        //{
-        //}
-
-        //public static void DisableEnterpriseMonitoring()
-        //{
-        //}
     }
 
     internal enum UsageAdvisorFlags
@@ -71,6 +63,7 @@
         PartialRowSet = 4
     }
 
+#if !CF
     internal class MySqlTraceResultInfo
     {
         public int RowsRead;
@@ -141,4 +134,5 @@
             return msg.ToString();
         }
     }
+#endif
 }

=== modified file 'MySql.Data/Provider/Source/MysqlDefs.cs'
--- a/MySql.Data/Provider/Source/MysqlDefs.cs	2009-07-12 14:30:50 +0000
+++ b/MySql.Data/Provider/Source/MysqlDefs.cs	2009-10-09 21:44:54 +0000
@@ -324,19 +324,24 @@
         /// <summary>
         /// TCP/IP style connection.  Works everywhere.
         /// </summary>
-        Sockets,
+        Sockets = 1,
+        Socket = 1,
+        Tcp = 1,
         /// <summary>
         /// Named pipe connection.  Works only on Windows systems.
         /// </summary>
-        NamedPipe,
+        Pipe = 2,
+        NamedPipe = 2,
         /// <summary>
         /// Unix domain socket connection.  Works only with Unix systems.
         /// </summary>
-        UnixSocket,
+        UnixSocket = 3,
+        Unix = 3,
         /// <summary>
         /// Shared memory connection.  Currently works only with Windows systems.
         /// </summary>
-        SharedMemory
+        SharedMemory = 4,
+        Memory = 4
     }
 
     /// <summary>

=== modified file 'MySql.Data/Provider/Source/NativeDriver.cs'
--- a/MySql.Data/Provider/Source/NativeDriver.cs	2009-10-09 20:38:36 +0000
+++ b/MySql.Data/Provider/Source/NativeDriver.cs	2009-10-09 21:44:54 +0000
@@ -26,6 +26,7 @@
 using MySql.Data.Types;
 using System.Security.Cryptography.X509Certificates;
 using MySql.Data.MySqlClient.Properties;
+using System.Text;
 #if !CF
 using System.Net.Security;
 using System.Security.Authentication;

=== modified file 'MySql.Data/Provider/Source/PerformanceMonitor.cs'
--- a/MySql.Data/Provider/Source/PerformanceMonitor.cs	2009-10-09 20:38:36 +0000
+++ b/MySql.Data/Provider/Source/PerformanceMonitor.cs	2009-10-09 21:44:54 +0000
@@ -47,7 +47,7 @@
                 }
                 catch (Exception ex)
                 {
-                    connection.LogEvent(TraceEventType.Error, ex.Message);
+                    MySqlTrace.LogError(ex.Message);
                 }
             }
         }

=== modified file 'MySql.Data/Provider/Source/ProcedureCache.cs'
--- a/MySql.Data/Provider/Source/ProcedureCache.cs	2009-10-09 20:38:36 +0000
+++ b/MySql.Data/Provider/Source/ProcedureCache.cs	2009-10-09 21:44:54 +0000
@@ -55,7 +55,7 @@
 #if !CF
                 conn.PerfMonitor.AddHardProcedureQuery();
 #endif
-                conn.LogEvent(TraceEventType.Information, 
+                MySqlTrace.LogInformation(
                     String.Format(Resources.HardProcQuery, spName));
             }
             else
@@ -63,7 +63,7 @@
 #if !CF
                 conn.PerfMonitor.AddSoftProcedureQuery();
 #endif
-                conn.LogEvent(TraceEventType.Information,
+                MySqlTrace.LogInformation(
                     String.Format(Resources.SoftProcQuery, spName));
             }
             return ds;

=== added file 'MySql.Data/Provider/Source/TracingDriver.cs'
--- a/MySql.Data/Provider/Source/TracingDriver.cs	1970-01-01 00:00:00 +0000
+++ b/MySql.Data/Provider/Source/TracingDriver.cs	2009-10-09 21:44:54 +0000
@@ -0,0 +1,113 @@
+// Copyright (c) 2009 Sun Microsystems, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation
+//
+// There are special exceptions to the terms and conditions of the GPL 
+// as it is applied to this software. View the full text of the 
+// exception in file EXCEPTIONS in the directory of this software 
+// distribution.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+using System;
+using System.Text;
+using MySql.Data.Types;
+using System.Diagnostics;
+using System.Collections.Generic;
+
+namespace MySql.Data.MySqlClient
+{
+    internal class TracingDriver : Driver
+    {
+        private Stopwatch timer = new Stopwatch();
+        private bool firstResult;
+        private MySqlTraceQueryInfo qi;
+        private ResultSet lastResult;
+
+        public TracingDriver(MySqlConnectionStringBuilder settings)
+            : base(settings)
+        {
+        }
+
+        public override void SendQuery(MySqlPacket p)
+        {
+            qi = new MySqlTraceQueryInfo();
+            qi.Server = Settings.Server;
+            //TODO see if output buffering removes this ickyness
+            string cmdText = Encoding.GetString(p.Buffer, 5, p.Length - 5);
+            if (cmdText.Length > 300)
+                cmdText = cmdText.Substring(0, 300);
+            qi.CommandText = cmdText;
+            qi.TimeOfQuery = DateTime.Now;
+            base.SendQuery(p);
+            firstResult = true;
+            timer.Reset();
+            timer.Start();
+        }
+
+        protected override int GetResult(ref int affectedRows, ref int insertedId)
+        {
+            int fieldCount = base.GetResult(ref affectedRows, ref insertedId);
+            if (firstResult)
+            {
+                timer.Stop();
+                qi.ExecutionTime = timer.Elapsed;
+            }
+            return fieldCount;
+        }
+
+        public override ResultSet NextResult(int statementId)
+        {
+            if (lastResult != null)
+            {
+                MySqlTraceResultInfo ri = new MySqlTraceResultInfo();
+                ri.InsertedId = lastResult.InsertedId;
+                ri.RowsRead = lastResult.TotalRows;
+                ri.RowsSkipped = lastResult.SkippedRows;
+                ri.RowsChanged = lastResult.AffectedRows;
+                if (HasStatus(ServerStatusFlags.NoIndex))
+                    ri.UAFlags |= UsageAdvisorFlags.NoIndex;
+                if (HasStatus(ServerStatusFlags.BadIndex))
+                    ri.UAFlags |= UsageAdvisorFlags.BadIndex;
+                if (!AllFieldsAccessed(lastResult))
+                {
+                    ri.UAFlags |= UsageAdvisorFlags.PartialRowSet;
+                    for (int i = 0; i < lastResult.Size; i++)
+                        if (!lastResult.FieldRead(i))
+                            ri.FieldsNotAccessed.Add(lastResult.Fields[i].ColumnName);
+                }
+                qi.Results.Add(ri);
+            }
+
+            lastResult = base.NextResult(statementId);
+            firstResult = false;
+            if (lastResult == null)
+            {
+                MySqlTrace.LogInformation(qi.ToString());
+            }
+            return lastResult;
+        }
+
+        public void ReportTypeConversion(string fieldName, MySqlDbType originalType, Type newType)
+        {
+        }
+
+        private bool AllFieldsAccessed(ResultSet rs)
+        {
+            if (rs.Fields == null || rs.Fields.Length == 0) return true;
+
+            for (int i = 0; i < rs.Fields.Length; i++)
+                if (!rs.FieldRead(i)) return false;
+            return true;
+        }
+    }
+}

=== modified file 'MySql.Data/Provider/Source/command.cs'
--- a/MySql.Data/Provider/Source/command.cs	2009-10-09 20:38:36 +0000
+++ b/MySql.Data/Provider/Source/command.cs	2009-10-09 21:44:54 +0000
@@ -146,7 +146,7 @@
 				int timeout = Math.Min(value, Int32.MaxValue / 1000);
 				if (timeout != value)
 				{
-					connection.LogEvent(TraceEventType.Warning, 
+					MySqlTrace.LogWarning(
                     "Command timeout value too large ("
 					+ value + " seconds). Changed to max. possible value (" 
 					+ timeout + " seconds)");

=== removed file 'MySql.Data/Provider/Source/common/Utilities.cs'
--- a/MySql.Data/Provider/Source/common/Utilities.cs	2009-10-06 15:56:15 +0000
+++ b/MySql.Data/Provider/Source/common/Utilities.cs	1970-01-01 00:00:00 +0000
@@ -1,49 +0,0 @@
-// Copyright (c) 2009 Sun Microsystems, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2 as published by
-// the Free Software Foundation
-//
-// There are special exceptions to the terms and conditions of the GPL 
-// as it is applied to this software. View the full text of the 
-// exception in file EXCEPTIONS in the directory of this software 
-// distribution.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-
-using System;
-
-namespace MySql.Data.MySqlClient
-{
-    internal class Utilities
-    {
-        public static bool EnumTryParse(Type enumType, string value, out object result)
-        {
-            if (Enum.IsDefined(enumType, value))
-            {
-                result = Enum.Parse(enumType, value, true);
-                return true;
-            }
-            else
-            {
-                foreach (string enumValue in Enum.GetNames(enumType))
-                {
-                    if (enumValue.Equals(value, StringComparison.OrdinalIgnoreCase))
-                    {
-                        result = Enum.Parse(enumType, enumValue);
-                        return true;
-                    }
-                }
-                result = null;
-                return false;
-            }
-        }
-    }
-}

=== modified file 'MySql.Data/Provider/Source/datareader.cs'
--- a/MySql.Data/Provider/Source/datareader.cs	2009-10-09 20:38:36 +0000
+++ b/MySql.Data/Provider/Source/datareader.cs	2009-10-09 21:44:54 +0000
@@ -302,9 +302,11 @@
 
         private object ChangeType(IMySqlValue value, int fieldIndex, Type newType)
         {
+#if !CF
             if (connection.Settings.UseUsageAdvisor)
                 (driver as TracingDriver).ReportTypeConversion(GetName(fieldIndex), value.MySqlDbType, newType);
-            return Convert.ChangeType(value.Value, newType);
+#endif
+            return Convert.ChangeType(value.Value, newType, CultureInfo.InvariantCulture);
         }
 
 		/// <summary>

=== modified file 'MySql.Data/Tests/Source/ParameterTests.cs'
--- a/MySql.Data/Tests/Source/ParameterTests.cs	2009-10-09 20:38:36 +0000
+++ b/MySql.Data/Tests/Source/ParameterTests.cs	2009-10-09 21:44:54 +0000
@@ -174,8 +174,9 @@
 		[Test]
 		public void UseOldSyntaxGivesWarning() 
 		{
+            Trace.Listeners.Clear();
             GenericListener listener = new GenericListener();
-            MySqlTrace.Listeners.Add(listener);
+            Trace.Listeners.Add(listener);
 
             string connStr = conn.ConnectionString + ";old syntax=yes;pooling=false";
 			MySqlConnection conn2 = new MySqlConnection(connStr);

=== modified file 'MySql.Data/Tests/Source/UsageAdvisor.cs'
--- a/MySql.Data/Tests/Source/UsageAdvisor.cs	2009-10-09 20:38:36 +0000
+++ b/MySql.Data/Tests/Source/UsageAdvisor.cs	2009-10-09 21:44:54 +0000
@@ -46,8 +46,9 @@
             execSQL("INSERT INTO Test VALUES (3, 'Test3')");
             execSQL("INSERT INTO Test VALUES (4, 'Test4')");
 
+            Trace.Listeners.Clear();
             GenericListener listener = new GenericListener();
-            MySqlTrace.Listeners.Add(listener);
+            Trace.Listeners.Add(listener);
 
             string sql = "SELECT * FROM Test; SELECT * FROM Test WHERE id > 2";
             MySqlCommand cmd = new MySqlCommand(sql, conn);
@@ -79,8 +80,9 @@
             execSQL("INSERT INTO Test VALUES (3, 'Test3')");
             execSQL("INSERT INTO Test VALUES (4, 'Test4')");
 
+            Trace.Listeners.Clear();
             GenericListener listener = new GenericListener();
-            MySqlTrace.Listeners.Add(listener);
+            Trace.Listeners.Add(listener);
 
             MySqlCommand cmd = new MySqlCommand("SELECT * FROM Test; SELECT * FROM Test WHERE id > 2", conn);
             using (MySqlDataReader reader = cmd.ExecuteReader())

Attachment: [text/bzr-bundle] bzr/reggie.burnett@sun.com-20091009214454-8r6r6gw4cxup1891.bundle
Thread
bzr push into connector-net-trunk branch (reggie.burnett:780 to 781)Reggie Burnett9 Oct