List:Commits« Previous MessageNext Message »
From:Julio Casal Date:May 10 2011 11:36pm
Subject:bzr commit into connector-net-6.1 branch (julio.casal:886)
View as plain text  
#At file:///D:/Users/jcasalt/Dev/connector-net/6.1/ based on revid:julio.casal@strippedog0qyfv

  886 Julio Casal	2011-05-10 [merge]
      Merged

    removed:
      MySql.Data.Entity/Provider/Properties/SchemaDefinition-6.0.ssdl
      MySql.Data/Tests/Source/ConfigurationManager.cs
      MySql.Data/Tests/Source/Tester/
      MySql.Data/Tests/Source/Tester/TestClasses.cs
      MySql.Data/Tests/Source/Tester/TestRunner.cs
    added:
      MySql.Data.Entity/Provider/Properties/SchemaDefinition-5.5.ssdl
    modified:
      CHANGES
      MySql.Data.Entity/Provider/MySql.Data.Entity.csproj
      MySql.Data.Entity/Provider/Properties/AssemblyInfo.cs
      MySql.Data.Entity/Provider/ProviderServices.cs
      MySql.Data.Entity/Tests/Properties/AssemblyInfo.cs
      MySql.Data.Entity/Tests/Wizard.cs
      MySql.Data/Tests/MySql.Data.CF.Tests.csproj
      MySql.Data/Tests/Source/BaseTest.cs
      MySql.Data/Tests/Source/ConnectionStringBuilder.cs
      MySql.Data/Tests/Source/Transactions.cs
      MySql.Web/Providers/Source/SchemaManager.cs
      MySql.Web/Tests/SchemaTests.cs
