Commit 9b6ca7f3 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 9b1a3343
...@@ -2947,7 +2947,12 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate) ...@@ -2947,7 +2947,12 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate)
(void) fflush(file); (void) fflush(file);
fprintf(file,"ERROR"); fprintf(file,"ERROR");
if (error) if (error)
{
if (sqlstate)
(void) fprintf(file," %d (%s)",error, sqlstate);
else
(void) fprintf(file," %d",error); (void) fprintf(file," %d",error);
}
if (status.query_start_line && line_numbers) if (status.query_start_line && line_numbers)
{ {
(void) fprintf(file," at line %lu",status.query_start_line); (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