+2005-11-30 Konstantin Triger <kostat@mainsoft.com>
+
+ * Parser.jay: use Convert.ToInt32() instead of cast to throw OverflowException.
+
2005-10-26 Konstantin Triger <kostat@mainsoft.com>
* In.cs: Fix the enumerator initialization problem.
{
long arg1 = (long) $5;
long arg2 = (long) $7;
- $$ = new SubstringFunction ((IExpression)$3, (int) arg1, (int) arg2);
+ $$ = new SubstringFunction ((IExpression)$3, Convert.ToInt32(arg1), Convert.ToInt32(arg2));
}
| ISNULL PAROPEN ColumnValue COMMA Expr PARCLOSE
{
+2005-11-30 Konstantin Triger <kostat@mainsoft.com>
+
+ * DataColumnTest.cs: Added ExpressionSubstringlimits.
+
2005-11-11 Senganal T <tsenganal@novell.com>
* DataSetTest2.cs : Added a testcase for bug#76517
AssertEquals("DC28: Value from DataRow.Item", v, DBNull.Value);
}
+ [Test]
+ [ExpectedException (typeof (OverflowException))]
+ public void ExpressionSubstringlimits() {
+ DataTable t = new DataTable();
+ t.Columns.Add("aaa");
+ t.Rows.Add(new object[]{"xxx"});
+ DataColumn c = t.Columns.Add("bbb");
+ c.Expression= "SUBSTRING(aaa, 6000000000000000, 2)";
+ }
+
[Test]
[Category ("NotWorking")]
public void ExpressionFunctions ()