=== modified file 'CHANGES'
=== modified file 'CHANGES'
--- a/CHANGES	2011-05-10 23:12:53 +0000
+++ b/CHANGES	2011-05-10 23:36:53 +0000
@@ -33,6 +33,10 @@
 - added batching support for updates and deletes (bug #59616)
 - Introduced workaround to unexpected query aborts (server 5.1+) when executing a datareader after a command.Cancel() (MySQL bug#60541).
 - modified schema1.sql in MySql.Web to remove ENGINE declaration on table creation (Oracle bug #12311974).
+- Introduced more detailed exceptions for invalid connection strings errors (MySQL bug#44654, MySQL bug#53076).
+- Introduced the real NUnit framework to the CF test suite and fixed issues on BaseTest to properly run with CF libraries. 
+- Modified MySql.Data.Entity.ProviderServices to use the correct schema definition file when server is 5.5 or greater (Oracle bug #12407444).
+- Introduced a new unit test to ensure a commit will not timeout after a heavly load of inserts (MySQL bug #58004).
 - fixed ISSchemaProvider to use the information schema to retrieve parameter metadata when running 
   against server 5.5.3 or greater (MySQL bug #48007, Oracle bug #12539685).
 

=== modified file 'MySql.Data.Entity/Provider/MySql.Data.Entity.csproj'
--- a/MySql.Data.Entity/Provider/MySql.Data.Entity.csproj	2010-04-27 16:42:59 +0000
+++ b/MySql.Data.Entity/Provider/MySql.Data.Entity.csproj	2011-05-10 23:36:53 +0000
@@ -86,7 +86,7 @@
     <Compile Include="Statements\UpdateStatement.cs" />
     <EmbeddedResource Include="Properties\ProviderManifest.xml" />
     <EmbeddedResource Include="Properties\SchemaDefinition-5.0.ssdl" />
-    <EmbeddedResource Include="Properties\SchemaDefinition-6.0.ssdl" />
+    <EmbeddedResource Include="Properties\SchemaDefinition-5.5.ssdl" />
     <EmbeddedResource Include="Properties\SchemaDefinition-5.1.ssdl" />
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>

=== modified file 'MySql.Data.Entity/Provider/Properties/AssemblyInfo.cs'
--- a/MySql.Data.Entity/Provider/Properties/AssemblyInfo.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Data.Entity/Provider/Properties/AssemblyInfo.cs	2011-05-10 23:36:53 +0000
@@ -45,3 +45,4 @@
 [assembly: Guid("540e7b3c-bd0b-4980-96d1-5d140d303f7e")]
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyName("ConnectorNet")]
+[assembly: InternalsVisibleTo("MySql.Data.Entity.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d973bda91f71752c78294126974a41a08643168271f65fc0fb3cd45f658da01fbca75ac74067d18e7afbf1467d7a519ce0248b13719717281bb4ddd4ecd71a580dfe0912dfc3690b1d24c7e1975bf7eed90e4ab14e10501eedf763bff8ac204f955c9c15c2cf4ebf6563d8320b6ea8d1ea3807623141f4b81ae30a6c886b3ee1")]
\ No newline at end of file

=== added file 'MySql.Data.Entity/Provider/Properties/SchemaDefinition-5.5.ssdl'
--- a/MySql.Data.Entity/Provider/Properties/SchemaDefinition-5.5.ssdl	1970-01-01 00:00:00 +0000
+++ b/MySql.Data.Entity/Provider/Properties/SchemaDefinition-5.5.ssdl	2011-05-10 22:59:34 +0000
@@ -0,0 +1,775 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Schema Namespace="MySqlClient" 
+        Provider="MySql.Data.MySqlClient"
+        ProviderManifestToken="5"
+        Alias="Self" 
+        xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl">
+  <EntityContainer Name="Schema">
+    
+    <EntitySet Name="STables" EntityType="Self.Table">
+      <DefiningQuery>
+		  SELECT /* Tables */
+		  CONCAT(TABLE_SCHEMA, '.', TABLE_NAME) AS `Id`,
+		  TABLE_CATALOG AS `Catalog`,
+		  TABLE_SCHEMA  AS `Schema`,
+		  TABLE_NAME    AS `Name`
+		  FROM INFORMATION_SCHEMA.TABLES
+		  WHERE TABLE_TYPE = 'BASE TABLE'
+      AND TABLE_SCHEMA=schema()
+	  </DefiningQuery>
+    </EntitySet>
+    
+    <EntitySet Name="STableColumns" EntityType="Self.TableColumn">
+      <DefiningQuery>
+        SELECT /* Table columns */
+        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME, '.', COLUMN_NAME) AS `Id`,
+        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME) AS `ParentId`,
+        COLUMN_NAME AS `Name`,
+        ORDINAL_POSITION AS `Ordinal`,
+        CASE IS_NULLABLE WHEN 'YES' THEN 1 ELSE 0 END AS `IsNullable`,
+        IF(LEFT(COLUMN_TYPE,10) = 'tinyint(1)', 'bool',
+          IF (LEFT(COLUMN_TYPE,10) = 'binary(16)', 'guid',
+            IF (INSTR(COLUMN_TYPE, 'unsigned') = 0, DATA_TYPE,
+              CONCAT('u', DATA_TYPE)))) AS `TypeName`,
+        IF (CHARACTER_MAXIMUM_LENGTH > 2147483647, 2147483647, CHARACTER_MAXIMUM_LENGTH) AS `MaxLength`,
+        NUMERIC_PRECISION AS `Precision`,
+        0 AS `DateTimePrecision`,
+        NUMERIC_SCALE AS `Scale`,
+        NULL AS `CollationCatalog`,
+        NULL AS `CollationSchema`,
+        COLLATION_NAME AS `CollationName`,
+        NULL AS `CharacterSetCatalog`,
+        NULL AS `CharacterSetSchema`,
+        CHARACTER_SET_NAME AS `CharacterSetName`,
+        0 AS `IsMultiSet`,
+        CASE WHEN EXTRA LIKE '%auto%' THEN 1 ELSE 0 END AS `IsIdentity`,
+        CASE WHEN EXTRA LIKE '%auto%' THEN 1 ELSE 0 END AS `IsStoreGenerated`,
+        COLUMN_DEFAULT AS `Default`
+        FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=schema()
+      </DefiningQuery>
+    </EntitySet>
+
+    <EntitySet Name="SViews" EntityType="Self.View">
+      <DefiningQuery>
+        SELECT /* Views */
+        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME) AS `Id`,
+        TABLE_CATALOG AS`CatalogName`,
+        TABLE_SCHEMA AS `SchemaName`,
+        TABLE_NAME AS `Name`,
+        VIEW_DEFINITION AS `ViewDefinition`,
+        CASE IS_UPDATABLE WHEN 'YES' THEN 1 ELSE 0 END AS `IsUpdatable`
+        FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_SCHEMA=schema()
+      </DefiningQuery>
+    </EntitySet>
+
+    <EntitySet Name="SViewColumns" EntityType="Self.ViewColumn">
+      <DefiningQuery>
+        SELECT /* View columns */
+        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME, '.', COLUMN_NAME) AS `Id`,
+        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME) AS `ParentId`,
+        COLUMN_NAME AS `Name`,
+        ORDINAL_POSITION AS `Ordinal`,
+        CASE IS_NULLABLE WHEN 'YES' THEN 1 ELSE 0 END AS `IsNullable`,
+        IF(LEFT(COLUMN_TYPE,10) = 'tinyint(1)', 'bool',
+          IF (LEFT(COLUMN_TYPE,10) = 'binary(16)', 'guid',
+            IF (INSTR(COLUMN_TYPE, 'unsigned') = 0, DATA_TYPE,
+              CONCAT('u', DATA_TYPE)))) AS `TypeName`,
+        IF (CHARACTER_MAXIMUM_LENGTH > 2147483647, 2147483647, CHARACTER_MAXIMUM_LENGTH) AS `MaxLength`,
+        NUMERIC_PRECISION AS `Precision`,
+        0 AS `DateTimePrecision`,
+        NUMERIC_SCALE AS `Scale`,
+        NULL AS `CollationCatalog`,
+        NULL AS `CollationSchema`,
+        COLLATION_NAME AS `CollationName`,
+        NULL AS `CharacterSetCatalog`,
+        NULL AS `CharacterSetSchema`,
+        CHARACTER_SET_NAME AS `CharacterSetName`,
+        0 AS `IsMultiSet`,
+        CASE WHEN EXTRA LIKE '%auto%' THEN 1 ELSE 0 END AS `IsIdentity`,
+        CASE WHEN EXTRA LIKE '%auto%' THEN 1 ELSE 0 END AS `IsStoreGenerated`,
+        COLUMN_DEFAULT AS `Default`
+        FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=schema()
+      </DefiningQuery>
+    </EntitySet>
+
+    <EntitySet Name="SFunctions" EntityType="Self.Function">
+      <DefiningQuery>
+        SELECT /* Functions */
+        CONCAT(ROUTINE_SCHEMA, '.', SPECIFIC_NAME) AS `Id`,
+        ROUTINE_CATALOG AS `CatalogName`,
+        ROUTINE_SCHEMA AS `SchemaName`,
+        ROUTINE_NAME AS `Name`,
+        SUBSTRING_INDEX(DTD_IDENTIFIER, '(', 1) AS `ReturnTypeName`,
+        NULL AS `ReturnMaxLength`,
+        NULL AS `ReturnPrecision`,
+        0 AS `ReturnDateTimePrecision`,
+        NULL AS `ReturnScale`,
+        NULL AS `ReturnCollationCatalog`,
+        NULL AS `ReturnCollationSchema`,
+        NULL AS `ReturnCollationName`,
+        NULL AS `ReturnCharacterSetCatalog`,
+        NULL AS `ReturnCharacterSetSchema`,
+        NULL AS `ReturnCharacterSetName`,
+        NULL AS `ReturnIsMultiSet`,
+        NULL AS `IsAggregate`,
+        NULL AS `IsBuiltIn`,
+        NULL AS `IsNiladic`
+        FROM INFORMATION_SCHEMA.ROUTINES
+        WHERE ROUTINE_TYPE='FUNCTION'
+        AND ROUTINE_SCHEMA=schema()
+      </DefiningQuery>
+    </EntitySet>
+
+    <EntitySet Name="SProcedures" EntityType="Self.Procedure">
+      <DefiningQuery>
+        SELECT /* Procedures */
+        CONCAT(ROUTINE_SCHEMA, '.', SPECIFIC_NAME) AS `Id`,
+        ROUTINE_CATALOG AS `CatalogName`,
+        ROUTINE_SCHEMA AS `SchemaName`,
+        ROUTINE_NAME AS `Name`
+        FROM INFORMATION_SCHEMA.ROUTINES
+        WHERE ROUTINE_TYPE='PROCEDURE'
+        AND ROUTINE_SCHEMA=schema()
+      </DefiningQuery>
+    </EntitySet>
+
+    <EntitySet Name="SFunctionParameters" EntityType="Self.Parameter">
+      <DefiningQuery>
+        SELECT
+        CONCAT(f.SPECIFIC_SCHEMA, '.', f.SPECIFIC_NAME, '.', f.PARAMETER_NAME) AS `Id`,
+        CONCAT(f.SPECIFIC_SCHEMA, '.', f.SPECIFIC_NAME) AS `ParentId`,
+        f.PARAMETER_NAME AS `Name`,
+        f.ORDINAL_POSITION `Ordinal`,
+        f.DATA_TYPE AS `TypeName`,
+        f.CHARACTER_MAXIMUM_LENGTH AS `MaxLength`,
+        f.NUMERIC_PRECISION AS`Precision`,
+        NULL AS `DateTimePrecision`,
+        f.NUMERIC_SCALE AS `Scale`,
+        NULL AS `CollationCatalog`,
+        NULL AS `CollationSchema`,
+        f.COLLATION_NAME AS `CollationName`,
+        NULL AS `CharacterSetCatalog`,
+        NULL AS `CharacterSetSchema`,
+        f.CHARACTER_SET_NAME AS `CharacterSetName`,
+        CAST(0 as decimal(0,0)) AS `IsMultiSet`,
+        f.PARAMETER_MODE AS `Mode`,
+        NULL AS `Default`
+        FROM
+        INFORMATION_SCHEMA.PARAMETERS f
+        INNER JOIN INFORMATION_SCHEMA.ROUTINES r ON
+        f.SPECIFIC_SCHEMA = r.ROUTINE_SCHEMA AND
+        f.SPECIFIC_NAME = r.SPECIFIC_NAME AND
+        r.ROUTINE_TYPE = 'FUNCTION'
+        WHERE
+        r.ROUTINE_SCHEMA=schema() AND f.ORDINAL_POSITION > 0
+      </DefiningQuery>
+    </EntitySet>
+
+    <EntitySet Name="SProcedureParameters" EntityType="Self.Parameter">
+      <DefiningQuery>
+        SELECT
+        CONCAT(f.SPECIFIC_SCHEMA, '.', f.SPECIFIC_NAME, '.', f.PARAMETER_NAME) AS `Id`,
+        CONCAT(f.SPECIFIC_SCHEMA, '.', f.SPECIFIC_NAME) AS `ParentId`,
+        f.PARAMETER_NAME AS `Name`,
+        f.ORDINAL_POSITION `Ordinal`,
+        f.DATA_TYPE AS `TypeName`,
+        f.CHARACTER_MAXIMUM_LENGTH AS `MaxLength`,
+        f.NUMERIC_PRECISION AS`Precision`,
+        NULL AS `DateTimePrecision`,
+        f.NUMERIC_SCALE AS `Scale`,
+        NULL AS `CollationCatalog`,
+        NULL AS `CollationSchema`,
+        f.COLLATION_NAME AS `CollationName`,
+        NULL AS `CharacterSetCatalog`,
+        NULL AS `CharacterSetSchema`,
+        f.CHARACTER_SET_NAME AS `CharacterSetName`,
+        CAST(0 as decimal(0,0)) AS `IsMultiSet`,
+        f.PARAMETER_MODE AS `Mode`,
+        NULL AS `Default`
+        FROM
+        INFORMATION_SCHEMA.PARAMETERS f
+        INNER JOIN INFORMATION_SCHEMA.ROUTINES r ON
+        f.SPECIFIC_SCHEMA = r.ROUTINE_SCHEMA AND
+        f.SPECIFIC_NAME = r.SPECIFIC_NAME AND
+        r.ROUTINE_TYPE = 'PROCEDURE'
+        WHERE
+        r.ROUTINE_SCHEMA=schema() AND f.ORDINAL_POSITION > 0
+      </DefiningQuery>
+    </EntitySet>
+
+    <EntitySet Name="SConstraints" EntityType="Self.Constraint">
+      <DefiningQuery>
+        SELECT  /* Constraints */
+        CONCAT(CONSTRAINT_SCHEMA, '.', TABLE_NAME, '.', CONSTRAINT_NAME) AS `Id`,
+        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME) AS `ParentId`,
+        CONSTRAINT_NAME AS `Name`,
+        CONSTRAINT_TYPE AS `ConstraintType`,
+        0 AS `IsDeferrable`,
+        0 AS `IsInitiallyDeferred`
+        FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS
+        WHERE CONSTRAINT_TYPE != 'CHECK' AND TABLE_SCHEMA=schema()
+      </DefiningQuery>
+    </EntitySet>
+
+    <EntitySet Name="SCheckConstraints" EntityType="Self.CheckConstraint">
+      <DefiningQuery>
+        SELECT  /* Check constraints */
+        NULL AS `Id`,
+        NULL AS `Expression`
+      </DefiningQuery>
+    </EntitySet>
+
+    <EntitySet Name="SConstraintColumns" EntityType="Self.ConstraintColumn">
+      <DefiningQuery>
+        SELECT  /* Constraint columns */
+        CONCAT(CONSTRAINT_SCHEMA, '.', TABLE_NAME, '.', CONSTRAINT_NAME) AS `ConstraintId`,
+        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME, '.', COLUMN_NAME) AS `ColumnId`
+        FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_SCHEMA=schema()
+      </DefiningQuery>
+    </EntitySet>
+
+<!--
+    <EntitySet Name="SForeignKeyConstraints" EntityType="Self.ForeignKeyConstraint">
+      <DefiningQuery>
+        SELECT /* Foreign key constraints */
+        CONCAT('`', TABLE_SCHEMA, '`.`', CONSTRAINT_NAME, '`') AS `Id`,
+        'NO ACTION' AS `UpdateRule`,
+        'NO ACTION' AS `DeleteRule`
+        FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS
+        WHERE CONSTRAINT_TYPE = 'FOREIGN KEY' AND TABLE_SCHEMA=schema()
+      </DefiningQuery>
+    </EntitySet>
+-->
+
+    <EntitySet Name="SForeignKeyConstraints" EntityType="Self.ForeignKeyConstraint">
+      <DefiningQuery>
+        SELECT
+        CONCAT(CONSTRAINT_SCHEMA, '.', TABLE_NAME, '.', CONSTRAINT_NAME) AS `Id`,
+        UPDATE_RULE AS `UpdateRule`,
+        DELETE_RULE AS `DeleteRule`
+        FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
+      </DefiningQuery>
+    </EntitySet>
+
+    <EntitySet Name="SForeignKeys" EntityType="Self.ForeignKey">
+      <DefiningQuery>
+        SELECT
+        CONCAT(FC.CONSTRAINT_SCHEMA, '.', FC.CONSTRAINT_NAME, '.', FC.ORDINAL_POSITION) AS `Id`,
+        CONCAT(PC.TABLE_SCHEMA, '.', PC.TABLE_NAME, '.', PC.COLUMN_NAME) AS `ToColumnId`,
+        CONCAT(FC.TABLE_SCHEMA, '.', FC.TABLE_NAME, '.', FC.COLUMN_NAME) AS `FromColumnId`,
+        CONCAT(FC.CONSTRAINT_SCHEMA, '.', FC.TABLE_NAME, '.', FC.CONSTRAINT_NAME) AS `ConstraintId`,
+        FC.ORDINAL_POSITION AS `Ordinal`
+        FROM
+        INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS AS RC
+        INNER JOIN
+        INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS PC /* PRIMARY KEY COLS*/
+        ON       RC.UNIQUE_CONSTRAINT_SCHEMA =  PC.CONSTRAINT_SCHEMA
+        AND      RC.UNIQUE_CONSTRAINT_NAME    = PC.CONSTRAINT_NAME
+        AND      RC.REFERENCED_TABLE_NAME     = PC.TABLE_NAME
+        INNER JOIN
+        INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS FC /* FOREIGN KEY COLS*/
+        ON       RC.CONSTRAINT_SCHEMA  = FC.CONSTRAINT_SCHEMA
+        AND      RC.CONSTRAINT_NAME    = FC.CONSTRAINT_NAME
+        AND      RC.TABLE_NAME         = FC.TABLE_NAME
+        AND      PC.ORDINAL_POSITION   = FC.ORDINAL_POSITION
+<!--        WHERE FC.CONSTRAINT_SCHEMA='test3'-->
+      </DefiningQuery>
+    </EntitySet>    
+    
+    <!--<EntitySet Name="SForeignKeys" EntityType="Self.ForeignKey">
+      <DefiningQuery>
+        SELECT  /* Foreign keys */
+        CONCAT('`', KEYCOLS.TABLE_SCHEMA, '`.`', KEYCOLS.TABLE_NAME, '`.`',
+               KEYCOLS.CONSTRAINT_NAME, '`.`', KEYCOLS.COLUMN_NAME, '`') AS `Id`,
+        CONCAT('`', KEYCOLS.REFERENCED_TABLE_SCHEMA, '`.`', 
+               KEYCOLS.REFERENCED_TABLE_NAME, '`.`', 
+               KEYCOLS.REFERENCED_COLUMN_NAME, '`') AS `ToColumnId`,
+        CONCAT('`', KEYCOLS.TABLE_SCHEMA, '`.`', KEYCOLS.TABLE_NAME, '`.`', KEYCOLS.COLUMN_NAME, '`') AS `FromColumnId`,
+        KEYCOLS.COLUMN_NAME AS `Name`,
+        CONCAT('`', KEYCOLS.TABLE_SCHEMA, '`.`', KEYCOLS.CONSTRAINT_NAME, '`') AS `ConstraintId`,
+        KEYCOLS.ORDINAL_POSITION AS `Ordinal`
+        FROM
+        INFORMATION_SCHEMA.TABLE_CONSTRAINTS TC
+        INNER JOIN
+        INFORMATION_SCHEMA.KEY_COLUMN_USAGE KEYCOLS
+        WHERE TC.CONSTRAINT_TYPE = 'FOREIGN KEY'
+        AND TC.TABLE_SCHEMA = KEYCOLS.TABLE_SCHEMA
+        AND TC.TABLE_NAME = KEYCOLS.TABLE_NAME
+        AND TC.CONSTRAINT_NAME = KEYCOLS.CONSTRAINT_NAME
+        AND TC.TABLE_SCHEMA = schema()
+      </DefiningQuery>
+    </EntitySet>-->
+
+    <EntitySet Name="SViewConstraints" EntityType="Self.ViewConstraint">
+      <DefiningQuery>
+        SELECT /* View constraints */
+        NULL AS `Id`,
+        NULL AS `ParentId`,
+        NULL AS `Name`,
+        NULL AS `ConstraintType`,
+        NULL AS `Expression`,
+        NULL AS `UpdateRule`,
+        NULL AS `DeleteRule`
+      </DefiningQuery>
+    </EntitySet>
+
+    <EntitySet Name="SViewConstraintColumns" EntityType="Self.ConstraintColumn">
+      <DefiningQuery>
+        SELECT  /* View constraint columns */
+        NULL AS `ConstraintId`,
+        NULL AS `ColumnId`
+      </DefiningQuery>
+    </EntitySet>
+
+    <EntitySet Name="SViewForeignKeys" EntityType="Self.ForeignKey">
+      <DefiningQuery>
+        SELECT /* View foreign keys */
+        NULL AS `Id`,
+        NULL AS `ToColumnId`,
+        NULL AS `FromColumnId`,
+        NULL AS `ConstraintId`,
+        0 AS `Ordinal`
+      </DefiningQuery>
+    </EntitySet>
+
+    <AssociationSet Name="STableTableColumns" Association="Self.TableTableColumn" >
+      <End Role="Parent" EntitySet="STables"/>
+      <End Role="Column" EntitySet="STableColumns"/>
+    </AssociationSet>
+    <AssociationSet Name="STableConstraints" Association="Self.TableTableConstraint" >
+      <End Role="Parent" EntitySet="STables"/>
+      <End Role="Constraint" EntitySet="SConstraints"/>
+    </AssociationSet>
+    <AssociationSet Name="SConstraintConstraintColumns" Association="Self.ConstraintConstraintColumn" >
+      <End Role="ConstraintColumn" EntitySet="SConstraintColumns"/>
+      <End Role="Constraint" EntitySet="SConstraints"/>
+    </AssociationSet>
+    <AssociationSet Name="SConstraintForeignKeys" Association="Self.ConstraintForeignKey" >
+      <End Role="ForeignKey" EntitySet="SForeignKeys"/>
+      <End Role="Constraint" EntitySet="SForeignKeyConstraints"/>
+    </AssociationSet>
+    <AssociationSet Name="SFromForeignKeyColumns" Association="Self.FromForeignKeyColumn" >
+      <End Role="ForeignKey" EntitySet="SForeignKeys"/>
+      <End Role="Column" EntitySet="STableColumns"/>
+    </AssociationSet>
+    <AssociationSet Name="SToForeignKeyColumns" Association="Self.ToForeignKeyColumn" >
+      <End Role="ForeignKey" EntitySet="SForeignKeys"/>
+      <End Role="Column" EntitySet="STableColumns"/>
+    </AssociationSet>
+
+    <AssociationSet Name="SViewViewColumns" Association="Self.ViewViewColumn" >
+      <End Role="Parent" EntitySet="SViews"/>
+      <End Role="Column" EntitySet="SViewColumns"/>
+    </AssociationSet>
+    <AssociationSet Name="SViewViewConstraints" Association="Self.ViewViewConstraint" >
+      <End Role="Parent" EntitySet="SViews"/>
+      <End Role="Constraint" EntitySet="SViewConstraints"/>
+    </AssociationSet>
+    <AssociationSet Name="SViewConstraintConstraintColumns" Association="Self.ViewConstraintConstraintColumn" >
+      <End Role="ConstraintColumn" EntitySet="SViewConstraintColumns"/>
+      <End Role="Constraint" EntitySet="SViewConstraints"/>
+    </AssociationSet>
+    <AssociationSet Name="SViewConstraintForeignKeys" Association="Self.ViewConstraintForeignKey" >
+      <End Role="ForeignKey" EntitySet="SViewForeignKeys"/>
+      <End Role="Constraint" EntitySet="SViewConstraints"/>
+    </AssociationSet>
+    <AssociationSet Name="SFromForeignKeyViewColumns" Association="Self.FromForeignKeyViewColumn" >
+      <End Role="ForeignKey" EntitySet="SViewForeignKeys"/>
+      <End Role="Column" EntitySet="SViewColumns"/>
+    </AssociationSet>
+    <AssociationSet Name="SToForeignKeyViewColumns" Association="Self.ToForeignKeyViewColumn" >
+      <End Role="ForeignKey" EntitySet="SViewForeignKeys"/>
+      <End Role="Column" EntitySet="SViewColumns"/>
+    </AssociationSet>
+
+    <AssociationSet Name="FunctionFunctionParameters" Association="Self.FunctionFunctionParameter">
+      <End Role="Function" EntitySet="SFunctions"/>
+      <End Role="Parameter" EntitySet="SFunctionParameters"/>
+    </AssociationSet>
+    <AssociationSet Name="ProcedureProcedureParameters" Association="Self.ProcedureProcedureParameter" >
+      <End Role="Procedure" EntitySet="SProcedures"/>
+      <End Role="Parameter" EntitySet="SProcedureParameters"/>
+    </AssociationSet>
+  </EntityContainer>
+
+  <EntityType Name="Table">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="Catalog" Type="varchar" MaxLength="256" />
+    <Property Name="Schema" Type="varchar" MaxLength="256" />
+    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256" />
+  </EntityType>
+
+
+
+  <EntityType Name="TableColumn">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="ParentId" Nullable="false" Type="varchar" MaxLength ="256"/>
+    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="Ordinal" Nullable="false" Type="bigint" />
+    <Property Name="IsNullable" Nullable="false" Type="bit" />
+    <Property Name="TypeName" Nullable="false" Type="varchar" MaxLength="256" />
+    <Property Name="MaxLength" Type="bigint" />
+    <Property Name="Precision" Type="bigint" />
+    <Property Name="DateTimePrecision" Type="int" />
+    <Property Name="Scale" Type="bigint" />
+    <Property Name="CollationCatalog" Type="varchar" MaxLength="128" />
+    <Property Name="CollationSchema" Type="varchar" MaxLength="128" />
+    <Property Name="CollationName" Type="varchar" MaxLength="128" />
+    <Property Name="CharacterSetCatalog" Type="varchar" MaxLength="128" />
+    <Property Name="CharacterSetSchema" Type="varchar" MaxLength="128" />
+    <Property Name="CharacterSetName" Type="varchar" MaxLength="128" />
+    <Property Name="IsMultiSet" Nullable="false" Type="bit" />
+    <Property Name="IsIdentity" Nullable="false" Type="bit" />
+    <Property Name="IsStoreGenerated" Nullable="false" Type="bit" />
+    <Property Name="Default" Nullable="true" Type="longtext"/>
+  </EntityType>
+
+  <EntityType Name="View">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Nullable="false" Type="varchar" MaxLength ="256" />
+    <Property Name="CatalogName" Type="varchar" MaxLength="256" />
+    <Property Name="SchemaName" Type="varchar" MaxLength="256" />
+    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256" />
+    <Property Name="ViewDefinition" Nullable="true" Type="text" />
+    <Property Name="IsUpdatable" Nullable="false" Type="bit" />
+  </EntityType>
+
+  <EntityType Name="ViewColumn">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="ParentId" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="Ordinal" Nullable="false" Type="bigint" />
+    <Property Name="IsNullable" Nullable="false" Type="bit" />
+    <Property Name="TypeName" Nullable="false" Type="varchar" MaxLength="256" />
+    <Property Name="MaxLength" Type="bigint" />
+    <Property Name="Precision" Type="bigint" />
+    <Property Name="DateTimePrecision" Type="int" />
+    <Property Name="Scale" Type="bigint" />
+    <Property Name="CollationCatalog" Type="varchar" MaxLength="128" />
+    <Property Name="CollationSchema" Type="varchar" MaxLength="128" />
+    <Property Name="CollationName" Type="varchar" MaxLength="128" />
+    <Property Name="CharacterSetCatalog" Type="varchar" MaxLength="128" />
+    <Property Name="CharacterSetSchema" Type="varchar" MaxLength="128" />
+    <Property Name="CharacterSetName" Type="varchar" MaxLength="128" />
+    <Property Name="IsMultiSet" Nullable="false" Type="bit" />
+    <Property Name="IsIdentity" Nullable="false" Type="bit" />
+    <Property Name="IsStoreGenerated" Nullable="false" Type="bit" />
+    <Property Name="Default" Nullable="true" Type="longtext"/>
+  </EntityType>
+
+  <EntityType Name="Function">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="CatalogName" Type="varchar" MaxLength="256"/>
+    <Property Name="SchemaName" Type="varchar" MaxLength="256"/>
+    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="ReturnTypeName" Type="varchar" MaxLength="256" />
+    <Property Name="ReturnMaxLength" Type="bigint" />
+    <Property Name="ReturnPrecision" Type="bigint" />
+    <Property Name="ReturnDateTimePrecision" Type="int" />
+    <Property Name="ReturnScale" Type="bigint" />
+    <Property Name="ReturnCollationCatalog" Type="varchar" MaxLength="128" />
+    <Property Name="ReturnCollationSchema" Type="varchar" MaxLength="128" />
+    <Property Name="ReturnCollationName" Type="varchar" MaxLength="128" />
+    <Property Name="ReturnCharacterSetCatalog" Type="varchar" MaxLength="128" />
+    <Property Name="ReturnCharacterSetSchema" Type="varchar" MaxLength="128" />
+    <Property Name="ReturnCharacterSetName" Type="varchar" MaxLength="128" />
+    <Property Name="ReturnIsMultiSet" Nullable="false" Type="bit" />
+    <Property Name="IsAggregate" Type="bit" />
+    <Property Name="IsBuiltIn" Type="bit" />
+    <Property Name="IsNiladic" Type="bit" />
+  </EntityType>
+
+  <EntityType Name="Procedure">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="CatalogName" Type="varchar" MaxLength="256"/>
+    <Property Name="SchemaName" Type="varchar" MaxLength="256"/>
+    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256"/>
+  </EntityType>
+
+  <EntityType Name="Parameter">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="ParentId" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256" />
+    <Property Name="Ordinal" Nullable="false" Type="int"/>
+    <Property Name="TypeName" Nullable="false" Type="varchar" MaxLength="256" />
+    <Property Name="MaxLength" Nullable="true" Type="bigint" />
+    <Property Name="Precision" Nullable="true" Type="bigint" />
+    <Property Name="DateTimePrecision" Type="int" />
+    <Property Name="Scale" Nullable="true" Type="bigint" />
+    <Property Name="CollationCatalog" Type="varchar" MaxLength="128" />
+    <Property Name="CollationSchema" Type="varchar" MaxLength="128" />
+    <Property Name="CollationName" Type="varchar" MaxLength="128" />
+    <Property Name="CharacterSetCatalog" Type="varchar" MaxLength="128" />
+    <Property Name="CharacterSetSchema" Type="varchar" MaxLength="128" />
+    <Property Name="CharacterSetName" Type="varchar" MaxLength="128" />
+    <Property Name="IsMultiSet" Nullable="false" Type="bit" />
+    <Property Name="Mode" Type="varchar" MaxLength="16" />
+    <Property Name="Default" Type="longtext" />
+  </EntityType>
+
+  <EntityType Name="Constraint">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Nullable="false" Type="varchar" MaxLength ="256" />
+    <Property Name="ParentId" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="Name" Nullable="false" MaxLength="256" Type="varchar" />
+    <Property Name="IsDeferrable" Nullable="false" Type="bit" />
+    <Property Name="IsInitiallyDeferred" Nullable="false" Type="bit" />
+    <Property Name="ConstraintType" Nullable="false" MaxLength="11" Type="varchar" />
+  </EntityType>
+
+  <EntityType Name="CheckConstraint">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Nullable="false" Type="varchar" MaxLength ="256" />
+    <Property Name="Expression" Nullable="true" MaxLength="4000" Type="varchar" />
+  </EntityType>
+
+  <EntityType Name="ConstraintColumn">
+    <Key>
+      <PropertyRef Name="ConstraintId" />
+      <PropertyRef Name="ColumnId" />
+    </Key>
+    <Property Name="ConstraintId" Nullable="false" Type="varchar" MaxLength="256" />
+    <Property Name="ColumnId" Nullable="false" Type="varchar" MaxLength="256" />
+  </EntityType>
+
+  <EntityType Name="ForeignKeyConstraint">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256" />
+    <Property Name="UpdateRule" Nullable="false" MaxLength="11" Type="varchar" />
+    <Property Name="DeleteRule" Nullable="false" MaxLength="11" Type="varchar" />
+  </EntityType>
+
+  <EntityType Name="ForeignKey">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
+    <Property Name="Ordinal" Nullable="false" Type="int" />
+    <Property Name="ConstraintId" Nullable="false" Type="varchar" MaxLength="256" />
+    <Property Name="FromColumnId" Nullable="false" Type="varchar" MaxLength="256" />
+    <Property Name="ToColumnId" Nullable="false" Type="varchar" MaxLength ="256" />
+  </EntityType>
+
+  <EntityType Name="ViewConstraint">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256" />
+    <Property Name="ParentId" Nullable="false" Type="varchar" MaxLength="256" />
+    <Property Name="Name" Nullable="false" MaxLength="256" Type="varchar" />
+    <Property Name="IsDeferrable" Nullable="false" Type="bit" />
+    <Property Name="IsInitiallyDeferred" Nullable="false" Type="bit" />
+    <Property Name="ConstraintType" Nullable="false" MaxLength="11" Type="varchar" />
+    <Property Name="Expression" Nullable="true" MaxLength="4000" Type="varchar" />
+    <Property Name="UpdateRule" Nullable="true" MaxLength="11" Type="varchar" />
+    <Property Name="DeleteRule" Nullable="true" MaxLength="11" Type="varchar" />
+  </EntityType>
+
+  <Association Name="TableTableConstraint">

