Modified:
branches/5.1/CHANGES
branches/5.1/Driver/Source/parameter.cs
branches/5.1/TestSuite/Source/ParameterTests.cs
Log:
fixed problem where old code was preventing creating parameter objects with non-input
direction using just a constructor (Bug #32093)
Modified: branches/5.1/CHANGES
===================================================================
--- branches/5.1/CHANGES 2007-11-05 18:16:21 UTC (rev 1064)
+++ branches/5.1/CHANGES 2007-11-05 18:21:09 UTC (rev 1065)
@@ -98,7 +98,9 @@
- fixed MySqlDateTime.ToString() to properly return the date value (Bug #32010)
- fixed problem where string parameters who have their size set after their value could
cause exceptions
(Bug #32094)
-
+ - fixed problem where old code was preventing creating parameter objects with non-input
direction using
+ just a constructor (Bug #32093)
+
Version 5.0.8 8/16/2007
Bug #28706 Log messages are truncated
- Fixed a problem with compression over a network. We were letting the inflate stream
read
Modified: branches/5.1/Driver/Source/parameter.cs
===================================================================
--- branches/5.1/Driver/Source/parameter.cs 2007-11-05 18:16:21 UTC (rev 1064)
+++ branches/5.1/Driver/Source/parameter.cs 2007-11-05 18:21:09 UTC (rev 1065)
@@ -121,8 +121,6 @@
DataRowVersion ver, object val)
: this(name, type)
{
- if (direction != ParameterDirection.Input)
- throw new ArgumentException("Only input parameters are supported by
MySql");
direction = dir;
sourceColumn = col;
sourceVersion = ver;
@@ -149,9 +147,6 @@
object value)
: this(parameterName, dbType, size, sourceColumn)
{
- if (direction != ParameterDirection.Input)
- throw new ArgumentException("Only input parameters are supported by
MySql");
-
this.direction = direction;
this.sourceVersion = sourceVersion;
Value = value;
Modified: branches/5.1/TestSuite/Source/ParameterTests.cs
===================================================================
--- branches/5.1/TestSuite/Source/ParameterTests.cs 2007-11-05 18:16:21 UTC (rev 1064)
+++ branches/5.1/TestSuite/Source/ParameterTests.cs 2007-11-05 18:21:09 UTC (rev 1065)
@@ -553,5 +553,20 @@
da.Fill(dt);
Assert.AreEqual("1234567890", dt.Rows[1][0]);
}
+
+ /// <summary>
+ /// Bug #32093 MySqlParameter Constructor does not allow Direction of anything
other than Input
+ /// </summary>
+ [Test]
+ public void NonInputParametersToCtor()
+ {
+ MySqlParameter p = new MySqlParameter("?p1", MySqlDbType.VarChar, 20,
+ ParameterDirection.InputOutput, true, 0, 0, "id", DataRowVersion.Current,
0);
+ Assert.AreEqual(ParameterDirection.InputOutput, p.Direction);
+
+ MySqlParameter p1 = new MySqlParameter("?p1", MySqlDbType.VarChar, 20,
+ ParameterDirection.Output, true, 0, 0, "id", DataRowVersion.Current, 0);
+ Assert.AreEqual(ParameterDirection.Output, p1.Direction);
+ }
}
}
| Thread |
|---|
| • Connector/NET commit: r1065 - in branches/5.1: . Driver/Source TestSuite/Source | rburnett | 5 Nov |