MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:July 19 2010 7:35pm
Subject:bzr commit into connector-net-6.0 branch (vvaintroub:825) Bug#53174
View as plain text  
#At file:///H:/connector_net/6.0/ based on revid:vvaintroub@stripped

  825 Vladislav Vaintroub	2010-07-19
      Bug #53174 Membership schema creation fails if default schema collation differs from Latin1 .
      
      UPDATE statements in schema3.sql cannot be executed, because collations are different in 
      "where a.name=m.ApplicationName" clause. The reason is that my_aspnet_Membership, 
      my_aspnet_Roles and my_aspnet_UsersInRoles have LATIN1 charset while  my_aspnet_Applications has the default charset.
      
      The fix is to convert membership table my_aspnet_Membership, my_aspnet_Roles and my_aspnet_UsersInRole to default charset prior to UPDATE.
      
      Note, that shema4.sql executed directly after schema3.sql does the same charset conversion, and
      it is fine to execute  conversion twice (in this case second conversion will be a logical no-op)

    modified:
      CHANGES
      MySql.Web/Providers/Properties/schema3.sql
=== modified file 'CHANGES'
--- a/CHANGES	2010-07-12 14:38:02 +0000
+++ b/CHANGES	2010-07-19 19:35:55 +0000
@@ -1,3 +1,4 @@
+- Fix membership provider creation failure, when default database character set is different from latin1 (Bug #53174)
 - Fix "Connection must be valid and open" exception When UpdateBatchSize > 1 
   and MySqlDataAdapter is not using an open connection (Bug #38411)
 - Make sure MySqlDataAdapter.Update() works for custom stored procedure driven update commands 

=== modified file 'MySql.Web/Providers/Properties/schema3.sql'
--- a/MySql.Web/Providers/Properties/schema3.sql	2009-07-28 20:00:05 +0000
+++ b/MySql.Web/Providers/Properties/schema3.sql	2010-07-19 19:35:55 +0000
@@ -35,6 +35,10 @@ alter table mysql_UsersInRoles
           add column roleId INT AFTER userId,
           add column applicationId INT AFTER roleId;
 
+ALTER TABLE my_aspnet_Membership CONVERT TO CHARACTER SET DEFAULT;
+ALTER TABLE my_aspnet_Roles CONVERT TO CHARACTER SET DEFAULT;
+ALTER TABLE my_aspnet_UsersInRoles CONVERT TO CHARACTER SET DEFAULT;
+
 /* these next lines set the application Id on our tables appropriately */          
 update my_aspnet_Membership m, my_aspnet_Applications a set m.applicationId = a.id where a.name=m.ApplicationName;
 update my_aspnet_Roles r, my_aspnet_Applications a set r.applicationId = a.id where a.name=r.ApplicationName;


Attachment: [text/bzr-bundle] bzr/vvaintroub@mysql.com-20100719193555-v5j8tam0vxakgirm.bundle
Thread
bzr commit into connector-net-6.0 branch (vvaintroub:825) Bug#53174Vladislav Vaintroub19 Jul