Modified:
branches/5.0/CHANGES
branches/5.0/Driver/Source/parameter.cs
branches/5.0/TestSuite/StoredProcedure.cs
Log:
Bug #27093 Exception when using large values in IN UInt64 parameters
Fixed typo in parameter.cs where DbType.UInt64 was not being mapped to MySqlDbType.UInt64
Modified: branches/5.0/CHANGES
===================================================================
--- branches/5.0/CHANGES 2007-03-19 22:34:31 UTC (rev 638)
+++ branches/5.0/CHANGES 2007-03-20 13:41:21 UTC (rev 639)
@@ -5,6 +5,7 @@
Bug #27135 MySqlParameterCollection and parameters added with Insert Method
Bug #27253 Installer : Company info is different
Bug #27187 cmd.Parameters.RemoveAt("Id") will cause an error if the last item is
requested
+ Bug #27093 Exception when using large values in IN UInt64 parameters
Version 5.0.5 3/5/2007
Modified: branches/5.0/Driver/Source/parameter.cs
===================================================================
--- branches/5.0/Driver/Source/parameter.cs 2007-03-19 22:34:31 UTC (rev 638)
+++ branches/5.0/Driver/Source/parameter.cs 2007-03-20 13:41:21 UTC (rev 639)
@@ -436,7 +436,7 @@
case DbType.UInt32: mySqlDbType = MySqlDbType.UInt32; break;
case DbType.Int64: mySqlDbType = MySqlDbType.Int64; break;
- case DbType.UInt64: mySqlDbType = MySqlDbType.Int64; break;
+ case DbType.UInt64: mySqlDbType = MySqlDbType.UInt64; break;
case DbType.Decimal:
case DbType.Currency: mySqlDbType = MySqlDbType.Decimal; break;
Modified: branches/5.0/TestSuite/StoredProcedure.cs
===================================================================
--- branches/5.0/TestSuite/StoredProcedure.cs 2007-03-19 22:34:31 UTC (rev 638)
+++ branches/5.0/TestSuite/StoredProcedure.cs 2007-03-20 13:41:21 UTC (rev 639)
@@ -25,6 +25,7 @@
using System.Globalization;
using System.Threading;
using MySql.Data.Types;
+using System.Data.Common;
namespace MySql.Data.MySqlClient.Tests
{
@@ -1195,18 +1196,30 @@
}
/// <summary>
- /// Bug #6902 Errors in parsing stored procedure parameters
+ /// Bug #27093 Exception when using large values in IN UInt64 parameters
/// </summary>
[Test]
- public void CommentsInDefinition()
+ public void UsingUInt64AsParam()
{
- execSQL(@"CREATE PROCEDURE spTest(action varchar(20),
- result varchar(10) /* Generic, result parameter */)
- BEGIN SELECT action, result; END");
- MySqlCommand cmd = new MySqlCommand("spTest", conn);
- cmd.Parameters.AddWithValue("?action", "parm1");
- cmd.Parameters.AddWithValue("?result", "parm2");
+ execSQL("DROP TABLE IF EXISTS test");
+ execSQL(@"CREATE TABLE test(f1 bigint(20) unsigned NOT NULL,
+ PRIMARY KEY(f1)) ENGINE=InnoDB DEFAULT CHARSET=utf8");
+
+ execSQL(@"CREATE PROCEDURE spTest(in _val bigint unsigned)
+ BEGIN insert into test set f1=_val; END");
+
+ DbCommand cmd = new MySql.Data.MySqlClient.MySqlCommand();
+ cmd.Connection = conn;
cmd.CommandType = CommandType.StoredProcedure;
+ cmd.CommandText = "spTest";
+ DbParameter param = cmd.CreateParameter();
+ param.DbType = DbType.UInt64;
+ param.Direction = ParameterDirection.Input;
+ param.ParameterName = "?_val";
+ ulong bigval = long.MaxValue;
+ bigval += 1000;
+ param.Value = bigval;
+ cmd.Parameters.Add(param);
cmd.ExecuteNonQuery();
}
}
| Thread |
|---|
| • Connector/NET commit: r639 - in branches/5.0: . Driver/Source TestSuite | rburnett | 20 Mar |