+    <End Type="Self.Table" Role="Parent" Multiplicity="1" />
+    <End Type="Self.Constraint" Role="Constraint" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Parent">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="Constraint">
+        <PropertyRef Name="ParentId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="ConstraintConstraintColumn">
+    <End Type="Self.Constraint" Role="Constraint" Multiplicity="1" />
+    <End Type="Self.ConstraintColumn" Role="ConstraintColumn" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Constraint">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ConstraintColumn">
+        <PropertyRef Name="ConstraintId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="ConstraintForeignKey">
+    <End Type="Self.ForeignKeyConstraint" Role="Constraint" Multiplicity="1" />
+    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Constraint">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ForeignKey">
+        <PropertyRef Name="ConstraintId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="FromForeignKeyColumn">
+    <End Type="Self.TableColumn" Role="Column" Multiplicity="1" />
+    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Column">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ForeignKey">
+        <PropertyRef Name="FromColumnId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="ToForeignKeyColumn">
+    <End Type="Self.TableColumn" Role="Column" Multiplicity="1" />
+    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Column">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ForeignKey">
+        <PropertyRef Name="ToColumnId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="TableTableColumn">
+    <End Type="Self.Table" Role="Parent" Multiplicity="1" />
+    <End Type="Self.TableColumn" Role="Column" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Parent">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="Column">
+        <PropertyRef Name="ParentId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="ViewViewColumn">
+    <End Type="Self.View" Role="Parent" Multiplicity="1" />
+    <End Type="Self.ViewColumn" Role="Column" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Parent">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="Column">
+        <PropertyRef Name="ParentId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="FunctionFunctionParameter">
+    <End Type="Self.Function" Role="Function" Multiplicity="1" />
+    <End Type="Self.Parameter" Role="Parameter" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Function">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="Parameter">
+        <PropertyRef Name="ParentId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="ProcedureProcedureParameter">
+    <End Type="Self.Procedure" Role="Procedure" Multiplicity="1" />
+    <End Type="Self.Parameter" Role="Parameter" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Procedure">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="Parameter">
+        <PropertyRef Name="ParentId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="ViewViewConstraint">
+    <End Type="Self.View" Role="Parent" Multiplicity="1" />
+    <End Type="Self.ViewConstraint" Role="Constraint" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Parent">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="Constraint">
+        <PropertyRef Name="ParentId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="ViewConstraintConstraintColumn">
+    <End Type="Self.ViewConstraint" Role="Constraint" Multiplicity="1" />
+    <End Type="Self.ConstraintColumn" Role="ConstraintColumn" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Constraint">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ConstraintColumn">
+        <PropertyRef Name="ConstraintId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="ViewConstraintForeignKey">
+    <End Type="Self.ViewConstraint" Role="Constraint" Multiplicity="1" />
+    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Constraint">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ForeignKey">
+        <PropertyRef Name="ConstraintId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="FromForeignKeyViewColumn">
+    <End Type="Self.ViewColumn" Role="Column" Multiplicity="1" />
+    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Column">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ForeignKey">
+        <PropertyRef Name="FromColumnId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+
+  <Association Name="ToForeignKeyViewColumn">

