List:Commits« Previous MessageNext Message »
From:Julio Casal Date:April 27 2011 5:10pm
Subject:bzr commit into connector-net-6.0 branch (julio.casal:866) Bug#12311974
View as plain text  
#At file:///D:/Users/jcasalt/Dev/connector-net/6.0/ based on revid:reggie.burnett@stripped

  866 Julio Casal	2011-04-27
      Modified schema1.sql in MySql.Web project to remove ENGINE declaration on table creation (Oracle bug #12311974).

    modified:
      CHANGES
      MySql.Web/Providers/Properties/schema1.sql
      MySql.Web/Tests/SchemaTests.cs
=== modified file 'CHANGES'
=== modified file 'CHANGES'
--- a/CHANGES	2011-03-03 17:54:43 +0000
+++ b/CHANGES	2011-04-27 17:10:00 +0000
@@ -29,6 +29,7 @@
 - fixed calculation of precision and scale for decimal columns
   (MySQL bug #59989, Oracle bug #11776346)
 - small but important improvements in EF sql generation
+- modified schema1.sql in MySql.Web to remove ENGINE declaration on table creation (Oracle bug #12311974).
 
 Version 6.0.7
 - Fix authorization popup after modifying stored procedure in VS (Bug #44715)

=== modified file 'MySql.Web/Providers/Properties/schema1.sql'
--- a/MySql.Web/Providers/Properties/schema1.sql	2007-12-03 17:38:15 +0000
+++ b/MySql.Web/Providers/Properties/schema1.sql	2011-04-27 17:10:00 +0000
@@ -18,16 +18,16 @@
               FailedPasswordAttemptWindowStart datetime default NULL,
               FailedPasswordAnswerAttemptCount int(10) unsigned default NULL,
               FailedPasswordAnswerAttemptWindowStart datetime default NULL,
-              PRIMARY KEY  (`PKID`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='1';
+              PRIMARY KEY  (`PKID`)) DEFAULT CHARSET=latin1 COMMENT='1';
               
 CREATE TABLE  mysql_UsersInRoles(`Username` varchar(255) NOT NULL,
                 `Rolename` varchar(255) NOT NULL, `ApplicationName` varchar(255) NOT NULL,
                 KEY `Username` (`Username`,`Rolename`,`ApplicationName`)
-                ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+                ) DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
 
 CREATE TABLE mysql_Roles(`Rolename` varchar(255) NOT NULL,
                 `ApplicationName` varchar(255) NOT NULL, 
                 KEY `Rolename` (`Rolename`,`ApplicationName`)
-                ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+                ) DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
                 
                 
\ No newline at end of file

=== modified file 'MySql.Web/Tests/SchemaTests.cs'
--- a/MySql.Web/Tests/SchemaTests.cs	2009-07-28 20:32:52 +0000
+++ b/MySql.Web/Tests/SchemaTests.cs	2011-04-27 17:10:00 +0000
@@ -32,6 +32,7 @@
 using System.IO;
 using System.Configuration.Provider;
 using System.Web.Security;
+using MySql.Web.Common;
 
 namespace MySql.Web.Tests
 {
@@ -337,5 +338,41 @@
             MembershipUser user = provider.CreateUser("boo", "password", "email@stripped", 
                 "question", "answer", true, null, out status);
         }
+
+        [Test]
+        public void SchemaTablesUseSameEngine()
+        {
+            DropAllTables();
+
+            for (int x = 1; x <= SchemaManager.Version; x++)
+                LoadSchema(x);
+
+            string query = string.Format("SELECT TABLE_NAME, ENGINE FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '{0}'", conn.Database);
+            MySqlCommand cmd = new MySqlCommand(query, conn);
+            string lastEngine = null;
+            string currentEngine;
+
+            using (MySqlDataReader reader = cmd.ExecuteReader())
+            {
+                while (reader.Read())
+                {
+                    currentEngine = reader.GetString("ENGINE");
+
+                    if (string.IsNullOrEmpty(lastEngine))
+                    {
+                        lastEngine = currentEngine;
+                    }
+
+                    Assert.AreEqual(lastEngine, currentEngine);
+                }
+            }
+        }
+
+        private void DropAllTables()
+        {
+            DataTable dt = conn.GetSchema("Tables");
+            foreach (DataRow row in dt.Rows)
+                execSQL(String.Format("DROP TABLE IF EXISTS {0}", row["TABLE_NAME"]));
+        }
     }
 }


Attachment: [text/bzr-bundle] bzr/julio.casal@oracle.com-20110427171000-jwcyhtpz4ed3dsm6.bundle
Thread
bzr commit into connector-net-6.0 branch (julio.casal:866) Bug#12311974Julio Casal27 Apr
  • Re: bzr commit into connector-net-6.0 branch (julio.casal:866) Bug#12311974Reggie Burnett27 Apr