List:Commits« Previous MessageNext Message »
From:Reggie Burnett Date:August 25 2009 4:12pm
Subject:bzr commit into connector-net-5.2 branch (reggie.burnett:710) Bug#37865
View as plain text  
#At file:///D:/bzr-connector-net/5.2/ based on revid:reggie.burnett@stripped

  710 Reggie Burnett	2009-08-25
      removing fix for bug #37865.  That was going to cause other problems.  I've decided to go a different way in 6.1

    modified:
      CHANGES
      MySql.Data/Provider/Source/CommandBuilder.cs
      MySql.Data/Provider/Source/command.cs
=== modified file 'CHANGES'
=== modified file 'CHANGES'
--- a/CHANGES	2009-08-24 22:50:31 +0000
+++ b/CHANGES	2009-08-25 16:12:28 +0000
@@ -13,8 +13,6 @@
 - fixed GetSByte method to actually return an sbyte  (bug #46620)
 - changed MySqlStream.Read to throw an exception if the stream end is reached.  This is not ideal
   but we can't change it too much here in 5.2.8.  We'll look at a bigger change in 6.2. (bug #45978)
-- adding a pretty nasty hack to enable output of a refresh select on the end of our insert
-  statements when they are generated by the TableAdapter config wizard (bug #37865)
 
 Version 5.2.7 7/13/09
 - fixed procedure parameters collection so that an exception is thrown if we can't get the 

=== modified file 'MySql.Data/Provider/Source/CommandBuilder.cs'
--- a/MySql.Data/Provider/Source/CommandBuilder.cs	2009-08-24 22:50:31 +0000
+++ b/MySql.Data/Provider/Source/CommandBuilder.cs	2009-08-25 16:12:28 +0000
@@ -241,19 +241,7 @@
 
         protected override DbCommand InitializeCommand(DbCommand command)
         {
-            MySqlCommand cmd = (MySqlCommand)base.InitializeCommand(command);
-            // if command is null then we assume we are auto-generated.  We
-            // are breaking with SqlClient and using FirstReturnedRecord as the
-            // default and then using a nasty hack to add a refresh select to the
-            // end of our insert statement
-            if (command == null)
-            {
-                cmd.UpdatedRowSource = UpdateRowSource.FirstReturnedRecord;
-                if (finalSelect == null)
-                    CreateFinalSelect();
-                cmd.RefreshSelect = finalSelect;
-            }
-            return cmd; 
+            return base.InitializeCommand(command);
         }
 
 

=== modified file 'MySql.Data/Provider/Source/command.cs'
--- a/MySql.Data/Provider/Source/command.cs	2009-08-24 22:50:31 +0000
+++ b/MySql.Data/Provider/Source/command.cs	2009-08-25 16:12:28 +0000
@@ -59,7 +59,6 @@
         List<MySqlCommand> batch;
         private string batchableCommandText;
         internal string parameterHash;
-        internal string RefreshSelect;
 
 		/// <include file='docs/mysqlcommand.xml' path='docs/ctor1/*'/>
 		public MySqlCommand()
@@ -126,12 +125,6 @@
 					cmdText = cmdText.Substring(0, cmdText.Length - 14);
 					cmdText = cmdText + "() VALUES ()";
 				}
-                // this is a nasty hack to work around severe limitations with DbCommandBuilder
-                if (cmdText.StartsWith("INSERT INTO") && RefreshSelect != null)
-                {
-                    cmdText += RefreshSelect;
-                    RefreshSelect = null;
-                }
             }
 		}
 


Attachment: [text/bzr-bundle] bzr/reggie.burnett@sun.com-20090825161228-qm7mzykp5n6tlq8x.bundle
Thread
bzr commit into connector-net-5.2 branch (reggie.burnett:710) Bug#37865Reggie Burnett25 Aug