Bug #1946 You can always mysql_real_query a query with placeholders after mysql_prepare()
Submitted: 25 Nov 2003 6:38 Modified: 26 Nov 2003 12:11
Reporter: Konstantin Osipov (OCA) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:Any (all)
Assigned to: Konstantin Osipov CPU Architecture:Any

[25 Nov 2003 6:38] Konstantin Osipov
  const char *query= "INSERT INTO prepare_command VALUES (?)";

  stmt = mysql_prepare(mysql, query, strlen(query));
  rc= mysql_real_query(mysql, query, strlen(query));
  assert(rc != 0);

assertion fails 

How to repeat:
issue C API calls mentioned above having prepare_command table like 
CREATE TABLE prepare_command (id int)

Suggested fix:
Eliminate THD::prepare_command and use THD->command for checks in sql_yacc.yy
[26 Nov 2003 12:11] Konstantin Osipov
Fixed in 4.1.1, ChangeSet (konstantin:1.1639)