Modified:
branches/5.1/CHANGES
branches/5.1/Driver/Source/SchemaProvider.cs
Log:
- fixed index and index column schema collections that would fail if you specified the
any restrictions more specific than table name (bug #43991)
Modified: branches/5.1/CHANGES
===================================================================
--- branches/5.1/CHANGES 2009-03-31 18:50:33 UTC (rev 1538)
+++ branches/5.1/CHANGES 2009-03-31 19:38:16 UTC (rev 1539)
@@ -10,6 +10,11 @@
- fixed problem with datetime formatting that causes an extra space to be included between the
date and time when sent to the server (bug #41021)
- fixed "metadatacollections" collection to include foreign key columns
+ - fixed problem with execution of LOAD DATA LOCAL INFILE (which also affected MySqlBulkLoader).
+ When the driver encountered some type of error opening the local file for transport it would
+ still attempt to close the file which would yield a null reference exception (bug #43332)
+ - fixed index and index column schema collections that would fail if you specified the
+ any restrictions more specific than table name (bug #43991)
Version 5.1.7 - 8/20/08
- Fixed problem with DDEX provider that could sometimes prevent table altering when working with
Modified: branches/5.1/Driver/Source/SchemaProvider.cs
===================================================================
--- branches/5.1/Driver/Source/SchemaProvider.cs 2009-03-31 18:50:33 UTC (rev 1538)
+++ branches/5.1/Driver/Source/SchemaProvider.cs 2009-03-31 19:38:16 UTC (rev 1539)
@@ -256,7 +256,14 @@
dt.Columns.Add("UNIQUE", typeof (bool));
dt.Columns.Add("PRIMARY", typeof (bool));
- DataTable tables = GetTables(restrictions);
+ // Get the list of tables first
+ int max = restrictions == null ? 4 : restrictions.Length;
+ string[] tableRestrictions = new string[Math.Max(max, 4)];
+ if (restrictions != null)
+ restrictions.CopyTo(tableRestrictions, 0);
+ tableRestrictions[3] = "BASE TABLE";
+ DataTable tables = GetTables(tableRestrictions);
+
foreach (DataRow table in tables.Rows)
{
string sql = String.Format("SHOW INDEX FROM `{0}`.`{1}`",
@@ -295,9 +302,11 @@
dt.Columns.Add("COLUMN_NAME", typeof (string));
dt.Columns.Add("ORDINAL_POSITION", typeof (int));
-
- string[] tableRestrictions = new string[Math.Max(restrictions.Length, 4)];
- restrictions.CopyTo(tableRestrictions, 0);
+ // Get the list of tables first
+ int max = restrictions == null ? 4 : restrictions.Length;
+ string[] tableRestrictions = new string[Math.Max(max, 4)];
+ if (restrictions != null)
+ restrictions.CopyTo(tableRestrictions, 0);
tableRestrictions[3] = "BASE TABLE";
DataTable tables = GetTables(tableRestrictions);
@@ -544,7 +553,7 @@
DataTable dt = new DataTable("MetaDataCollections");
dt.Columns.Add(new DataColumn("CollectionName", typeof (string)));
- dt.Columns.Add(new DataColumn("NumberOfRestriction", typeof (int)));
+ dt.Columns.Add(new DataColumn("NumberOfRestrictions", typeof(int)));
dt.Columns.Add(new DataColumn("NumberOfIdentifierParts", typeof (int)));
FillTable(dt, collections);
| Thread |
|---|
| • Connector/NET commit: r1539 - in branches/5.1: . Driver/Source | rburnett | 31 Mar |