Modified:
branches/1.0/TestSuite/StoredProcedure.cs
Log:
Bug #26139 MySqlCommand.LastInsertedId doesn't work for stored procedures
Added a test case for this one but had to mark it as NotWorking since this is a server bug. Will enable the test case when the the server has this fixed.
Modified: branches/1.0/TestSuite/StoredProcedure.cs
===================================================================
--- branches/1.0/TestSuite/StoredProcedure.cs 2007-02-07 16:31:20 UTC (rev 587)
+++ branches/1.0/TestSuite/StoredProcedure.cs 2007-02-13 22:18:09 UTC (rev 588)
@@ -1093,5 +1093,27 @@
Assert.Fail(ex.Message);
}
}
+
+ /// <summary>
+ /// Bug #26139 MySqlCommand.LastInsertedId doesn't work for stored procedures
+ /// Currently this is borked on the server so we are marking this as notworking
+ /// until the server has this fixed.
+ /// </summary>
+ [Category("NotWorking")]
+ [Test]
+ public void LastInsertId()
+ {
+ execSQL("DROP TABLE IF EXISTS test");
+ execSQL("CREATE TABLE test (id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(200))");
+ execSQL("INSERT INTO test VALUES (NULL, 'Test1')");
+ execSQL("CREATE PROCEDURE spTest() BEGIN " +
+ "INSERT INTO test VALUES (NULL, 'test'); END");
+
+ MySqlCommand cmd = new MySqlCommand("spTest", conn);
+ cmd.CommandTimeout = 0;
+ cmd.CommandType = CommandType.StoredProcedure;
+ cmd.ExecuteNonQuery();
+ Assert.AreEqual(2, cmd.LastInsertedId);
+ }
}
}
| Thread |
|---|
| • Connector/NET commit: r588 - branches/1.0/TestSuite | rburnett | 13 Feb |