List:Commits« Previous MessageNext Message »
From:rburnett Date:June 1 2006 9:51pm
Subject:Connector/NET commit: r248 - branches/1.0/TestSuite
View as plain text  
Modified:
   branches/1.0/TestSuite/DataTypeTests.cs
Log:
Added to the UnsignedTypes test case to cover 
Bug #15274 Use MySqlDbType.UInt32, throwed exception 'Only byte arrays can be serialize' 

Modified: branches/1.0/TestSuite/DataTypeTests.cs
===================================================================
--- branches/1.0/TestSuite/DataTypeTests.cs	2006-06-01 21:41:17 UTC (rev 247)
+++ branches/1.0/TestSuite/DataTypeTests.cs	2006-06-01 21:51:11 UTC (rev 248)
@@ -567,6 +567,7 @@
 
 		/// <summary>
 		/// Bug #17375 CommandBuilder ignores Unsigned flag at Parameter creation 
+        /// Bug #15274 Use MySqlDbType.UInt32, throwed exception 'Only byte arrays can be serialize' 
 		/// </summary>
 		[Test]
 		public void UnsignedTypes()
@@ -592,6 +593,28 @@
 			row["b"] = 135;
 			row.EndEdit();
 			da.Update(dv.Table);
+
+			execSQL("DROP TABLE IF EXISTS Test");
+			execSQL("CREATE TABLE Test (b MEDIUMINT UNSIGNED PRIMARY KEY)");
+            execSQL("INSERT INTO test VALUES(20)");
+            MySqlCommand cmd = new MySqlCommand("SELECT * FROM test WHERE (b > ?id)", conn);
+            cmd.Parameters.Add("?id", MySqlDbType.UInt16).Value = 10;
+            MySqlDataReader dr = null;
+            try
+            {
+                dr = cmd.ExecuteReader();
+                dr.Read();
+                Assert.AreEqual(20, dr.GetUInt16(0));
+            }
+            catch (Exception ex)
+            {
+                Assert.Fail(ex.Message);
+            }
+            finally
+            {
+                if (dr != null)
+                    dr.Close();
+            }
 		}
 	}
 }

Thread
Connector/NET commit: r248 - branches/1.0/TestSuiterburnett1 Jun