Bug #10800 Doing mysql_query() on Create or Insert will always set mysql_error
Submitted: 23 May 2005 12:38 Modified: 30 Jun 2005 12:11
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:4.1.12 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[23 May 2005 12:38] [ name withheld ]
Description:
It seems that if I do the following:

mysql_query of Create Table or Insert....

mysql_store_results...which returns a NULL

mysql_error will always show an error though I know the operation has succeeded.

How to repeat:
mysql_query of Create Table or Insert....

mysql_store_results...which returns a NULL

mysql_error will always show an error though I know the operation has succeeded.
[30 Jun 2005 12:11] Geert Vanderkelen
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.mysql.com/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Additional info:

Hi,
  //..
  sprintf(q, "DROP TABLE IF EXISTS simpletest");
  mysql_query(&mysql,q);
  sprintf(q, "CREATE TABLE simpletest (id int not null default 1)");
  mysql_query(&mysql,q);

  res = mysql_store_result(&mysql);
  printf("Error(%d): %s\n", mysql_errno(&mysql), mysql_error(&mysql));
  mysql_free_result(res);
  //..

errno is 0, no errormsg..
Maybe you see previous error.

Thanks,

Geert