List:Commits« Previous MessageNext Message »
From:Reggie Burnett Date:December 14 2010 11:05pm
Subject:bzr commit into connector-net-trunk branch (reggie.burnett:951)
View as plain text  
#At file:///C:/Documents%20and%20Settings/Reggie/work/connector-net/trunk/ based on revid:reggie.burnett@stripped

  951 Reggie Burnett	2010-12-14 [merge]
      merged

    modified:
      MySql.Data/Provider/Source/common/MySqlTokenizer.cs
      MySql.Data/Provider/Source/dataadapter.cs
      MySql.Data/Tests/Source/DataAdapterTests.cs
      MySql.Web/Providers/Source/MembershipProvider.cs
=== modified file 'MySql.Data/Provider/Source/common/MySqlTokenizer.cs'
=== modified file 'MySql.Data/Provider/Source/common/MySqlTokenizer.cs'
--- a/MySql.Data/Provider/Source/common/MySqlTokenizer.cs	2010-08-18 19:52:04 +0000
+++ b/MySql.Data/Provider/Source/common/MySqlTokenizer.cs	2010-12-14 23:04:55 +0000
@@ -162,7 +162,6 @@
             while (FindToken())
             {
                 if ((stopIndex - startIndex) < 2) continue;
-                string token = sql.Substring(startIndex, stopIndex - startIndex).Trim();
                 char c1 = sql[startIndex];
                 char c2 = sql[startIndex+1];
                 if (c1 == '?' ||

=== modified file 'MySql.Data/Provider/Source/dataadapter.cs'
--- a/MySql.Data/Provider/Source/dataadapter.cs	2010-10-07 21:26:37 +0000
+++ b/MySql.Data/Provider/Source/dataadapter.cs	2010-12-14 23:04:23 +0000
@@ -181,19 +181,6 @@
 
                 int ret = base.Update(dataRows, tableMapping);
 
-                // Following was a workaround for Bug#54863
-                // It  a good question whether we still needed it, it seems like
-                // .NET bug (DbDataAdapter not issuing AcceptChanges() for 
-                // modified rows) has already been fixed in .NET
-                foreach (DataRow row in dataRows)
-                {
-                    if (row.RowState != DataRowState.Unchanged &&
-                        row.RowState != DataRowState.Detached)
-                    {
-                        row.AcceptChanges();
-                    }
-                }
-
                 return ret;
             }
             finally 

=== modified file 'MySql.Data/Tests/Source/DataAdapterTests.cs'
--- a/MySql.Data/Tests/Source/DataAdapterTests.cs	2010-08-18 19:48:34 +0000
+++ b/MySql.Data/Tests/Source/DataAdapterTests.cs	2010-12-14 23:04:23 +0000
@@ -860,18 +860,11 @@
                 "field varchar(50) DEFAULT NULL," +
                 "PRIMARY KEY (id_auto))");
 
-            execSQL("CREATE  PROCEDURE sp_insert(" +
-                    " in p_field varchar(50)) " +
-                    " BEGIN " +
-                    " INSERT INTO T(field) VALUES(p_field);" +
-                    " SELECT * FROM T WHERE id_auto=@@IDENTITY;" +
-                    " END");
-
             MySqlDataAdapter da = new MySqlDataAdapter("SELECT * FROM T", conn);
             da.InsertCommand = conn.CreateCommand();
-            da.InsertCommand.CommandText = "sp_insert";
-            da.InsertCommand.CommandType = CommandType.StoredProcedure;
-            da.InsertCommand.Parameters.Add("p_field", MySqlDbType.VarChar, 50, "field");
+            da.InsertCommand.CommandText = @"INSERT INTO T(field) VALUES (@p_field); 
+                                            SELECT * FROM T WHERE id_auto=@@IDENTITY"; 
+            da.InsertCommand.Parameters.Add("@p_field", MySqlDbType.VarChar, 50, "field");
             da.InsertCommand.UpdatedRowSource = UpdateRowSource.FirstReturnedRecord;
 
             da.DeleteCommand = conn.CreateCommand();
@@ -887,6 +880,8 @@
             table.Rows.Add(r);
             da.Update(table);
 
+            Assert.AreEqual(r.RowState, DataRowState.Unchanged);
+
             table.Rows[0].Delete();
 
             r = table.NewRow();

=== modified file 'MySql.Web/Providers/Source/MembershipProvider.cs'
--- a/MySql.Web/Providers/Source/MembershipProvider.cs	2010-08-18 19:48:34 +0000
+++ b/MySql.Web/Providers/Source/MembershipProvider.cs	2010-12-14 23:04:23 +0000
@@ -1227,9 +1227,15 @@
         /// </summary>
         /// <param name="bytes"></param>
         /// <returns></returns>
-        private string HashPasswordBytes(byte[] bytes)
+        private string HashPasswordBytes(byte[] key, byte[] bytes)
         {
             HashAlgorithm hash = HashAlgorithm.Create(Membership.HashAlgorithmType);
+
+            if (hash is KeyedHashAlgorithm)
+            {
+                KeyedHashAlgorithm keyedHash = hash as KeyedHashAlgorithm;
+                keyedHash.Key = key;
+            }
             return Convert.ToBase64String(hash.ComputeHash(bytes));
         }
 
@@ -1253,7 +1259,7 @@
                 return Convert.ToBase64String(encryptedBytes);
             }
             else if (format == MembershipPasswordFormat.Hashed)
-                return HashPasswordBytes(keyedBytes);
+                return HashPasswordBytes(keyBytes, keyedBytes);
             else
                 throw new ProviderException(Resources.UnsupportedPasswordFormat);
         }

No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).
Thread
bzr commit into connector-net-trunk branch (reggie.burnett:951) Reggie Burnett15 Dec