+    <End Type="Self.ViewColumn" Role="Column" Multiplicity="1" />
+    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Column">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ForeignKey">
+        <PropertyRef Name="ToColumnId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>  
+</Schema>
\ No newline at end of file

=== removed file 'MySql.Data.Entity/Provider/Properties/SchemaDefinition-6.0.ssdl'
--- a/MySql.Data.Entity/Provider/Properties/SchemaDefinition-6.0.ssdl	2011-03-03 17:57:57 +0000
+++ b/MySql.Data.Entity/Provider/Properties/SchemaDefinition-6.0.ssdl	1970-01-01 00:00:00 +0000
@@ -1,775 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Schema Namespace="MySqlClient" 
-        Provider="MySql.Data.MySqlClient"
-        ProviderManifestToken="5"
-        Alias="Self" 
-        xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl">
-  <EntityContainer Name="Schema">
-    
-    <EntitySet Name="STables" EntityType="Self.Table">
-      <DefiningQuery>
-		  SELECT /* Tables */
-		  CONCAT(TABLE_SCHEMA, '.', TABLE_NAME) AS `Id`,
-		  TABLE_CATALOG AS `Catalog`,
-		  TABLE_SCHEMA  AS `Schema`,
-		  TABLE_NAME    AS `Name`
-		  FROM INFORMATION_SCHEMA.TABLES
-		  WHERE TABLE_TYPE = 'BASE TABLE'
-      AND TABLE_SCHEMA=schema()
-	  </DefiningQuery>
-    </EntitySet>
-    
-    <EntitySet Name="STableColumns" EntityType="Self.TableColumn">
-      <DefiningQuery>
-        SELECT /* Table columns */
-        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME, '.', COLUMN_NAME) AS `Id`,
-        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME) AS `ParentId`,
-        COLUMN_NAME AS `Name`,
-        ORDINAL_POSITION AS `Ordinal`,
-        CASE IS_NULLABLE WHEN 'YES' THEN 1 ELSE 0 END AS `IsNullable`,
-        IF(LEFT(COLUMN_TYPE,10) = 'tinyint(1)', 'bool',
-          IF (LEFT(COLUMN_TYPE,10) = 'binary(16)' OR LEFT(COLUMN_TYPE,8) = 'char(36)', 'guid',
-            IF (INSTR(COLUMN_TYPE, 'unsigned') = 0, DATA_TYPE,
-              CONCAT('u', DATA_TYPE)))) AS `TypeName`,
-        IF (CHARACTER_MAXIMUM_LENGTH > 2147483647, 2147483647, CHARACTER_MAXIMUM_LENGTH) AS `MaxLength`,
-        NUMERIC_PRECISION AS `Precision`,
-        0 AS `DateTimePrecision`,
-        NUMERIC_SCALE AS `Scale`,
-        NULL AS `CollationCatalog`,
-        NULL AS `CollationSchema`,
-        COLLATION_NAME AS `CollationName`,
-        NULL AS `CharacterSetCatalog`,
-        NULL AS `CharacterSetSchema`,
-        CHARACTER_SET_NAME AS `CharacterSetName`,
-        0 AS `IsMultiSet`,
-        CASE WHEN EXTRA LIKE '%auto%' THEN 1 ELSE 0 END AS `IsIdentity`,
-        CASE WHEN EXTRA LIKE '%auto%' THEN 1 ELSE 0 END AS `IsStoreGenerated`,
-        COLUMN_DEFAULT AS `Default`
-        FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=schema()
-      </DefiningQuery>
-    </EntitySet>
-
-    <EntitySet Name="SViews" EntityType="Self.View">
-      <DefiningQuery>
-        SELECT /* Views */
-        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME) AS `Id`,
-        TABLE_CATALOG AS`CatalogName`,
-        TABLE_SCHEMA AS `SchemaName`,
-        TABLE_NAME AS `Name`,
-        VIEW_DEFINITION AS `ViewDefinition`,
-        CASE IS_UPDATABLE WHEN 'YES' THEN 1 ELSE 0 END AS `IsUpdatable`
-        FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_SCHEMA=schema()
-      </DefiningQuery>
-    </EntitySet>
-
-    <EntitySet Name="SViewColumns" EntityType="Self.ViewColumn">
-      <DefiningQuery>
-        SELECT /* View columns */
-        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME, '.', COLUMN_NAME) AS `Id`,
-        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME) AS `ParentId`,
-        COLUMN_NAME AS `Name`,
-        ORDINAL_POSITION AS `Ordinal`,
-        CASE IS_NULLABLE WHEN 'YES' THEN 1 ELSE 0 END AS `IsNullable`,
-        IF(LEFT(COLUMN_TYPE,10) = 'tinyint(1)', 'bool',
-          IF (LEFT(COLUMN_TYPE,10) = 'binary(16)' OR LEFT(COLUMN_TYPE,8) = 'char(36)', 'guid',
-            IF (INSTR(COLUMN_TYPE, 'unsigned') = 0, DATA_TYPE,
-              CONCAT('u', DATA_TYPE)))) AS `TypeName`,
-        IF (CHARACTER_MAXIMUM_LENGTH > 2147483647, 2147483647, CHARACTER_MAXIMUM_LENGTH) AS `MaxLength`,
-        NUMERIC_PRECISION AS `Precision`,
-        0 AS `DateTimePrecision`,
-        NUMERIC_SCALE AS `Scale`,
-        NULL AS `CollationCatalog`,
-        NULL AS `CollationSchema`,
-        COLLATION_NAME AS `CollationName`,
-        NULL AS `CharacterSetCatalog`,
-        NULL AS `CharacterSetSchema`,
-        CHARACTER_SET_NAME AS `CharacterSetName`,
-        0 AS `IsMultiSet`,
-        CASE WHEN EXTRA LIKE '%auto%' THEN 1 ELSE 0 END AS `IsIdentity`,
-        CASE WHEN EXTRA LIKE '%auto%' THEN 1 ELSE 0 END AS `IsStoreGenerated`,
-        COLUMN_DEFAULT AS `Default`
-        FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=schema()
-      </DefiningQuery>
-    </EntitySet>
-
-    <EntitySet Name="SFunctions" EntityType="Self.Function">
-      <DefiningQuery>
-        SELECT /* Functions */
-        CONCAT(ROUTINE_SCHEMA, '.', SPECIFIC_NAME) AS `Id`,
-        ROUTINE_CATALOG AS `CatalogName`,
-        ROUTINE_SCHEMA AS `SchemaName`,
-        ROUTINE_NAME AS `Name`,
-        SUBSTRING_INDEX(DTD_IDENTIFIER, '(', 1) AS `ReturnTypeName`,
-        NULL AS `ReturnMaxLength`,
-        NULL AS `ReturnPrecision`,
-        0 AS `ReturnDateTimePrecision`,
-        NULL AS `ReturnScale`,
-        NULL AS `ReturnCollationCatalog`,
-        NULL AS `ReturnCollationSchema`,
-        NULL AS `ReturnCollationName`,
-        NULL AS `ReturnCharacterSetCatalog`,
-        NULL AS `ReturnCharacterSetSchema`,
-        NULL AS `ReturnCharacterSetName`,
-        NULL AS `ReturnIsMultiSet`,
-        NULL AS `IsAggregate`,
-        NULL AS `IsBuiltIn`,
-        NULL AS `IsNiladic`
-        FROM INFORMATION_SCHEMA.ROUTINES
-        WHERE ROUTINE_TYPE='FUNCTION'
-        AND ROUTINE_SCHEMA=schema()
-      </DefiningQuery>
-    </EntitySet>
-
-    <EntitySet Name="SProcedures" EntityType="Self.Procedure">
-      <DefiningQuery>
-        SELECT /* Procedures */
-        CONCAT(ROUTINE_SCHEMA, '.', SPECIFIC_NAME) AS `Id`,
-        ROUTINE_CATALOG AS `CatalogName`,
-        ROUTINE_SCHEMA AS `SchemaName`,
-        ROUTINE_NAME AS `Name`
-        FROM INFORMATION_SCHEMA.ROUTINES
-        WHERE ROUTINE_TYPE='PROCEDURE'
-        AND ROUTINE_SCHEMA=schema()
-      </DefiningQuery>
-    </EntitySet>
-
-    <EntitySet Name="SFunctionParameters" EntityType="Self.Parameter">
-      <DefiningQuery>
-        SELECT
-        CONCAT(f.SPECIFIC_SCHEMA, '.', f.SPECIFIC_NAME, '.', f.PARAMETER_NAME) AS `Id`,
-        CONCAT(f.SPECIFIC_SCHEMA, '.', f.SPECIFIC_NAME) AS `ParentId`,
-        f.PARAMETER_NAME AS `Name`,
-        f.ORDINAL_POSITION `Ordinal`,
-        f.DATA_TYPE AS `TypeName`,
-        f.CHARACTER_MAXIMUM_LENGTH AS `MaxLength`,
-        f.NUMERIC_PRECISION AS`Precision`,
-        NULL AS `DateTimePrecision`,
-        f.NUMERIC_SCALE AS `Scale`,
-        NULL AS `CollationCatalog`,
-        NULL AS `CollationSchema`,
-        f.COLLATION_NAME AS `CollationName`,
-        NULL AS `CharacterSetCatalog`,
-        NULL AS `CharacterSetSchema`,
-        f.CHARACTER_SET_NAME AS `CharacterSetName`,
-        CAST(0 as decimal(0,0)) AS `IsMultiSet`,
-        f.PARAMETER_MODE AS `Mode`,
-        NULL AS `Default`
-        FROM
-        INFORMATION_SCHEMA.PARAMETERS f
-        INNER JOIN INFORMATION_SCHEMA.ROUTINES r ON
-        f.SPECIFIC_SCHEMA = r.ROUTINE_SCHEMA AND
-        f.SPECIFIC_NAME = r.SPECIFIC_NAME AND
-        r.ROUTINE_TYPE = 'FUNCTION'
-        WHERE
-        r.ROUTINE_SCHEMA=schema() AND f.ORDINAL_POSITION > 0
-      </DefiningQuery>
-    </EntitySet>
-
-    <EntitySet Name="SProcedureParameters" EntityType="Self.Parameter">
-      <DefiningQuery>
-        SELECT
-        CONCAT(f.SPECIFIC_SCHEMA, '.', f.SPECIFIC_NAME, '.', f.PARAMETER_NAME) AS `Id`,
-        CONCAT(f.SPECIFIC_SCHEMA, '.', f.SPECIFIC_NAME) AS `ParentId`,
-        f.PARAMETER_NAME AS `Name`,
-        f.ORDINAL_POSITION `Ordinal`,
-        f.DATA_TYPE AS `TypeName`,
-        f.CHARACTER_MAXIMUM_LENGTH AS `MaxLength`,
-        f.NUMERIC_PRECISION AS`Precision`,
-        NULL AS `DateTimePrecision`,
-        f.NUMERIC_SCALE AS `Scale`,
-        NULL AS `CollationCatalog`,
-        NULL AS `CollationSchema`,
-        f.COLLATION_NAME AS `CollationName`,
-        NULL AS `CharacterSetCatalog`,
-        NULL AS `CharacterSetSchema`,
-        f.CHARACTER_SET_NAME AS `CharacterSetName`,
-        CAST(0 as decimal(0,0)) AS `IsMultiSet`,
-        f.PARAMETER_MODE AS `Mode`,
-        NULL AS `Default`
-        FROM
-        INFORMATION_SCHEMA.PARAMETERS f
-        INNER JOIN INFORMATION_SCHEMA.ROUTINES r ON
-        f.SPECIFIC_SCHEMA = r.ROUTINE_SCHEMA AND
-        f.SPECIFIC_NAME = r.SPECIFIC_NAME AND
-        r.ROUTINE_TYPE = 'PROCEDURE'
-        WHERE
-        r.ROUTINE_SCHEMA=schema() AND f.ORDINAL_POSITION > 0
-      </DefiningQuery>
-    </EntitySet>
-
-    <EntitySet Name="SConstraints" EntityType="Self.Constraint">
-      <DefiningQuery>
-        SELECT  /* Constraints */
-        CONCAT(CONSTRAINT_SCHEMA, '.', TABLE_NAME, '.', CONSTRAINT_NAME) AS `Id`,
-        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME) AS `ParentId`,
-        CONSTRAINT_NAME AS `Name`,
-        CONSTRAINT_TYPE AS `ConstraintType`,
-        0 AS `IsDeferrable`,
-        0 AS `IsInitiallyDeferred`
-        FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS
-        WHERE CONSTRAINT_TYPE != 'CHECK' AND TABLE_SCHEMA=schema()
-      </DefiningQuery>
-    </EntitySet>
-
-    <EntitySet Name="SCheckConstraints" EntityType="Self.CheckConstraint">
-      <DefiningQuery>
-        SELECT  /* Check constraints */
-        NULL AS `Id`,
-        NULL AS `Expression`
-      </DefiningQuery>
-    </EntitySet>
-
-    <EntitySet Name="SConstraintColumns" EntityType="Self.ConstraintColumn">
-      <DefiningQuery>
-        SELECT  /* Constraint columns */
-        CONCAT(CONSTRAINT_SCHEMA, '.', TABLE_NAME, '.', CONSTRAINT_NAME) AS `ConstraintId`,
-        CONCAT(TABLE_SCHEMA, '.', TABLE_NAME, '.', COLUMN_NAME) AS `ColumnId`
-        FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_SCHEMA=schema()
-      </DefiningQuery>
-    </EntitySet>
-
-<!--
-    <EntitySet Name="SForeignKeyConstraints" EntityType="Self.ForeignKeyConstraint">
-      <DefiningQuery>
-        SELECT /* Foreign key constraints */
-        CONCAT('`', TABLE_SCHEMA, '`.`', CONSTRAINT_NAME, '`') AS `Id`,
-        'NO ACTION' AS `UpdateRule`,
-        'NO ACTION' AS `DeleteRule`
-        FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS
-        WHERE CONSTRAINT_TYPE = 'FOREIGN KEY' AND TABLE_SCHEMA=schema()
-      </DefiningQuery>
-    </EntitySet>
--->
-
-    <EntitySet Name="SForeignKeyConstraints" EntityType="Self.ForeignKeyConstraint">
-      <DefiningQuery>
-        SELECT
-        CONCAT(CONSTRAINT_SCHEMA, '.', TABLE_NAME, '.', CONSTRAINT_NAME) AS `Id`,
-        UPDATE_RULE AS `UpdateRule`,
-        DELETE_RULE AS `DeleteRule`
-        FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
-      </DefiningQuery>
-    </EntitySet>
-
-    <EntitySet Name="SForeignKeys" EntityType="Self.ForeignKey">
-      <DefiningQuery>
-        SELECT
-        CONCAT(FC.CONSTRAINT_SCHEMA, '.', FC.CONSTRAINT_NAME, '.', FC.ORDINAL_POSITION) AS `Id`,
-        CONCAT(PC.TABLE_SCHEMA, '.', PC.TABLE_NAME, '.', PC.COLUMN_NAME) AS `ToColumnId`,
-        CONCAT(FC.TABLE_SCHEMA, '.', FC.TABLE_NAME, '.', FC.COLUMN_NAME) AS `FromColumnId`,
-        CONCAT(FC.CONSTRAINT_SCHEMA, '.', FC.TABLE_NAME, '.', FC.CONSTRAINT_NAME) AS `ConstraintId`,
-        FC.ORDINAL_POSITION AS `Ordinal`
-        FROM
-        INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS AS RC
-        INNER JOIN
-        INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS PC /* PRIMARY KEY COLS*/
-        ON       RC.UNIQUE_CONSTRAINT_SCHEMA =  PC.CONSTRAINT_SCHEMA
-        AND      RC.UNIQUE_CONSTRAINT_NAME    = PC.CONSTRAINT_NAME
-        AND      RC.REFERENCED_TABLE_NAME     = PC.TABLE_NAME
-        INNER JOIN
-        INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS FC /* FOREIGN KEY COLS*/
-        ON       RC.CONSTRAINT_SCHEMA  = FC.CONSTRAINT_SCHEMA
-        AND      RC.CONSTRAINT_NAME    = FC.CONSTRAINT_NAME
-        AND      RC.TABLE_NAME         = FC.TABLE_NAME
-        AND      PC.ORDINAL_POSITION   = FC.ORDINAL_POSITION
-<!--        WHERE FC.CONSTRAINT_SCHEMA='test3'-->
-      </DefiningQuery>
-    </EntitySet>    
-    
-    <!--<EntitySet Name="SForeignKeys" EntityType="Self.ForeignKey">
-      <DefiningQuery>
-        SELECT  /* Foreign keys */
-        CONCAT('`', KEYCOLS.TABLE_SCHEMA, '`.`', KEYCOLS.TABLE_NAME, '`.`',
-               KEYCOLS.CONSTRAINT_NAME, '`.`', KEYCOLS.COLUMN_NAME, '`') AS `Id`,
-        CONCAT('`', KEYCOLS.REFERENCED_TABLE_SCHEMA, '`.`', 
-               KEYCOLS.REFERENCED_TABLE_NAME, '`.`', 
-               KEYCOLS.REFERENCED_COLUMN_NAME, '`') AS `ToColumnId`,
-        CONCAT('`', KEYCOLS.TABLE_SCHEMA, '`.`', KEYCOLS.TABLE_NAME, '`.`', KEYCOLS.COLUMN_NAME, '`') AS `FromColumnId`,
-        KEYCOLS.COLUMN_NAME AS `Name`,
-        CONCAT('`', KEYCOLS.TABLE_SCHEMA, '`.`', KEYCOLS.CONSTRAINT_NAME, '`') AS `ConstraintId`,
-        KEYCOLS.ORDINAL_POSITION AS `Ordinal`
-        FROM
-        INFORMATION_SCHEMA.TABLE_CONSTRAINTS TC
-        INNER JOIN
-        INFORMATION_SCHEMA.KEY_COLUMN_USAGE KEYCOLS
-        WHERE TC.CONSTRAINT_TYPE = 'FOREIGN KEY'
-        AND TC.TABLE_SCHEMA = KEYCOLS.TABLE_SCHEMA
-        AND TC.TABLE_NAME = KEYCOLS.TABLE_NAME
-        AND TC.CONSTRAINT_NAME = KEYCOLS.CONSTRAINT_NAME
-        AND TC.TABLE_SCHEMA = schema()
-      </DefiningQuery>
-    </EntitySet>-->
-
-    <EntitySet Name="SViewConstraints" EntityType="Self.ViewConstraint">
-      <DefiningQuery>
-        SELECT /* View constraints */
-        NULL AS `Id`,
-        NULL AS `ParentId`,
-        NULL AS `Name`,
-        NULL AS `ConstraintType`,
-        NULL AS `Expression`,
-        NULL AS `UpdateRule`,
-        NULL AS `DeleteRule`
-      </DefiningQuery>
-    </EntitySet>
-
-    <EntitySet Name="SViewConstraintColumns" EntityType="Self.ConstraintColumn">
-      <DefiningQuery>
-        SELECT  /* View constraint columns */
-        NULL AS `ConstraintId`,
-        NULL AS `ColumnId`
-      </DefiningQuery>
-    </EntitySet>
-
-    <EntitySet Name="SViewForeignKeys" EntityType="Self.ForeignKey">
-      <DefiningQuery>
-        SELECT /* View foreign keys */
-        NULL AS `Id`,
-        NULL AS `ToColumnId`,
-        NULL AS `FromColumnId`,
-        NULL AS `ConstraintId`,
-        0 AS `Ordinal`
-      </DefiningQuery>
-    </EntitySet>
-
-    <AssociationSet Name="STableTableColumns" Association="Self.TableTableColumn" >
-      <End Role="Parent" EntitySet="STables"/>
-      <End Role="Column" EntitySet="STableColumns"/>
-    </AssociationSet>
-    <AssociationSet Name="STableConstraints" Association="Self.TableTableConstraint" >
-      <End Role="Parent" EntitySet="STables"/>
-      <End Role="Constraint" EntitySet="SConstraints"/>
-    </AssociationSet>
-    <AssociationSet Name="SConstraintConstraintColumns" Association="Self.ConstraintConstraintColumn" >
-      <End Role="ConstraintColumn" EntitySet="SConstraintColumns"/>
-      <End Role="Constraint" EntitySet="SConstraints"/>
-    </AssociationSet>
-    <AssociationSet Name="SConstraintForeignKeys" Association="Self.ConstraintForeignKey" >
-      <End Role="ForeignKey" EntitySet="SForeignKeys"/>
-      <End Role="Constraint" EntitySet="SForeignKeyConstraints"/>
-    </AssociationSet>
-    <AssociationSet Name="SFromForeignKeyColumns" Association="Self.FromForeignKeyColumn" >
-      <End Role="ForeignKey" EntitySet="SForeignKeys"/>
-      <End Role="Column" EntitySet="STableColumns"/>
-    </AssociationSet>
-    <AssociationSet Name="SToForeignKeyColumns" Association="Self.ToForeignKeyColumn" >
-      <End Role="ForeignKey" EntitySet="SForeignKeys"/>
-      <End Role="Column" EntitySet="STableColumns"/>
-    </AssociationSet>
-
-    <AssociationSet Name="SViewViewColumns" Association="Self.ViewViewColumn" >
-      <End Role="Parent" EntitySet="SViews"/>
-      <End Role="Column" EntitySet="SViewColumns"/>
-    </AssociationSet>
-    <AssociationSet Name="SViewViewConstraints" Association="Self.ViewViewConstraint" >
-      <End Role="Parent" EntitySet="SViews"/>
-      <End Role="Constraint" EntitySet="SViewConstraints"/>
-    </AssociationSet>
-    <AssociationSet Name="SViewConstraintConstraintColumns" Association="Self.ViewConstraintConstraintColumn" >
-      <End Role="ConstraintColumn" EntitySet="SViewConstraintColumns"/>
-      <End Role="Constraint" EntitySet="SViewConstraints"/>
-    </AssociationSet>
-    <AssociationSet Name="SViewConstraintForeignKeys" Association="Self.ViewConstraintForeignKey" >
-      <End Role="ForeignKey" EntitySet="SViewForeignKeys"/>
-      <End Role="Constraint" EntitySet="SViewConstraints"/>
-    </AssociationSet>
-    <AssociationSet Name="SFromForeignKeyViewColumns" Association="Self.FromForeignKeyViewColumn" >
-      <End Role="ForeignKey" EntitySet="SViewForeignKeys"/>
-      <End Role="Column" EntitySet="SViewColumns"/>
-    </AssociationSet>
-    <AssociationSet Name="SToForeignKeyViewColumns" Association="Self.ToForeignKeyViewColumn" >
-      <End Role="ForeignKey" EntitySet="SViewForeignKeys"/>
-      <End Role="Column" EntitySet="SViewColumns"/>
-    </AssociationSet>
-
-    <AssociationSet Name="FunctionFunctionParameters" Association="Self.FunctionFunctionParameter">
-      <End Role="Function" EntitySet="SFunctions"/>
-      <End Role="Parameter" EntitySet="SFunctionParameters"/>
-    </AssociationSet>
-    <AssociationSet Name="ProcedureProcedureParameters" Association="Self.ProcedureProcedureParameter" >
-      <End Role="Procedure" EntitySet="SProcedures"/>
-      <End Role="Parameter" EntitySet="SProcedureParameters"/>
-    </AssociationSet>
-  </EntityContainer>
-
-  <EntityType Name="Table">
-    <Key>
-      <PropertyRef Name="Id" />
-    </Key>
-    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="Catalog" Type="varchar" MaxLength="256" />
-    <Property Name="Schema" Type="varchar" MaxLength="256" />
-    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256" />
-  </EntityType>
-
-
-
-  <EntityType Name="TableColumn">
-    <Key>
-      <PropertyRef Name="Id" />
-    </Key>
-    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="ParentId" Nullable="false" Type="varchar" MaxLength ="256"/>
-    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="Ordinal" Nullable="false" Type="bigint" />
-    <Property Name="IsNullable" Nullable="false" Type="bit" />
-    <Property Name="TypeName" Nullable="false" Type="varchar" MaxLength="256" />
-    <Property Name="MaxLength" Type="bigint" />
-    <Property Name="Precision" Type="bigint" />
-    <Property Name="DateTimePrecision" Type="int" />
-    <Property Name="Scale" Type="bigint" />
-    <Property Name="CollationCatalog" Type="varchar" MaxLength="128" />
-    <Property Name="CollationSchema" Type="varchar" MaxLength="128" />
-    <Property Name="CollationName" Type="varchar" MaxLength="128" />
-    <Property Name="CharacterSetCatalog" Type="varchar" MaxLength="128" />
-    <Property Name="CharacterSetSchema" Type="varchar" MaxLength="128" />
-    <Property Name="CharacterSetName" Type="varchar" MaxLength="128" />
-    <Property Name="IsMultiSet" Nullable="false" Type="bit" />
-    <Property Name="IsIdentity" Nullable="false" Type="bit" />
-    <Property Name="IsStoreGenerated" Nullable="false" Type="bit" />
-    <Property Name="Default" Nullable="true" Type="longtext"/>
-  </EntityType>
-
-  <EntityType Name="View">
-    <Key>
-      <PropertyRef Name="Id" />
-    </Key>
-    <Property Name="Id" Nullable="false" Type="varchar" MaxLength ="256" />
-    <Property Name="CatalogName" Type="varchar" MaxLength="256" />
-    <Property Name="SchemaName" Type="varchar" MaxLength="256" />
-    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256" />
-    <Property Name="ViewDefinition" Nullable="true" Type="text" />
-    <Property Name="IsUpdatable" Nullable="false" Type="bit" />
-  </EntityType>
-
-  <EntityType Name="ViewColumn">
-    <Key>
-      <PropertyRef Name="Id" />
-    </Key>
-    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="ParentId" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="Ordinal" Nullable="false" Type="bigint" />
-    <Property Name="IsNullable" Nullable="false" Type="bit" />
-    <Property Name="TypeName" Nullable="false" Type="varchar" MaxLength="256" />
-    <Property Name="MaxLength" Type="bigint" />
-    <Property Name="Precision" Type="bigint" />
-    <Property Name="DateTimePrecision" Type="int" />
-    <Property Name="Scale" Type="bigint" />
-    <Property Name="CollationCatalog" Type="varchar" MaxLength="128" />
-    <Property Name="CollationSchema" Type="varchar" MaxLength="128" />
-    <Property Name="CollationName" Type="varchar" MaxLength="128" />
-    <Property Name="CharacterSetCatalog" Type="varchar" MaxLength="128" />
-    <Property Name="CharacterSetSchema" Type="varchar" MaxLength="128" />
-    <Property Name="CharacterSetName" Type="varchar" MaxLength="128" />
-    <Property Name="IsMultiSet" Nullable="false" Type="bit" />
-    <Property Name="IsIdentity" Nullable="false" Type="bit" />
-    <Property Name="IsStoreGenerated" Nullable="false" Type="bit" />
-    <Property Name="Default" Nullable="true" Type="longtext"/>
-  </EntityType>
-
-  <EntityType Name="Function">
-    <Key>
-      <PropertyRef Name="Id" />
-    </Key>
-    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="CatalogName" Type="varchar" MaxLength="256"/>
-    <Property Name="SchemaName" Type="varchar" MaxLength="256"/>
-    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="ReturnTypeName" Type="varchar" MaxLength="256" />
-    <Property Name="ReturnMaxLength" Type="bigint" />
-    <Property Name="ReturnPrecision" Type="bigint" />
-    <Property Name="ReturnDateTimePrecision" Type="int" />
-    <Property Name="ReturnScale" Type="bigint" />
-    <Property Name="ReturnCollationCatalog" Type="varchar" MaxLength="128" />
-    <Property Name="ReturnCollationSchema" Type="varchar" MaxLength="128" />
-    <Property Name="ReturnCollationName" Type="varchar" MaxLength="128" />
-    <Property Name="ReturnCharacterSetCatalog" Type="varchar" MaxLength="128" />
-    <Property Name="ReturnCharacterSetSchema" Type="varchar" MaxLength="128" />
-    <Property Name="ReturnCharacterSetName" Type="varchar" MaxLength="128" />
-    <Property Name="ReturnIsMultiSet" Nullable="false" Type="bit" />
-    <Property Name="IsAggregate" Type="bit" />
-    <Property Name="IsBuiltIn" Type="bit" />
-    <Property Name="IsNiladic" Type="bit" />
-  </EntityType>
-
-  <EntityType Name="Procedure">
-    <Key>
-      <PropertyRef Name="Id" />
-    </Key>
-    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="CatalogName" Type="varchar" MaxLength="256"/>
-    <Property Name="SchemaName" Type="varchar" MaxLength="256"/>
-    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256"/>
-  </EntityType>
-
-  <EntityType Name="Parameter">
-    <Key>
-      <PropertyRef Name="Id" />
-    </Key>
-    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="ParentId" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="256" />
-    <Property Name="Ordinal" Nullable="false" Type="int"/>
-    <Property Name="TypeName" Nullable="false" Type="varchar" MaxLength="256" />
-    <Property Name="MaxLength" Nullable="true" Type="bigint" />
-    <Property Name="Precision" Nullable="true" Type="bigint" />
-    <Property Name="DateTimePrecision" Type="int" />
-    <Property Name="Scale" Nullable="true" Type="bigint" />
-    <Property Name="CollationCatalog" Type="varchar" MaxLength="128" />
-    <Property Name="CollationSchema" Type="varchar" MaxLength="128" />
-    <Property Name="CollationName" Type="varchar" MaxLength="128" />
-    <Property Name="CharacterSetCatalog" Type="varchar" MaxLength="128" />
-    <Property Name="CharacterSetSchema" Type="varchar" MaxLength="128" />
-    <Property Name="CharacterSetName" Type="varchar" MaxLength="128" />
-    <Property Name="IsMultiSet" Nullable="false" Type="bit" />
-    <Property Name="Mode" Type="varchar" MaxLength="16" />
-    <Property Name="Default" Type="longtext" />
-  </EntityType>
-
-  <EntityType Name="Constraint">
-    <Key>
-      <PropertyRef Name="Id" />
-    </Key>
-    <Property Name="Id" Nullable="false" Type="varchar" MaxLength ="256" />
-    <Property Name="ParentId" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="Name" Nullable="false" MaxLength="256" Type="varchar" />
-    <Property Name="IsDeferrable" Nullable="false" Type="bit" />
-    <Property Name="IsInitiallyDeferred" Nullable="false" Type="bit" />
-    <Property Name="ConstraintType" Nullable="false" MaxLength="11" Type="varchar" />
-  </EntityType>
-
-  <EntityType Name="CheckConstraint">
-    <Key>
-      <PropertyRef Name="Id" />
-    </Key>
-    <Property Name="Id" Nullable="false" Type="varchar" MaxLength ="256" />
-    <Property Name="Expression" Nullable="true" MaxLength="4000" Type="varchar" />
-  </EntityType>
-
-  <EntityType Name="ConstraintColumn">
-    <Key>
-      <PropertyRef Name="ConstraintId" />
-      <PropertyRef Name="ColumnId" />
-    </Key>
-    <Property Name="ConstraintId" Nullable="false" Type="varchar" MaxLength="256" />
-    <Property Name="ColumnId" Nullable="false" Type="varchar" MaxLength="256" />
-  </EntityType>
-
-  <EntityType Name="ForeignKeyConstraint">
-    <Key>
-      <PropertyRef Name="Id" />
-    </Key>
-    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256" />
-    <Property Name="UpdateRule" Nullable="false" MaxLength="11" Type="varchar" />
-    <Property Name="DeleteRule" Nullable="false" MaxLength="11" Type="varchar" />
-  </EntityType>
-
-  <EntityType Name="ForeignKey">
-    <Key>
-      <PropertyRef Name="Id" />
-    </Key>
-    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256"/>
-    <Property Name="Ordinal" Nullable="false" Type="int" />
-    <Property Name="ConstraintId" Nullable="false" Type="varchar" MaxLength="256" />
-    <Property Name="FromColumnId" Nullable="false" Type="varchar" MaxLength="256" />
-    <Property Name="ToColumnId" Nullable="false" Type="varchar" MaxLength ="256" />
-  </EntityType>
-
-  <EntityType Name="ViewConstraint">
-    <Key>
-      <PropertyRef Name="Id" />
-    </Key>
-    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="256" />
-    <Property Name="ParentId" Nullable="false" Type="varchar" MaxLength="256" />
-    <Property Name="Name" Nullable="false" MaxLength="256" Type="varchar" />
-    <Property Name="IsDeferrable" Nullable="false" Type="bit" />
-    <Property Name="IsInitiallyDeferred" Nullable="false" Type="bit" />
-    <Property Name="ConstraintType" Nullable="false" MaxLength="11" Type="varchar" />
-    <Property Name="Expression" Nullable="true" MaxLength="4000" Type="varchar" />
-    <Property Name="UpdateRule" Nullable="true" MaxLength="11" Type="varchar" />
-    <Property Name="DeleteRule" Nullable="true" MaxLength="11" Type="varchar" />
-  </EntityType>
-
-  <Association Name="TableTableConstraint">
-    <End Type="Self.Table" Role="Parent" Multiplicity="1" />
-    <End Type="Self.Constraint" Role="Constraint" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Parent">
-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="Constraint">
-        <PropertyRef Name="ParentId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-
-  <Association Name="ConstraintConstraintColumn">
-    <End Type="Self.Constraint" Role="Constraint" Multiplicity="1" />
-    <End Type="Self.ConstraintColumn" Role="ConstraintColumn" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Constraint">
-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="ConstraintColumn">
-        <PropertyRef Name="ConstraintId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-
-  <Association Name="ConstraintForeignKey">
-    <End Type="Self.ForeignKeyConstraint" Role="Constraint" Multiplicity="1" />
-    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Constraint">
-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="ForeignKey">
-        <PropertyRef Name="ConstraintId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-
-  <Association Name="FromForeignKeyColumn">
-    <End Type="Self.TableColumn" Role="Column" Multiplicity="1" />
-    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Column">
-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="ForeignKey">
-        <PropertyRef Name="FromColumnId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-
-  <Association Name="ToForeignKeyColumn">
-    <End Type="Self.TableColumn" Role="Column" Multiplicity="1" />
-    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Column">

