Modified:
trunk/CHANGES
trunk/Driver/Source/Types/MySqlString.cs
trunk/VisualStudio/DataConnectionWrapper.cs
trunk/VisualStudio/Descriptors/EngineDescriptor.cs
Log:
Bug #28437 Query Builder missing tinytext columns
We were not submitting the correct data type information for text columns. We also needed to work around the stupid issue where all the columns for SHOW ENGINES are returned as binary.
Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES 2007-06-11 20:58:55 UTC (rev 756)
+++ trunk/CHANGES 2007-06-11 22:27:40 UTC (rev 757)
@@ -7,7 +7,8 @@
able to generate insert, update, and delete statements. (Bug #26347)
- Fixed problem preventing use of stored procedures for insert, update, and
delete statements in a table adapter.
-
+ - Fixed problem where text columns would not appear in the Visual Studio query builder (Bug #28437)
+
Version 5.1.1
- Fixed password property on MySqlConnectionStringBuilder to use PasswordPropertyText
attribute. This causes dots to show instead of actual password text.
Modified: trunk/Driver/Source/Types/MySqlString.cs
===================================================================
--- trunk/Driver/Source/Types/MySqlString.cs 2007-06-11 20:58:55 UTC (rev 756)
+++ trunk/Driver/Source/Types/MySqlString.cs 2007-06-11 22:27:40 UTC (rev 757)
@@ -130,9 +130,11 @@
internal static void SetDSInfo(DataTable dsTable)
{
- string[] types = new string[] { "CHAR", "VARCHAR", "SET", "ENUM" };
+ string[] types = new string[] { "CHAR", "VARCHAR", "SET", "ENUM",
+ "TINYTEXT", "TEXT", "MEDIUMTEXT", "LONGTEXT" };
MySqlDbType[] dbtype = new MySqlDbType[] { MySqlDbType.String,
- MySqlDbType.VarChar, MySqlDbType.Set, MySqlDbType.Enum };
+ MySqlDbType.VarChar, MySqlDbType.Set, MySqlDbType.Enum, MySqlDbType.TinyText,
+ MySqlDbType.Text, MySqlDbType.MediumText, MySqlDbType.LongText };
// we use name indexing because this method will only be called
// when GetSchema is called for the DataSourceInformation
Modified: trunk/VisualStudio/DataConnectionWrapper.cs
===================================================================
--- trunk/VisualStudio/DataConnectionWrapper.cs 2007-06-11 20:58:55 UTC (rev 756)
+++ trunk/VisualStudio/DataConnectionWrapper.cs 2007-06-11 22:27:40 UTC (rev 757)
@@ -831,6 +831,8 @@
// Extract values
string name = DataInterpreter.GetString(engine, EngineDescriptor.Attributes.Name);
SqlBoolean isSupported = DataInterpreter.GetSqlBool(engine, EngineDescriptor.Attributes.IsSupported);
+ if (engine["Support"].Equals("DISABLED"))
+ isSupported = false;
// Validate name
if (String.IsNullOrEmpty(name))
Modified: trunk/VisualStudio/Descriptors/EngineDescriptor.cs
===================================================================
--- trunk/VisualStudio/Descriptors/EngineDescriptor.cs 2007-06-11 20:58:55 UTC (rev 756)
+++ trunk/VisualStudio/Descriptors/EngineDescriptor.cs 2007-06-11 22:27:40 UTC (rev 757)
@@ -82,6 +82,30 @@
throw new ArgumentNullException("connection");
return ObjectDescriptor.EnumerateObjects(connection, TypeName, restrictions);
}
+
#endregion
+
+ protected override DataTable ReadTable(DataConnectionWrapper connection,
+ object[] restrictions, string sort)
+ {
+ DataTable dt = base.ReadTable(connection, restrictions, sort);
+
+ // stupid hack to work around the issue that show engines returns
+ // everything as byte[]
+ DataTable newDT = dt.Clone();
+ foreach (DataColumn column in newDT.Columns)
+ column.DataType = typeof(System.String);
+
+ Encoding e = Encoding.GetEncoding("latin1");
+ foreach (DataRow row in dt.Rows)
+ {
+ DataRow newRow = newDT.NewRow();
+ newRow[0] = e.GetString((byte[])row[0]);
+ newRow[1] = e.GetString((byte[])row[1]);
+ newRow[2] = e.GetString((byte[])row[2]);
+ newDT.Rows.Add(newRow);
+ }
+ return newDT;
+ }
}
}
| Thread |
|---|
| • Connector/NET commit: r757 - in trunk: . Driver/Source/Types VisualStudio VisualStudio/Descriptors | rburnett | 11 Jun |