Modified:
branches/1.0/CHANGES
branches/1.0/TestSuite/StoredProcedure.cs
Log:
Bug #13590 ExecuteScalar returns only Int64 regardless of actual SQL type
This was not a connector bug but was a server bug that is fixed now. This patch is simply
adding a test case.
Modified: branches/1.0/CHANGES
===================================================================
--- branches/1.0/CHANGES 2006-05-22 16:27:26 UTC (rev 242)
+++ branches/1.0/CHANGES 2006-05-22 16:52:30 UTC (rev 243)
@@ -9,9 +9,9 @@
Bug #15077 Error MySqlCommandBuilder.DeriveParameters for sp without parameters.
[fixed]
Bug #16934 Unsigned values > 2^63 (UInt64) cannot be used in prepared statements
Bug #19515 DiscoverParameters fails on numeric datatype [fixed]
- Bug #17814 Stored procedure fails unless DbType set explicitly
- Bug #19294 IDataRecord.GetString method should return null for null values
-
+ Bug #17814 Stored procedure fails unless DbType set explicitly [fixed]
+ Bug #19294 IDataRecord.GetString method should return null for null values [fixed]
+ Bug #13590 ExecuteScalar returns only Int64 regardless of actual SQL type [added test
case]
x-xx-05 - Version 1.0.7
Bugs fixed or addressed
Modified: branches/1.0/TestSuite/StoredProcedure.cs
===================================================================
--- branches/1.0/TestSuite/StoredProcedure.cs 2006-05-22 16:27:26 UTC (rev 242)
+++ branches/1.0/TestSuite/StoredProcedure.cs 2006-05-22 16:52:30 UTC (rev 243)
@@ -239,7 +239,7 @@
}
}
- [Test()]
+ [Test]
[Category("5.0")]
public void ExecuteScalar()
{
@@ -257,6 +257,24 @@
Assert.AreEqual( "valuein", cmd.Parameters[1].Value );
}
+ /// <summary>
+ /// Bug #13590 ExecuteScalar returns only Int64 regardless of actual SQL type
+ /// </summary>
+ [Test]
+ [Category("5.0")]
+ public void ExecuteScalar2()
+ {
+ // create our procedure
+ execSQL("CREATE PROCEDURE spTest() " +
+ "BEGIN DECLARE myVar1 INT; SET myVar1 := 1; SELECT myVar1; END");
+
+ MySqlCommand cmd = new MySqlCommand("spTest", conn);
+ cmd.CommandType = CommandType.StoredProcedure;
+ object result = cmd.ExecuteScalar();
+ Assert.AreEqual(1, result);
+ Assert.IsTrue(result is Int32);
+ }
+
[Test()]
[Category("5.0")]
public void ExecuteReader()
| Thread |
|---|
| • Connector/NET commit: r243 - in branches/1.0: . TestSuite | rburnett | 22 May |