-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="ForeignKey">
-        <PropertyRef Name="ToColumnId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-
-  <Association Name="TableTableColumn">
-    <End Type="Self.Table" Role="Parent" Multiplicity="1" />
-    <End Type="Self.TableColumn" Role="Column" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Parent">
-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="Column">
-        <PropertyRef Name="ParentId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-
-  <Association Name="ViewViewColumn">
-    <End Type="Self.View" Role="Parent" Multiplicity="1" />
-    <End Type="Self.ViewColumn" Role="Column" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Parent">
-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="Column">
-        <PropertyRef Name="ParentId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-
-  <Association Name="FunctionFunctionParameter">
-    <End Type="Self.Function" Role="Function" Multiplicity="1" />
-    <End Type="Self.Parameter" Role="Parameter" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Function">
-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="Parameter">
-        <PropertyRef Name="ParentId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-
-  <Association Name="ProcedureProcedureParameter">
-    <End Type="Self.Procedure" Role="Procedure" Multiplicity="1" />
-    <End Type="Self.Parameter" Role="Parameter" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Procedure">

-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="Parameter">
-        <PropertyRef Name="ParentId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-
-  <Association Name="ViewViewConstraint">
-    <End Type="Self.View" Role="Parent" Multiplicity="1" />
-    <End Type="Self.ViewConstraint" Role="Constraint" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Parent">

-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="Constraint">
-        <PropertyRef Name="ParentId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-
-  <Association Name="ViewConstraintConstraintColumn">
-    <End Type="Self.ViewConstraint" Role="Constraint" Multiplicity="1" />
-    <End Type="Self.ConstraintColumn" Role="ConstraintColumn" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Constraint">
-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="ConstraintColumn">
-        <PropertyRef Name="ConstraintId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-
-  <Association Name="ViewConstraintForeignKey">
-    <End Type="Self.ViewConstraint" Role="Constraint" Multiplicity="1" />
-    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Constraint">
-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="ForeignKey">
-        <PropertyRef Name="ConstraintId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-

-  <Association Name="FromForeignKeyViewColumn">
-    <End Type="Self.ViewColumn" Role="Column" Multiplicity="1" />
-    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Column">
-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="ForeignKey">
-        <PropertyRef Name="FromColumnId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-
-  <Association Name="ToForeignKeyViewColumn">
-    <End Type="Self.ViewColumn" Role="Column" Multiplicity="1" />
-    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Column">
-        <PropertyRef Name="Id" />
-      </Principal>
-      <Dependent Role="ForeignKey">
-        <PropertyRef Name="ToColumnId" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>  
-</Schema>
\ No newline at end of file

=== modified file 'MySql.Data.Entity/Provider/ProviderServices.cs'
--- a/MySql.Data.Entity/Provider/ProviderServices.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Data.Entity/Provider/ProviderServices.cs	2011-05-10 23:36:53 +0000
@@ -183,13 +183,15 @@
                 connection.Open();
                 shouldClose = true;
             }
-            string version = connection.ServerVersion;
+            double version = double.Parse(connection.ServerVersion.Substring(0, 3));
+            
             if (shouldClose)
                 connection.Close();
-            if (version.StartsWith("6")) return "6.0";
-            if (version.StartsWith("5.0")) return "5.0";
-            if (version.StartsWith("5")) return "5.1";
-            throw new NotSupportedException("Versions of MySQL prior to 5.0 are not currently supported");
+
+            if (version < 5.0) throw new NotSupportedException("Versions of MySQL prior to 5.0 are not currently supported");
+            if (version < 5.1) return "5.0";
+            if (version < 5.5) return "5.1";
+            return "5.5";            
         }
 
         protected override DbProviderManifest GetDbProviderManifest(string manifestToken)

=== modified file 'MySql.Data.Entity/Tests/Properties/AssemblyInfo.cs'
--- a/MySql.Data.Entity/Tests/Properties/AssemblyInfo.cs	2010-08-26 19:00:05 +0000
+++ b/MySql.Data.Entity/Tests/Properties/AssemblyInfo.cs	2011-05-10 23:36:53 +0000
@@ -55,3 +55,4 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("6.1.5")]
+[assembly: AssemblyKeyName("ConnectorNet")]
\ No newline at end of file

