Modified:
trunk/CHANGES
trunk/MySql.Data/Provider/Source/Types/MySqlBit.cs
trunk/MySql.Data/Provider/Source/parameter.cs
trunk/MySql.Data/Tests/Source/DataTypeTests.cs
trunk/MySql.Data/Tests/Source/PoolingTests.cs
trunk/MySql.Data/Tests/Source/Syntax.cs
Log:
merged
Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES 2008-04-24 14:02:20 UTC (rev 1258)
+++ trunk/CHANGES 2008-04-24 14:07:31 UTC (rev 1259)
@@ -56,7 +56,9 @@
- Fixed problem with connections staying open after being used with SqlDataSource.
The problem was that we were not returning an enumerator for our reader with the
closeReader option set to true when we were supposed to. (Bug #34460)
-
+ - Fixed problem where the bit data type would continue to return null values
+ once it saw a null value in a previous row (bug #36313)
+
Version 5.1.5 - 2/11/2008
- Fixed problem with membership provider where FindUserByEmail would fail trying to add
a second parameter with the same name as the first (bug #33347)
@@ -159,7 +161,7 @@
What this means is that passing in null as a database restriction will report
objects on the currently selected database only.
-Version 5.0.9
+Version 5.0.9 - 4/14/08
- Fixed problem where fields that were blobs but did not include the BLOB flag were treated
as binary when they should have been treated as text. (Bug #30233)
@@ -188,7 +190,9 @@
- added implementation of MySqlCommandBuilder methods QuoteIdentifier and UnquoteIdentifier
(bug #35492)
- some fixed to cancel and timeout operations so that they are more dependable
-
+ - fixed problem where cloning a parameter that has not yet had its type set would yeild
+ a cloned paramter that would no longer infer it's type from the value set
+
Version 5.0.8 8/16/2007
Bug #28706 Log messages are truncated
Modified: trunk/MySql.Data/Provider/Source/Types/MySqlBit.cs
===================================================================
--- trunk/MySql.Data/Provider/Source/Types/MySqlBit.cs 2008-04-24 14:02:20 UTC (rev 1258)
+++ trunk/MySql.Data/Provider/Source/Types/MySqlBit.cs 2008-04-24 14:07:31 UTC (rev 1259)
@@ -87,11 +87,9 @@
public IMySqlValue ReadValue(MySqlStream stream, long length, bool isNull)
{
- if (isNull)
- {
- this.isNull = true;
- return this;
- }
+ this.isNull = isNull;
+ if (isNull)
+ return this;
if (buffer == null)
buffer = new byte[8];
Modified: trunk/MySql.Data/Provider/Source/parameter.cs
===================================================================
--- trunk/MySql.Data/Provider/Source/parameter.cs 2008-04-24 14:02:20 UTC (rev 1258)
+++ trunk/MySql.Data/Provider/Source/parameter.cs 2008-04-24 14:07:31 UTC (rev 1259)
@@ -579,7 +579,9 @@
object ICloneable.Clone()
{
MySqlParameter clone = new MySqlParameter(paramName, mySqlDbType, direction,
- sourceColumn, sourceVersion, paramValue);
+ sourceColumn, sourceVersion, paramValue);
+ // if we have not had our type set yet then our clone should not either
+ clone.inferType = inferType;
return clone;
}
Modified: trunk/MySql.Data/Tests/Source/DataTypeTests.cs
===================================================================
--- trunk/MySql.Data/Tests/Source/DataTypeTests.cs 2008-04-24 14:02:20 UTC (rev 1258)
+++ trunk/MySql.Data/Tests/Source/DataTypeTests.cs 2008-04-24 14:07:31 UTC (rev 1259)
@@ -891,5 +891,43 @@
DataTable dt = new DataTable();
da.Fill(dt);
}
- }
+
+ /// <summary>
+ /// Bug #36313 BIT result is lost in the left outer join
+ /// </summary>
+ [Test]
+ public void BitInLeftOuterJoin()
+ {
+ execSQL("DROP TABLE IF EXISTS Main");
+ execSQL("DROP TABLE IF EXISTS Child");
+ execSQL(@"CREATE TABLE Main (Id int(10) unsigned NOT NULL AUTO_INCREMENT,
+ Descr varchar(45) NOT NULL, PRIMARY KEY (`Id`))
+ ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1");
+ execSQL(@"INSERT INTO Main (Id,Descr) VALUES (1,'AAA'), (2,'BBB'), (3, 'CCC')");
+
+ execSQL(@"CREATE TABLE Child (Id int(10) unsigned NOT NULL AUTO_INCREMENT,
+ MainId int(10) unsigned NOT NULL, Value int(10) unsigned NOT NULL,
+ Enabled bit(1) NOT NULL, PRIMARY KEY (`Id`))
+ ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1");
+ execSQL(@"INSERT INTO Child (Id, MainId, Value, Enabled) VALUES (1,2,12345,0x01)");
+
+ MySqlDataAdapter da = new MySqlDataAdapter(
+ @"SELECT m.Descr, c.Value, c.Enabled FROM Main m
+ LEFT OUTER JOIN Child c ON m.Id=c.MainId ORDER BY m.Descr", conn);
+ DataTable dt = new DataTable();
+ da.Fill(dt);
+ Assert.AreEqual(3, dt.Rows.Count);
+ Assert.AreEqual("AAA", dt.Rows[0][0]);
+ Assert.AreEqual("BBB", dt.Rows[1][0]);
+ Assert.AreEqual("CCC", dt.Rows[2][0]);
+
+ Assert.AreEqual(DBNull.Value, dt.Rows[0][1]);
+ Assert.AreEqual(12345, dt.Rows[1][1]);
+ Assert.AreEqual(DBNull.Value, dt.Rows[2][1]);
+
+ Assert.AreEqual(DBNull.Value, dt.Rows[0][2]);
+ Assert.AreEqual(1, dt.Rows[1][2]);
+ Assert.AreEqual(DBNull.Value, dt.Rows[2][2]);
+ }
+ }
}
Modified: trunk/MySql.Data/Tests/Source/PoolingTests.cs
===================================================================
--- trunk/MySql.Data/Tests/Source/PoolingTests.cs 2008-04-24 14:02:20 UTC (rev 1258)
+++ trunk/MySql.Data/Tests/Source/PoolingTests.cs 2008-04-24 14:07:31 UTC (rev 1259)
@@ -236,8 +236,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Modified: trunk/MySql.Data/Tests/Source/Syntax.cs
===================================================================
--- trunk/MySql.Data/Tests/Source/Syntax.cs 2008-04-24 14:02:20 UTC (rev 1258)
+++ trunk/MySql.Data/Tests/Source/Syntax.cs 2008-04-24 14:07:31 UTC (rev 1259)
@@ -436,12 +436,12 @@
DataTable dt = new DataTable();
da.Fill(dt);
- Assert.IsTrue(dt.Rows[0][0].GetType() == typeof(string));
- Assert.IsTrue(dt.Rows[0][1].GetType() == typeof(string));
- Assert.IsTrue(dt.Rows[0][2].GetType() == typeof(string));
- Assert.IsTrue(dt.Rows[0][3].GetType() == typeof(string));
- Assert.IsTrue(dt.Rows[0][4].GetType() == typeof(string));
- Assert.IsTrue(dt.Rows[0][5].GetType() == typeof(string));
+ Assert.IsTrue(dt.Columns[0].DataType == typeof(string));
+ Assert.IsTrue(dt.Columns[1].DataType == typeof(string));
+ Assert.IsTrue(dt.Columns[2].DataType == typeof(string));
+ Assert.IsTrue(dt.Columns[3].DataType == typeof(string));
+ Assert.IsTrue(dt.Columns[4].DataType == typeof(string));
+ Assert.IsTrue(dt.Columns[5].DataType == typeof(string));
}
[Test]
| Thread |
|---|
| • Connector/NET commit: r1259 - in trunk: . MySql.Data/Provider/Source MySql.Data/Provider/Source/Types MySql.Data/Tests/Source | rburnett | 24 Apr |