Modified:
trunk/CHANGES
trunk/MySql.Web/Providers/Source/SchemaManager.cs
trunk/MySql.Web/Tests/SchemaTests.cs
Log:
- fixed web providers autogenerateschema option where it would fail if no schema is
present at all (bug #39072)
Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES 2008-08-28 20:21:34 UTC (rev 1394)
+++ trunk/CHANGES 2008-08-29 17:06:52 UTC (rev 1395)
@@ -9,6 +9,8 @@
types and is approx. 40% faster.
- fixed membership provider so that calling GetPassword with an incorrect password will
throw the appropriate exception (bug #38939)
+- fixed web providers autogenerateschema option where it would fail if no schema is
+ present at all (bug #39072)
Version 5.2.3 - 8/14/08
Modified: trunk/MySql.Web/Providers/Source/SchemaManager.cs
===================================================================
--- trunk/MySql.Web/Providers/Source/SchemaManager.cs 2008-08-28 20:21:34 UTC (rev 1394)
+++ trunk/MySql.Web/Providers/Source/SchemaManager.cs 2008-08-29 17:06:52 UTC (rev 1395)
@@ -114,7 +114,7 @@
if (dt.Rows.Count == 1)
return Convert.ToInt32(dt.Rows[0]["TABLE_COMMENT"]);
}
- throw new ProviderException(Resources.MissingOrWrongSchema);
+ return 0;
}
}
Modified: trunk/MySql.Web/Tests/SchemaTests.cs
===================================================================
--- trunk/MySql.Web/Tests/SchemaTests.cs 2008-08-28 20:21:34 UTC (rev 1394)
+++ trunk/MySql.Web/Tests/SchemaTests.cs 2008-08-29 17:06:52 UTC (rev 1395)
@@ -31,6 +31,7 @@
using System;
using System.IO;
using System.Configuration.Provider;
+using System.Web.Security;
namespace MySql.Web.Tests
{
@@ -316,5 +317,25 @@
Assert.AreEqual(4, dt.Rows[3]["userid"]);
Assert.AreEqual(4, dt.Rows[3]["roleid"]);
}
+
+ /// <summary>
+ /// Bug #39072 Web provider does not work
+ /// </summary>
+ [Test]
+ public void AutoGenerateSchema()
+ {
+ MySQLMembershipProvider provider = new MySQLMembershipProvider();
+ NameValueCollection config = new NameValueCollection();
+ config.Add("connectionStringName", "LocalMySqlServer");
+ config.Add("autogenerateschema", "true");
+ config.Add("applicationName", "/");
+ config.Add("passwordFormat", "Clear");
+
+ provider.Initialize(null, config);
+
+ MembershipCreateStatus status;
+ MembershipUser user = provider.CreateUser("boo", "password", "email@stripped",
+ "question", "answer", true, null, out status);
+ }
}
}
| Thread |
|---|
| • Connector/NET commit: r1395 - in trunk: . MySql.Web/Providers/Source MySql.Web/Tests | rburnett | 29 Aug |