| Bug #56489 | Not handling repreparation of PS | ||
|---|---|---|---|
| Submitted: | 2 Sep 2010 10:04 | Modified: | 14 Dec 2010 8:24 |
| Reporter: | Tonci Grgin | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | Connector / NET | Severity: | S4 (Feature request) |
| Version: | 6.2.4 | OS: | Any |
| Assigned to: | Reggie Burnett | CPU Architecture: | Any |
[2 Sep 2010 10:04]
Tonci Grgin
[13 Dec 2010 18:33]
Reggie Burnett
Please give an example test case that illustrates this problem.
[14 Dec 2010 8:25]
Bogdan Degtyariov
Cannot repeat using C/NET 6.3.6 and the following test case:
private void bIssue50703_Click(object sender, EventArgs e)
{
MySqlConnection con = new MySqlConnection();
try
{
con.ConnectionString = "server=localhost;database=test;" +
"user id=*******;Password=****;Ignore prepare=false";
con.Open();
MySqlCommand cmd = new MySqlCommand();
MySqlCommand cmd2 = new MySqlCommand();
cmd.Connection = con;
cmd2.Connection = con;
cmd2.CommandText = "DROP TABLE IF EXISTS t_issue50703";
cmd2.ExecuteNonQuery();
cmd2.CommandText = "CREATE TABLE t_issue50703 (id int auto_increment primary key, txt varchar(32))";
cmd2.ExecuteNonQuery();
cmd.CommandText = "INSERT INTO t_issue50703(id, txt) VALUES (@val1, @val2)";
cmd.Parameters.AddWithValue("@val1", 1);
cmd.Parameters.AddWithValue("@val2", "something");
cmd.Prepare();
cmd.ExecuteNonQuery();
cmd2.CommandText = "FLUSH TABLES";
cmd2.ExecuteNonQuery();
cmd.Parameters[0].Value = 2;
cmd.Parameters[1].Value = "something 2";
cmd.ExecuteNonQuery();
cmd.CommandText = "DROP TABLE IF EXISTS t_issue50703";
cmd.ExecuteNonQuery();
tbOutput.AppendText("Done!\r\n");
}
catch (Exception ex)
{
string error = ex.Message.ToString();
error += ex.StackTrace;
tbOutput.AppendText("=============================================\r\n" +
"Error!\r\n" + error + "\r\n" +
"=============================================\r\n");
}
finally
{
con.Close();
}
}
