From: Date: September 9 2008 9:12pm Subject: Connector/NET commit: r1409 - in branches/5.2: . MySql.VisualStudio/Descriptors MySql.VisualStudio/Enumerators List-Archive: http://lists.mysql.com/commits/53643 X-Bug: 39252 Message-Id: <200809091912.m89JCZqJ004826@bk-internal.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified: branches/5.2/CHANGES branches/5.2/MySql.VisualStudio/Descriptors/StoredProcParameterDescriptor.cs branches/5.2/MySql.VisualStudio/Enumerators/StoredProcedureColumnEnumerator.cs Log: - fixed problem where using a stored procedure with parameters with a table adapter was no longer working after our parameter schema changes (bug #39252) Modified: branches/5.2/CHANGES =================================================================== --- branches/5.2/CHANGES 2008-09-08 18:50:51 UTC (rev 1408) +++ branches/5.2/CHANGES 2008-09-09 19:12:35 UTC (rev 1409) @@ -9,6 +9,8 @@ as of 1.9.1 did not support the methods needed for hashed passwords (bug #38895) - fixed problem where negative time values with a zero hour would return as postive values (bug #39294) +- fixed problem where using a stored procedure with parameters with a table adapter + was no longer working after our parameter schema changes (bug #39252) Version 5.2.3 - 8/14/08 - Increased the speed of MySqlDataReader.GetOrdinal dramatically by using a couple Modified: branches/5.2/MySql.VisualStudio/Descriptors/StoredProcParameterDescriptor.cs =================================================================== --- branches/5.2/MySql.VisualStudio/Descriptors/StoredProcParameterDescriptor.cs 2008-09-08 18:50:51 UTC (rev 1408) +++ branches/5.2/MySql.VisualStudio/Descriptors/StoredProcParameterDescriptor.cs 2008-09-09 19:12:35 UTC (rev 1409) @@ -90,13 +90,13 @@ public static new class Attributes { [Field(FieldType = TypeCode.String)] - public const string Database = "ROUTINE_CATALOG"; + public const string Database = "SPECIFIC_CATALOG"; [Identifier(IsSchema = true)] [Field(FieldType = TypeCode.String)] - public const string Schema = "ROUTINE_SCHEMA"; + public const string Schema = "SPECIFIC_SCHEMA"; [Identifier] [Field(FieldType = TypeCode.String)] - public const string RoutineName = "ROUTINE_NAME"; + public const string RoutineName = "SPECIFIC_NAME"; [Identifier] [Field(FieldType = TypeCode.String)] public const string RoutineType = "ROUTINE_TYPE"; @@ -107,14 +107,10 @@ public const string OrdinalPosition = "ORDINAL_POSITION"; [Field(FieldType = TypeCode.String)] public const string Mode = "PARAMETER_MODE"; - [Field(FieldType = TypeCode.Boolean)] - public const string IsResult = "IS_RESULT"; [Field(FieldType = TypeCode.String)] public const string DataType = "DATA_TYPE"; [Field(FieldType = TypeCode.String)] - public const string Flags = "FLAGS"; - [Field(FieldType = TypeCode.String)] - public const string CharacterSet = "CHARACTER_SET"; + public const string CharacterSet = "CHARACTER_SET_NAME"; [Field(FieldType = TypeCode.Int64)] public const string CharacterMaxLength = "CHARACTER_MAXIMUM_LENGTH"; [Field(FieldType = TypeCode.Int64)] Modified: branches/5.2/MySql.VisualStudio/Enumerators/StoredProcedureColumnEnumerator.cs =================================================================== --- branches/5.2/MySql.VisualStudio/Enumerators/StoredProcedureColumnEnumerator.cs 2008-09-08 18:50:51 UTC (rev 1408) +++ branches/5.2/MySql.VisualStudio/Enumerators/StoredProcedureColumnEnumerator.cs 2008-09-09 19:12:35 UTC (rev 1409) @@ -45,7 +45,7 @@ foreach (DataRow row in parmTable.Rows) { - if (row["IS_RESULT"].Equals("YES")) continue; + if (row["ORDINAL_POSITION"].Equals(0)) continue; DbParameter p = cmd.CreateParameter(); p.ParameterName = row["PARAMETER_NAME"].ToString(); @@ -56,10 +56,14 @@ using (IDataReader reader = cmd.ExecuteReader(CommandBehavior.SchemaOnly)) { DataTable dt = reader.GetSchemaTable(); - dt.Columns.Add(new DataColumn("RoutineName", typeof(string))); foreach (DataRow row in dt.Rows) + { row["RoutineName"] = restrictions[2]; + string basedb = row["BaseSchemaName"] as string; + if (String.IsNullOrEmpty(basedb) || row["BaseSchemaName"] == DBNull.Value) + row["BaseSchemaName"] = cmd.Connection.Database; + } return new AdoDotNetDataTableReader(dt); }