Commit 5d228a83 authored by unknown's avatar unknown

mysql.cc:

  Print sqlstate value in batch mode, not just in interactive mode.


client/mysql.cc:
  Print sqlstate value in batch mode, not just in interactive mode.
parent aff55bf0
......@@ -2947,7 +2947,12 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate)
(void) fflush(file);
fprintf(file,"ERROR");
if (error)
(void) fprintf(file," %d",error);
{
if (sqlstate)
(void) fprintf(file," %d (%s)",error, sqlstate);
else
(void) fprintf(file," %d",error);
}
if (status.query_start_line && line_numbers)
{
(void) fprintf(file," at line %lu",status.query_start_line);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment