List:Commits« Previous MessageNext Message »
From:rburnett Date:November 8 2007 3:07pm
Subject:Connector/NET commit: r1088 - in branches/5.1: Driver/Source TestSuite/Source
View as plain text  
Modified:
   branches/5.1/Driver/Source/Connection.cs
   branches/5.1/Driver/Source/Field.cs
   branches/5.1/Driver/Source/SchemaProvider.cs
   branches/5.1/TestSuite/Source/DataTypeTests.cs
Log:
fixed a few simple test failures

Modified: branches/5.1/Driver/Source/Connection.cs
===================================================================
--- branches/5.1/Driver/Source/Connection.cs	2007-11-07 17:35:26 UTC (rev 1087)
+++ branches/5.1/Driver/Source/Connection.cs	2007-11-08 15:07:33 UTC (rev 1088)
@@ -397,14 +397,14 @@
         /// <include file='docs/MySqlConnection.xml' path='docs/ChangeDatabase/*'/>
         public override void ChangeDatabase(string databaseName)
         {
-            if (database == null || database.Trim().Length == 0)
-                throw new ArgumentException(Resources.ParameterIsInvalid, "database");
+            if (databaseName == null || databaseName.Trim().Length == 0)
+                throw new ArgumentException(Resources.ParameterIsInvalid, "databaseName");
 
             if (State != ConnectionState.Open)
                 throw new InvalidOperationException(Resources.ConnectionNotOpen);
 
-            driver.SetDatabase(database);
-            this.database = database;
+            driver.SetDatabase(databaseName);
+            this.database = databaseName;
         }
 
         internal void SetState(ConnectionState newConnectionState, bool broadcast)
@@ -657,13 +657,14 @@
         /// <returns>A <see cref="DataTable"/> that contains schema information.</returns>
         public override DataTable GetSchema(string collectionName, string[] restrictionValues)
         {
-/*            string msg = String.Format("collection = {0}", collectionName);
-            foreach (string s in restrictionValues)
-            {
-                msg += String.Format(" res={0}", s);
-            }
-            MessageBox.Show(msg);
-  */
+/*            string msg = String.Format("collection name2 = {0}", collectionName);
+            if (restrictionValues != null)
+                foreach (string s in restrictionValues)
+                {
+                    msg += String.Format(" res={0}", s);
+                }
+            System.Windows.Forms.MessageBox.Show(msg);
+            */
             if (collectionName == null)
                 collectionName = SchemaProvider.MetaCollection;
 

Modified: branches/5.1/Driver/Source/Field.cs
===================================================================
--- branches/5.1/Driver/Source/Field.cs	2007-11-07 17:35:26 UTC (rev 1087)
+++ branches/5.1/Driver/Source/Field.cs	2007-11-08 15:07:33 UTC (rev 1088)
@@ -278,7 +278,7 @@
         public IMySqlValue GetValueObject()
         {
             IMySqlValue v = GetIMySqlValue(Type);
-            if (v is MySqlByte && ColumnLength == 1)
+            if (v is MySqlByte && ColumnLength == 1 && MaxLength == 0)
             {
                 MySqlByte b = (MySqlByte)v;
                 b.TreatAsBoolean = true;

Modified: branches/5.1/Driver/Source/SchemaProvider.cs
===================================================================
--- branches/5.1/Driver/Source/SchemaProvider.cs	2007-11-07 17:35:26 UTC (rev 1087)
+++ branches/5.1/Driver/Source/SchemaProvider.cs	2007-11-08 15:07:33 UTC (rev 1088)
@@ -582,19 +582,19 @@
             row["DataSourceProductName"] = "MySQL";
 			row["DataSourceProductVersion"] = connection.ServerVersion;
             row["DataSourceProductVersionNormalized"] = ver;
-            row["GroupByBehavior"] = GroupByBehavior.Unknown;
+            row["GroupByBehavior"] = GroupByBehavior.Unrelated;
             row["IdentifierPattern"] =
-                @"(^\[\p{Lo}\p{Lu}\p{Ll}_@#][\p{Lo}\p{Lu}\p{Ll}\p{Nd}@$#_]*$)|(^\[[^\]\0]|\]\]+\]$)|(^\""[^\""\0]|\""\""+\""$)";
+                @"(^\`\p{Lo}\p{Lu}\p{Ll}_@#][\p{Lo}\p{Lu}\p{Ll}\p{Nd}@$#_]*$)|(^\`[^\`\0]|\`\`+\`$)|(^\"" + [^\""\0]|\""\""+\""$)";
             row["IdentifierCase"] = IdentifierCase.Insensitive;
             row["OrderByColumnsInSelect"] = false;
             row["ParameterMarkerFormat"] = "{0}";
-            row["ParameterMarkerPattern"] = String.Format("{0}([A-Za-z0-9_$#]*)",
+            row["ParameterMarkerPattern"] = String.Format("({0}[A-Za-z0-9_$#]*)",
                                                           connection.Settings.UseOldSyntax ? "@" : "?");
             row["ParameterNameMaxLength"] = 128;
             row["ParameterNamePattern"] =
                 @"^[\p{Lo}\p{Lu}\p{Ll}\p{Lm}_@#][\p{Lo}\p{Lu}\p{Ll}\p{Lm}\p{Nd}\uff3f_@#\$]*(?=\s+|$)";
             row["QuotedIdentifierPattern"] = @"(([^\`]|\`\`)*)";
-            row["QuotedIdentifierCase"] = IdentifierCase.Insensitive;
+            row["QuotedIdentifierCase"] = IdentifierCase.Sensitive;
             row["StatementSeparatorPattern"] = ";";
             row["StringLiteralPattern"] = "'(([^']|'')*)'";
             row["SupportedJoinOperators"] = 15;

Modified: branches/5.1/TestSuite/Source/DataTypeTests.cs
===================================================================
--- branches/5.1/TestSuite/Source/DataTypeTests.cs	2007-11-07 17:35:26 UTC (rev 1087)
+++ branches/5.1/TestSuite/Source/DataTypeTests.cs	2007-11-08 15:07:33 UTC (rev 1088)
@@ -639,7 +639,7 @@
 				cmd.Prepare();
 				reader = cmd.ExecuteReader();
 				Assert.IsTrue(reader.Read());
-				Assert.AreEqual(true, reader[0]);
+				Assert.AreEqual(1, reader[0]);
 				Assert.AreEqual(2, reader[1]);
 				Assert.AreEqual(3, reader[2]);
 			}

Thread
Connector/NET commit: r1088 - in branches/5.1: Driver/Source TestSuite/Sourcerburnett8 Nov