=== modified file 'MySql.Data.Entity/Tests/Wizard.cs'
--- a/MySql.Data.Entity/Tests/Wizard.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Data.Entity/Tests/Wizard.cs	2011-05-10 23:36:53 +0000
@@ -85,6 +85,22 @@
                 }
             }
         }
+
+        [Test]
+        public void GetDbProviderManifestTokenReturnsCorrectSchemaVersion()
+        {
+            if (Version < new Version(5, 0)) return;
+
+            MySqlProviderServices services = new MySqlProviderServices();
+            string token = services.GetProviderManifestToken(conn);
+
+            if (Version < new Version(5, 1))
+                Assert.AreEqual("5.0", token);
+            else if (Version < new Version(5, 5))
+                Assert.AreEqual("5.1", token);
+            else 
+                Assert.AreEqual("5.5", token);
+        }
     }
 
     public static class ExtensionMethods

=== modified file 'MySql.Data/Tests/MySql.Data.CF.Tests.csproj'
--- a/MySql.Data/Tests/MySql.Data.CF.Tests.csproj	2009-08-10 15:32:25 +0000
+++ b/MySql.Data/Tests/MySql.Data.CF.Tests.csproj	2011-05-10 23:36:53 +0000
@@ -51,6 +51,10 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="mscorlib" />
+    <Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Program Files (x86)\NUnit 2.5.10\bin\net-2.0\framework\nunit.framework.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
@@ -63,7 +67,6 @@
     <Compile Include="Source\CharacterSetTests.cs" />
     <Compile Include="Source\CommandBuilderTests.cs" />
     <Compile Include="Source\CommandTests.cs" />
-    <Compile Include="Source\ConfigurationManager.cs" />
     <Compile Include="Source\ConnectionStringBuilder.cs" />
     <Compile Include="Source\ConnectionTests.cs">
       <SubType>Code</SubType>
@@ -87,8 +90,6 @@
     <Compile Include="Source\StressTests.cs" />
     <Compile Include="Source\Syntax.cs" />
     <Compile Include="Source\Syntax2.cs" />
-    <Compile Include="Source\Tester\TestClasses.cs" />
-    <Compile Include="Source\Tester\TestRunner.cs" />
     <Compile Include="Source\TimeoutAndCancel.cs" />
     <Compile Include="Source\Utils.cs" />
   </ItemGroup>
@@ -98,6 +99,9 @@
       <Name>MySql.Data.CF</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Properties\Setup.sql" />
+  </ItemGroup>
   <Import Condition="'$(TargetFrameworkVersion)' == 'v1.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.v1.targets" />
   <Import Condition="'$(TargetFrameworkVersion)' == 'v2.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
   <ProjectExtensions>

=== modified file 'MySql.Data/Tests/Source/BaseTest.cs'
--- a/MySql.Data/Tests/Source/BaseTest.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Data/Tests/Source/BaseTest.cs	2011-05-10 23:36:53 +0000
@@ -72,11 +72,14 @@
 			port = 3306;
 			rootUser = "root";
 			rootPassword = "";
+            string strPort = null;
 
+#if !CF
 			host = ConfigurationManager.AppSettings["host"];
-			string strPort = ConfigurationManager.AppSettings["port"];
+			strPort = ConfigurationManager.AppSettings["port"];
 			pipeName = ConfigurationManager.AppSettings["pipename"];
 			memoryName = ConfigurationManager.AppSettings["memory_name"];
+#endif
 
 			if (strPort != null)
 				port = Int32.Parse(strPort);
@@ -194,7 +197,11 @@
         public virtual void Setup()
         {
             Assembly executingAssembly = Assembly.GetExecutingAssembly();
+#if !CF
             Stream stream = executingAssembly.GetManifestResourceStream("MySql.Data.MySqlClient.Tests.Properties.Setup.sql");
+#else
+            Stream stream = executingAssembly.GetManifestResourceStream("MySql.Data.CF.Tests.Properties.Setup.sql");
+#endif
             StreamReader sr = new StreamReader(stream);
             string sql = sr.ReadToEnd();
             sr.Close();

=== removed file 'MySql.Data/Tests/Source/ConfigurationManager.cs'
--- a/MySql.Data/Tests/Source/ConfigurationManager.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Data/Tests/Source/ConfigurationManager.cs	1970-01-01 00:00:00 +0000
@@ -1,103 +0,0 @@
-// Copyright (c) 2004-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
-//
-// MySQL Connector/NET is licensed under the terms of the GPLv2
-// <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most 
-// MySQL Connectors. There are special exceptions to the terms and 
-// conditions of the GPLv2 as it is applied to this software, see the 
-// FLOSS License Exception
-// <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
-//
-// This program is free software; you can redistribute it and/or modify 
-// it under the terms of the GNU General Public License as published 
-// by the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful, but 
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
-// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
-// for more details.
-//
-// You should have received a copy of the GNU General Public License along 
-// with this program; if not, write to the Free Software Foundation, Inc., 
-// 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-
-using System;
-using System.IO;
-using System.Collections.Specialized;
-using System.Reflection;
-using System.Xml;
-
-namespace MySql.Data.MySqlClient.Tests
-{
-    public static class ConfigurationManager
-    {
-        private static string configurationFile;
-        private static NameValueCollection appSettings = new NameValueCollection();
-
-        public static NameValueCollection AppSettings
-        {
-            get { return appSettings; }
-        }
-
-        static ConfigurationManager()
-        {
-            ConfigurationManager.configurationFile = String.Format("{0}.config", 
-                System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
-
-            if (!File.Exists(ConfigurationManager.configurationFile))
-            {
-                throw new FileNotFoundException(String.Format(
-                    "Configuration file ({0}) not be found.", 
-                    ConfigurationManager.configurationFile));
-            }
-
-            XmlDocument configXmlDocument = new XmlDocument();
-            configXmlDocument.Load(ConfigurationManager.configurationFile);
-
-            // Add keys and values to the AppSettings NameValueCollection
-            foreach (XmlNode node in configXmlDocument.SelectNodes("/configuration/appSettings/add"))
-            {
-                ConfigurationManager.AppSettings.Add(
-                    node.Attributes["key"].Value, 
-                    node.Attributes["value"].Value);
-            }
-        }
-
-        public static void Save()
-        {
-            XmlDocument configXmlDocument = new XmlDocument();
-            configXmlDocument.Load(ConfigurationManager.configurationFile);
-
-            XmlNode node = configXmlDocument.SelectSingleNode("/configuration/appSettings");
-
-            if (node != null)
-            {
-                // Remove all previous appSetting nodes
-                node.RemoveAll();
-
-                foreach (string key in AppSettings.AllKeys)
-                {
-                    // Create a new appSetting node
-                    XmlElement appNode = configXmlDocument.CreateElement("add");
-
-                    // Create the key attribute and assign its value
-                    XmlAttribute keyAttribute = configXmlDocument.CreateAttribute("key");
-                    keyAttribute.Value = key;
-
-                    // Create the value attribute and assign its value
-                    XmlAttribute valueAttribute = configXmlDocument.CreateAttribute("value");
-                    valueAttribute.Value = AppSettings[key];
-
-                    // Append the key and value attribute to the appSetting node
-                    appNode.Attributes.Append(keyAttribute);
-                    appNode.Attributes.Append(valueAttribute);
-
-                    // Append the appSetting node to the appSettings node
-                    node.AppendChild(appNode);
-                }
-            }
-
-            // Save config file
-            configXmlDocument.Save(ConfigurationManager.configurationFile);
-        }
-    }
-}

=== modified file 'MySql.Data/Tests/Source/ConnectionStringBuilder.cs'
--- a/MySql.Data/Tests/Source/ConnectionStringBuilder.cs	2011-03-03 17:57:57 +0000
+++ b/MySql.Data/Tests/Source/ConnectionStringBuilder.cs	2011-05-10 23:36:53 +0000
@@ -24,6 +24,8 @@
 using System.Data;
 using System.IO;
 using NUnit.Framework;
+using System.Configuration;
+using MySql.Data.Common;
 
 namespace MySql.Data.MySqlClient.Tests
 {
@@ -115,5 +117,14 @@
             Assert.IsFalse(s.ContainsKey("badkey"));
         }
 #endif
+
+        [Test]
+        [ExpectedException(typeof(ArgumentException))]
+        public void SettingInvalidKeyThrowsArgumentException()
+        {
+            MySqlConnectionStringBuilder s = new MySqlConnectionStringBuilder();
+            s["foo keyword"] = "foo";
+        }
+
     }
 }

=== removed directory 'MySql.Data/Tests/Source/Tester'
=== removed file 'MySql.Data/Tests/Source/Tester/TestClasses.cs'
--- a/MySql.Data/Tests/Source/Tester/TestClasses.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Data/Tests/Source/Tester/TestClasses.cs	1970-01-01 00:00:00 +0000
@@ -1,153 +0,0 @@
-// Copyright (c) 2004-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
-//
-// MySQL Connector/NET is licensed under the terms of the GPLv2
-// <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most 
-// MySQL Connectors. There are special exceptions to the terms and 
-// conditions of the GPLv2 as it is applied to this software, see the 
-// FLOSS License Exception
-// <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
-//
-// This program is free software; you can redistribute it and/or modify 
-// it under the terms of the GNU General Public License as published 
-// by the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful, but 
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
-// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
-// for more details.
-//
-// You should have received a copy of the GNU General Public License along 
-// with this program; if not, write to the Free Software Foundation, Inc., 
-// 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace NUnit.Framework
-{
-    class TestFixtureAttribute : Attribute
-    {
-    }
-
-    class TearDownAttribute : Attribute
-    {
-    }
-
-    class TestFixtureSetUpAttribute : Attribute
-    {
-    }
-
-    class TestFixtureTearDownAttribute : Attribute
-    {
-    }
-
-    class SetUpAttribute : Attribute
-    {
-    }
-
-    class TestAttribute : Attribute
-    {
-    }
-
-    class Assert
-    {
-        public static void Fail(string message)
-        {
-            throw new Exception(message);
-        }
-
-        public static void AreEqual(object expected, object value, string msg)
-        {
-            try
-            {
-                if (expected is UInt64)
-                {
-                    ulong lValue = Convert.ToUInt64(value);
-                    if (!expected.Equals(lValue))
-                        throw new Exception(msg);
-                }
-                else
-                {
-                    long iExpected = Convert.ToInt64(expected);
-                    long iValue = Convert.ToInt64(value);
-                    if (iExpected != iValue)
-                        throw new Exception(msg);
-                }
-            }
-            catch (Exception ex)
-            {
-                if (ex is InvalidCastException ||
-                    ex is FormatException)
-                {
-                    if (!expected.Equals(value))
-                        throw new Exception(msg);
-                }
-                else
-                    throw new Exception(msg);
-            }
-
-            /*            if (expected is string)
-                        {
-                            if (expected.ToString() != value.ToString())
-                                throw new Exception(msg);
-                        }
-                        else if (expected is DateTime)
-                        {
-                            if (!expected.Equals(value))
-                                throw new Exception(msg);
-                        }
-                        else*/
-        }
-
-        public static void AreEqual(object expected, object value)
-        {
-            AreEqual(expected, value, null);
-        }
-
-        public static void IsTrue(bool value, string msg)
-        {
-            if (!value)
-                throw new Exception(msg);
-        }
-
-        public static void IsTrue(bool value)
-        {
-            IsTrue(value, "Value should be true");
-        }
-
-        public static void IsFalse(bool value, string msg)
-        {
-            if (value)
-                throw new Exception(msg);
-        }
-
-        public static void IsFalse(bool value)
-        {
-            IsFalse(value, "Value should be false");
-        }
-
-        public static void IsNull(object value, string msg)
-        {
-            if (value != null)
-                throw new Exception(msg);
-        }
-
-        public static void IsNull(object value)
-        {
-            IsNull(value, "Should be null");
-        }
-
-        public static void IsNotNull(object value, string msg)
-        {
-            if (value == null)
-                throw new Exception(msg);
-        }
-
-        public static void IsNotNull(object value)
-        {
-            IsNotNull(value, "Should not be null");
-        }
-
-    }
-}

