MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:rburnett Date:March 7 2006 10:55pm
Subject:Connector/NET commit: r208 - in branches/1.0: . TestSuite
View as plain text  
Modified:
   branches/1.0/CHANGES
   branches/1.0/TestSuite/Syntax.cs
Log:
Bug #16645 FOUND_ROWS() Bug [can't repeat - added test case]


Modified: branches/1.0/CHANGES
===================================================================
--- branches/1.0/CHANGES	2006-03-07 22:39:47 UTC (rev 207)
+++ branches/1.0/CHANGES	2006-03-07 22:55:06 UTC (rev 208)
@@ -2,6 +2,7 @@
     Bug #17375 CommandBuilder ignores Unsigned flag at Parameter creation [fixed]
     Bug #17749 There is no char type in MySqlDbType [fixed]
 	Bug #16788 Only byte arrays and strings can be serialized by MySqlBinary [fixed]
+	Bug #16645 FOUND_ROWS() Bug [can't repeat - added test case]
 	
 x-xx-05 - Version 1.0.7
 

Modified: branches/1.0/TestSuite/Syntax.cs
===================================================================
--- branches/1.0/TestSuite/Syntax.cs	2006-03-07 22:39:47 UTC (rev 207)
+++ branches/1.0/TestSuite/Syntax.cs	2006-03-07 22:55:06 UTC (rev 208)
@@ -306,5 +306,24 @@
 			catch (Exception ex) { Assert.Fail( ex.Message); }
 		}
 
+		/// <summary>
+		/// Bug #16645 FOUND_ROWS() Bug 
+		/// </summary>
+		[Test]
+		public void FoundRows()
+		{
+			execSQL("DROP TABLE IF EXISTS test");
+			execSQL("CREATE TABLE test (testID int(11) NOT NULL auto_increment, testName varchar(100) default '', " +
+				    "PRIMARY KEY  (testID)) ENGINE=InnoDB DEFAULT CHARSET=latin1");
+			MySqlCommand cmd = new MySqlCommand("INSERT INTO test VALUES (NULL, 'test')", conn);
+			for (int i=0; i < 1000; i++)
+				cmd.ExecuteNonQuery();
+			cmd.CommandText = "SELECT SQL_CALC_FOUND_ROWS * FROM test LIMIT 0, 10";
+			cmd.ExecuteNonQuery();
+			cmd.CommandText = "SELECT FOUND_ROWS()";
+			object cnt = cmd.ExecuteScalar();
+			Assert.AreEqual(1000, cnt);
+		}
+
 	}
 }

Thread
Connector/NET commit: r208 - in branches/1.0: . TestSuiterburnett7 Mar