Modified:
branches/5.0/CHANGES
branches/5.0/Driver/Properties/AssemblyInfo.cs
branches/5.0/Driver/Source/SchemaProvider.cs
branches/5.0/Installer/main.wxs
branches/5.0/Release Notes.txt
branches/5.0/TestSuite/CommandBuilderTests.cs
branches/5.0/TestSuite/MySql.Data.Tests.2005.csproj
branches/5.0/TestSuite/Properties/AssemblyInfo.cs
Log:
SchemaProvider.cs - fixed some problems with retrieving schema columns from the server
that are returned as binary instead of as strings
TestSuite/CommandBuilderTests.cs - updated test related to selecting auto generated keys
from an insert built by the command builder
Rest of files related to bumping version from 5.0.4 to 5.0.5
Modified: branches/5.0/CHANGES
===================================================================
--- branches/5.0/CHANGES 2007-03-02 22:15:46 UTC (rev 627)
+++ branches/5.0/CHANGES 2007-03-06 03:26:38 UTC (rev 628)
@@ -1,11 +1,11 @@
-Version 5.0.5
+Version 5.0.5 3/5/2007
Bugs fixed
----------
Bug #25605 BINARY and VARBINARY is returned as a string
Bug #25569 UpdateRowSource.FirstReturnedRecord does not work
-Version 5.0.4 2-28-2007
+Version 5.0.4 *unreleased*
Bugs fixed
----------
Modified: branches/5.0/Driver/Properties/AssemblyInfo.cs
===================================================================
--- branches/5.0/Driver/Properties/AssemblyInfo.cs 2007-03-02 22:15:46 UTC (rev 627)
+++ branches/5.0/Driver/Properties/AssemblyInfo.cs 2007-03-06 03:26:38 UTC (rev 628)
@@ -50,7 +50,7 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("5.0.4")]
+[assembly: AssemblyVersion("5.0.5")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
Modified: branches/5.0/Driver/Source/SchemaProvider.cs
===================================================================
--- branches/5.0/Driver/Source/SchemaProvider.cs 2007-03-02 22:15:46 UTC (rev 627)
+++ branches/5.0/Driver/Source/SchemaProvider.cs 2007-03-06 03:26:38 UTC (rev 628)
@@ -292,26 +292,30 @@
{
string sql = String.Format("SHOW INDEX FROM `{0}`.`{1}`",
table["TABLE_SCHEMA"], table["TABLE_NAME"]);
- MySqlDataAdapter da = new MySqlDataAdapter(sql, connection);
- DataTable indexes = new DataTable();
- da.Fill(indexes);
- foreach (DataRow index in indexes.Rows)
+ MySqlCommand cmd = new MySqlCommand(sql, connection);
+ using (MySqlDataReader reader = cmd.ExecuteReader())
{
- if (restrictions != null)
+ while (reader.Read())
{
- if (restrictions.Length == 4 && restrictions[3] != null
&&
- !index["KEY_NAME"].Equals(restrictions[3])) continue;
- if (restrictions.Length == 5 && restrictions[4] != null
&&
- !index["COLUMN_NAME"].Equals(restrictions[4])) continue;
+ string key_name = GetString(reader,
reader.GetOrdinal("KEY_NAME"));
+ string col_name = GetString(reader,
reader.GetOrdinal("COLUMN_NAME"));
+
+ if (restrictions != null)
+ {
+ if (restrictions.Length == 4 && restrictions[3] !=
null &&
+ key_name != restrictions[3]) continue;
+ if (restrictions.Length == 5 && restrictions[4] !=
null &&
+ col_name != restrictions[4]) continue;
+ }
+ DataRow row = dt.NewRow();
+ row["INDEX_CATALOG"] = null;
+ row["INDEX_SCHEMA"] = table["TABLE_SCHEMA"];
+ row["INDEX_NAME"] = key_name;
+ row["TABLE_NAME"] = GetString(reader,
reader.GetOrdinal("TABLE"));
+ row["COLUMN_NAME"] = col_name;
+ row["ORDINAL_POSITION"] =
reader.GetValue(reader.GetOrdinal("SEQ_IN_INDEX"));
+ dt.Rows.Add(row);
}
- DataRow row = dt.NewRow();
- row["INDEX_CATALOG"] = null;
- row["INDEX_SCHEMA"] = table["TABLE_SCHEMA"];
- row["INDEX_NAME"] = index["KEY_NAME"];
- row["TABLE_NAME"] = index["TABLE"];
- row["COLUMN_NAME"] = index["COLUMN_NAME"];
- row["ORDINAL_POSITION"] = index["SEQ_IN_INDEX"];
- dt.Rows.Add(row);
}
}
@@ -718,28 +722,35 @@
row["TABLE_SCHEMA"] = restrictions[1];
row["TABLE_NAME"] = reader.GetString(0);
row["TABLE_TYPE"] = table_type;
- row["ENGINE"] = reader.GetString(1);
- row["VERSION"] = reader.GetString(2);
- row["ROW_FORMAT"] = reader.GetString(3);
- row["TABLE_ROWS"] = reader.GetInt64(4);
- row["AVG_ROW_LENGTH"] = reader.GetInt64(5);
- row["DATA_LENGTH"] = reader.GetInt64(6);
- row["MAX_DATA_LENGTH"] = reader.GetInt64(7);
- row["INDEX_LENGTH"] = reader.GetInt64(8);
- row["DATA_FREE"] = reader.GetInt64(9);
- row["AUTO_INCREMENT"] = reader.GetInt64(10);
- row["CREATE_TIME"] = reader.GetDateTime(11);
- row["UPDATE_TIME"] = reader.GetDateTime(12);
- row["CHECK_TIME"] = reader.GetDateTime(13);
- row["TABLE_COLLATION"] = reader.GetString(14);
- row["CHECKSUM"] = reader.GetInt64(15);
- row["CREATE_OPTIONS"] = reader.GetString(16);
- row["TABLE_COMMENT"] = reader.GetString(17);
+ row["ENGINE"] = GetString(reader, 1);
+ row["VERSION"] = reader.GetValue(2);
+ row["ROW_FORMAT"] = GetString(reader, 3);
+ row["TABLE_ROWS"] = reader.GetValue(4);
+ row["AVG_ROW_LENGTH"] = reader.GetValue(5);
+ row["DATA_LENGTH"] = reader.GetValue(6);
+ row["MAX_DATA_LENGTH"] = reader.GetValue(7);
+ row["INDEX_LENGTH"] = reader.GetValue(8);
+ row["DATA_FREE"] = reader.GetValue(9);
+ row["AUTO_INCREMENT"] = reader.GetValue(10);
+ row["CREATE_TIME"] = reader.GetValue(11);
+ row["UPDATE_TIME"] = reader.GetValue(12);
+ row["CHECK_TIME"] = reader.GetValue(13);
+ row["TABLE_COLLATION"] = GetString(reader, 14);
+ row["CHECKSUM"] = reader.GetValue(15);
+ row["CREATE_OPTIONS"] = GetString(reader, 16);
+ row["TABLE_COMMENT"] = GetString(reader, 17);
schemaTable.Rows.Add(row);
}
}
}
+ private string GetString(MySqlDataReader reader, int index)
+ {
+ if (reader.IsDBNull(index))
+ return null;
+ return reader.GetString(index);
+ }
+
protected virtual DataTable GetSchemaInternal(string collection, string[]
restrictions)
{
switch (collection)
Modified: branches/5.0/Installer/main.wxs
===================================================================
--- branches/5.0/Installer/main.wxs 2007-03-02 22:15:46 UTC (rev 627)
+++ branches/5.0/Installer/main.wxs 2007-03-06 03:26:38 UTC (rev 628)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<?define ProductVersion="5.0.4"?>
+<?define ProductVersion="5.0.5"?>
<?define ProductName="MySQL Connector Net $(var.ProductVersion)"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="5FD88490-011C-4df1-B886-F298D955171B" Name="$(var.ProductName)"
Manufacturer="MySQL" Version="$(var.ProductVersion)" Language="1033">
Modified: branches/5.0/Release Notes.txt
===================================================================
--- branches/5.0/Release Notes.txt 2007-03-02 22:15:46 UTC (rev 627)
+++ branches/5.0/Release Notes.txt 2007-03-06 03:26:38 UTC (rev 628)
@@ -1,7 +1,7 @@
-Connector/Net 5.0.4 Release Notes
+Connector/Net 5.0.5 Release Notes
------------------------------------
-Welcome to the release notes for Connector/Net 5.0.4.
+Welcome to the release notes for Connector/Net 5.0.5.
Important Changes
---------------------
@@ -32,3 +32,6 @@
to control access to the pool. This significantly reduces CPU time incurred while
waiting
on a connection to free and greatly simplifies the locking code involved.
+* MySqlCommandBuilder now includes a new property named ReturnGeneratedIdentifiers. This
property
+ when set to true will cause the command builder to generate a SELECT statement that
will
+ populate autogenerated fields.
\ No newline at end of file
Modified: branches/5.0/TestSuite/CommandBuilderTests.cs
===================================================================
--- branches/5.0/TestSuite/CommandBuilderTests.cs 2007-03-02 22:15:46 UTC (rev 627)
+++ branches/5.0/TestSuite/CommandBuilderTests.cs 2007-03-06 03:26:38 UTC (rev 628)
@@ -319,12 +319,14 @@
dt.Rows.Add(row);
da.Update(dt);
Assert.AreEqual(1, dt.Rows[0]["id"]);
+ Assert.AreEqual("Test", dt.Rows[0]["name"]);
row = dt.NewRow();
row["name"] = "Test2";
dt.Rows.Add(row);
da.Update(dt);
Assert.AreEqual(2, dt.Rows[1]["id"]);
+ Assert.AreEqual("Test2", dt.Rows[1]["name"]);
}
catch (Exception ex)
{
Modified: branches/5.0/TestSuite/MySql.Data.Tests.2005.csproj
===================================================================
--- branches/5.0/TestSuite/MySql.Data.Tests.2005.csproj 2007-03-02 22:15:46 UTC (rev 627)
+++ branches/5.0/TestSuite/MySql.Data.Tests.2005.csproj 2007-03-06 03:26:38 UTC (rev 628)
@@ -31,7 +31,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="nunit.framework, Version=2.2.9.0, Culture=neutral,
PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
+ <Reference Include="nunit.framework, Version=2.2.0.0, Culture=neutral,
PublicKeyToken=96d09a1eb7f44a77">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Program Files
(x86)\Mono-1.2.3.1\lib\mono\1.0\nunit.framework.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Data" />
Modified: branches/5.0/TestSuite/Properties/AssemblyInfo.cs
===================================================================
--- branches/5.0/TestSuite/Properties/AssemblyInfo.cs 2007-03-02 22:15:46 UTC (rev 627)
+++ branches/5.0/TestSuite/Properties/AssemblyInfo.cs 2007-03-06 03:26:38 UTC (rev 628)
@@ -46,7 +46,7 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("5.0.4")]
+[assembly: AssemblyVersion("5.0.5")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
| Thread |
|---|
| • Connector/NET commit: r628 - in branches/5.0: . Driver/Properties Driver/Source Installer TestSuite TestSuite/Properties | rburnett | 6 Mar |