=== removed file 'MySql.Data/Tests/Source/Tester/TestRunner.cs'
--- a/MySql.Data/Tests/Source/Tester/TestRunner.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Data/Tests/Source/Tester/TestRunner.cs	1970-01-01 00:00:00 +0000
@@ -1,202 +0,0 @@
-// Copyright (c) 2004-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
-//
-// MySQL Connector/NET is licensed under the terms of the GPLv2
-// <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most 
-// MySQL Connectors. There are special exceptions to the terms and 
-// conditions of the GPLv2 as it is applied to this software, see the 
-// FLOSS License Exception
-// <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
-//
-// This program is free software; you can redistribute it and/or modify 
-// it under the terms of the GNU General Public License as published 
-// by the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful, but 
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
-// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
-// for more details.
-//
-// You should have received a copy of the GNU General Public License along 
-// with this program; if not, write to the Free Software Foundation, Inc., 
-// 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-
-using System;
-using System.Reflection;
-using NUnit.Framework;
-using System.Collections;
-
-namespace MySql.Data.MySqlClient.Tests
-{
-    public class TestRunner
-    {
-        private ArrayList tests = new ArrayList();
-
-        public event EventHandler FixtureStarted;
-        public event EventHandler FixtureDone;
-        public event EventHandler TestStarted;
-        public event EventHandler TestDone;
-
-        public  ArrayList LoadTests()
-        {
-            Assembly me = Assembly.GetExecutingAssembly();
-
-            Type[] types = me.GetTypes();
-
-            foreach (Type t in types)
-            {
-                object[] o = t.GetCustomAttributes(typeof(TestFixtureAttribute), false);
-                if (o == null || o.Length == 0) continue;
-
-                TestCollection tc = new TestCollection();
-                tc.name = t.Name;
-                tc.fixtureType = t;
-
-                FindMethods(t, tc);
-                if (tc.testMethods.Count > 0)
-                    tests.Add(tc);
-            }
-            return tests;
-        }
-
-        private void FindMethods(Type t, TestCollection tc)
-        {
-            // now get all the methods on the fixture
-            MethodInfo[] methods = t.GetMethods(
-                BindingFlags.Public | BindingFlags.NonPublic |
-                BindingFlags.Instance);
-
-            // if there is a fixture setup routine, invoke it
-            foreach (MethodInfo mi in methods)
-            {
-                if (mi.IsPrivate) continue;
-
-                object[] attr = mi.GetCustomAttributes(true);
-
-                foreach (Attribute a in attr)
-                {
-                    if (a is TestFixtureSetUpAttribute)
-                        tc.classSetup = mi;
-                    else if (a is TestFixtureTearDownAttribute)
-                        tc.classTeardown = mi;
-                    else if (a is SetUpAttribute)
-                        tc.setup = mi;
-                    else if (a is TearDownAttribute)
-                        tc.tearDown = mi;
-                    else if (a is TestAttribute)
-                    {
-                        TestMethod tm = new TestMethod();
-                        tm.member = mi;
-                        tc.testMethods.Add(tm);
-                    }
-                }
-            }
-        }
-
-        public void StartFixture(TestCollection tc)
-        {
-            try
-            {
-                if (tc.fixture == null)

-                    tc.fixture = Activator.CreateInstance(tc.fixtureType);
-
-                if (tc.classSetup != null)
-                    tc.classSetup.Invoke(tc.fixture, null);
-            }
-            catch (Exception ex)
-            {
-                tc.message = ex.Message;
-                tc.stack = ex.StackTrace;
-                throw;
-            }
-        }
-
-        public void EndFixture(TestCollection tc)
-        {
-            try
-            {
-                if (tc.classTeardown != null)
-                    tc.classTeardown.Invoke(tc.fixture, null);
-            }
-            catch (Exception ex)
-            {
-                tc.message = ex.Message;
-                tc.stack = ex.StackTrace;
-                throw;
-            }
-        }
-
-        public bool RunTest(int fixtureIndex, int methodIndex)
-        {
-            TestCollection tc = (TestCollection)tests[fixtureIndex];
-            TestMethod tm = (TestMethod)tc.testMethods[methodIndex];
-            try
-            {
-                if (tc.setup != null)
-                    tc.setup.Invoke(tc.fixture, null);
-
-                tm.member.Invoke(tc.fixture, null);
-
-                if (tc.tearDown != null)
-                    tc.tearDown.Invoke(tc.fixture, null);
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                tm.message = ex.Message;
-                tm.stack = ex.StackTrace;
-                return false;
-            }
-        }
-
-        private void OnTestDone()
-        {
-            if (TestDone != null)
-                TestDone(this, null);
-        }
-
-        private void OnTestStarted()
-        {
-            if (TestStarted != null)
-                TestStarted(this, null);
-        }
-
-        private void OnFixtureStated()
-        {
-            if (FixtureStarted != null)
-                FixtureStarted(this, null);
-        }
-
-        private void OnFixtureDone()
-        {
-            if (FixtureDone != null)
-                FixtureDone(this, null);
-        }
-    }
-
-    public class TestCollection
-    {
-        public string name;
-        public ArrayList testMethods;
-        public MethodInfo classSetup;
-        public MethodInfo classTeardown;
-        public MethodInfo setup;
-        public MethodInfo tearDown;
-        public object fixture;
-        public Type fixtureType;
-        public string message;
-        public string stack;
-
-        public TestCollection()
-        {
-            testMethods = new ArrayList();
-        }
-    }
-
-    public class TestMethod
-    {
-        public MethodInfo member;
-        public string message;
-        public string stack;
-    }
-}

=== modified file 'MySql.Data/Tests/Source/Transactions.cs'
--- a/MySql.Data/Tests/Source/Transactions.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Data/Tests/Source/Transactions.cs	2011-05-10 23:36:53 +0000
@@ -26,6 +26,8 @@
 using NUnit.Framework;
 using System.Transactions;
 using System.Data.Common;
+using System.Diagnostics;
+using System.Text;
 
 namespace MySql.Data.MySqlClient.Tests
 {
@@ -422,5 +424,157 @@
             ReusingSameConnection(false, false);
       //      Assert.AreEqual(processes + 1, CountProcesses());
         }
+
+        /// <summary>
+        /// Ensures that a commit after heavy ammount of inserts does not timeout.
+        /// </summary>
+        [Test]
+        public void CommitDoesNotTimeout()
+        {
+            const int requiredNumberOfRuns = 1;
+            const int binarySize = 5000000;
+            const int requiredNumberOfRowsPerRun = 100;
+
+            Debug.WriteLine("Required Number Of Runs :" + requiredNumberOfRuns);
+            Debug.WriteLine("Required Number Of Rows Per Run :" + requiredNumberOfRowsPerRun);
+
+            suExecSQL("SET GLOBAL max_allowed_packet=64000000");
+
+            MySqlConnectionStringBuilder builder = new MySqlConnectionStringBuilder();
+
+            using (MySqlConnection connection = new MySqlConnection(GetConnectionString(true)))
+            {
+                connection.Open();
+
+                using (MySqlCommand command = new MySqlCommand())
+                {
+                    command.Connection = connection;
+                    command.CommandType = CommandType.Text;
+                    command.CommandText = "DROP TABLE IF EXISTS test_timeout;";
+                    command.ExecuteNonQuery();
+
+                    StringBuilder sqlCommand = new StringBuilder(512);
+
+                    sqlCommand.Append("CREATE TABLE test_timeout (");
+                    sqlCommand.Append("identity INT NOT NULL auto_increment, ");
+                    sqlCommand.Append("a INT NOT NULL, ");
+                    sqlCommand.Append("b INT NOT NULL, ");
+                    sqlCommand.Append("c INT NOT NULL, ");
+                    sqlCommand.Append("binary_data LONGBLOB NOT NULL, ");
+                    sqlCommand.Append("PRIMARY KEY(identity), ");
+                    sqlCommand.Append("KEY `abc` (`a`,`b`, `c`) ");
+                    sqlCommand.Append(") TYPE = INNODB");
+
+                    command.CommandText = sqlCommand.ToString();
+                    command.ExecuteNonQuery();
+                }
+
+                for (int numberOfRuns = 0; numberOfRuns < requiredNumberOfRuns; ++numberOfRuns)
+                {
+                    using (MySqlTransaction transaction = connection.BeginTransaction())
+                    {
+                        Stopwatch stopwatch = Stopwatch.StartNew();
+
+                        using (MySqlCommand command = new MySqlCommand())
+                        {
+                            command.Connection = connection;
+                            command.CommandText = "INSERT INTO test_timeout VALUES (?f1, ?f2, ?f3, ?f4, ?f5)";
+                            command.Parameters.Add("?f1", MySqlDbType.Int32);
+                            command.Parameters.Add("?f2", MySqlDbType.Int32);
+                            command.Parameters.Add("?f3", MySqlDbType.Int32);
+                            command.Parameters.Add("?f4", MySqlDbType.Int32);
+                            command.Parameters.Add("?f5", MySqlDbType.LongBlob);
+                            command.CommandTimeout = 0;
+                            command.Prepare();
+
+
+                            byte[] buffer;
+
+                            using (MemoryStream stream = new MemoryStream())
+                            {
+                                using (BinaryWriter binary = new BinaryWriter(stream))
+                                {
+                                    int count = 0;
+
+                                    while (stream.Position < binarySize)
+                                    {
+                                        binary.Write(++count);
+                                    }
+                                }
+
+                                buffer = stream.ToArray();
+                            }
+
+                            for (int i = 0; i < requiredNumberOfRowsPerRun; ++i)
+                            {
+                                command.Parameters[1].Value = i;
+                                command.Parameters[2].Value = i;
+                                command.Parameters[3].Value = i;
+                                command.Parameters[4].Value = buffer;
+                                command.ExecuteNonQuery();
+                            }
+                        }
+
+                        transaction.Commit();
+
+                        Assert.IsNotNull(transaction);
+
+                        stopwatch.Stop();
+
+                        double seconds = stopwatch.Elapsed.TotalSeconds;
+                        double recordsPerSecond = requiredNumberOfRowsPerRun / seconds;
+
+                        StringBuilder sb = new StringBuilder();
+                        sb.AppendFormat("Truncate Result : Insert {0} Took {1:F4}; Per Second {2:F1} ",
+                        requiredNumberOfRowsPerRun, seconds, recordsPerSecond);
+
+                        Debug.WriteLine(sb.ToString());
+                    }
+
+                    using (MySqlCommand command = new MySqlCommand())
+                    {
+                        command.Connection = connection;
+                        command.CommandText = "SELECT * FROM test_timeout";
+
+                        Stopwatch stopwatch = Stopwatch.StartNew();
+                        int count = 0;
+
+                        using (MySqlDataReader reader = command.ExecuteReader())
+                        {
+                            int previous = -1;
+
+                            while (reader.Read())
+                            {
+                                int current = reader.GetInt32(0);
+                                Assert.Greater(current, previous);
+                                previous = current;
+
+                                ++count;
+                            }
+                        }
+
+                        stopwatch.Stop();
+
+                        double seconds = stopwatch.Elapsed.TotalSeconds;
+                        double recordsPerSecond = count / seconds;
+
+                        StringBuilder sb = new StringBuilder();
+                        sb.AppendFormat("Test Result : Select {0} Took {1:F4}; Per Second {2:F1} ",
+                        count, seconds, recordsPerSecond);
+
+                        Debug.WriteLine(sb.ToString());
+                    }
+
+                    using (MySqlCommand command = new MySqlCommand())
+                    {
+                        command.Connection = connection;
+                        command.CommandText = "TRUNCATE TABLE test_timeout";
+                        command.ExecuteNonQuery();
+                    }
+                }
+
+                MySqlConnection.ClearPool(connection);
+            }
+        }
     }
 }

=== modified file 'MySql.Web/Providers/Source/SchemaManager.cs'
--- a/MySql.Web/Providers/Source/SchemaManager.cs	2010-08-18 19:03:33 +0000
+++ b/MySql.Web/Providers/Source/SchemaManager.cs	2011-05-10 23:36:53 +0000
@@ -53,12 +53,12 @@
         }
 
         internal static void CheckSchema(string connectionString, NameValueCollection config)
-        {
+        {            
+            int ver = GetSchemaVersion(connectionString);
+            if (ver == Version) return;
+
             try
             {
-                int ver = GetSchemaVersion(connectionString);
-                if (ver == Version) return;
-
                 if (String.Compare(config["autogenerateschema"], "true", true) == 0)
                     UpgradeToCurrent(connectionString, ver);
                 else

=== modified file 'MySql.Web/Tests/SchemaTests.cs'
--- a/MySql.Web/Tests/SchemaTests.cs	2011-04-27 18:48:02 +0000
+++ b/MySql.Web/Tests/SchemaTests.cs	2011-05-10 23:36:53 +0000
@@ -35,6 +35,7 @@
 using System.Configuration.Provider;
 using System.Web.Security;
 using MySql.Web.Common;
+using System.Configuration;
 
 namespace MySql.Web.Tests
 {
@@ -298,5 +299,22 @@
                 }
             }
         }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentException))]
+        public void InitializeInvalidConnStringThrowsArgumentException()
+        {
+            Configuration configFile = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
+            string fakeConnectionString = configFile.ConnectionStrings.ConnectionStrings["LocalMySqlServer"].ConnectionString.Replace("database", "fooKey");
+            configFile.ConnectionStrings.ConnectionStrings["LocalMySqlServer"].ConnectionString = fakeConnectionString;
+            configFile.Save();
+            ConfigurationManager.RefreshSection("connectionStrings");
+
+            MySQLMembershipProvider provider = new MySQLMembershipProvider();
+            NameValueCollection config = new NameValueCollection();
+            config.Add("connectionStringName", "LocalMySqlServer");
+
+            provider.Initialize(null, config);
+        }
     }
 }

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-6.1 branch (julio.casal:886) Julio Casal11 May