summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <paul@kite-hub.kitebird.com>2004-09-08 13:28:11 -0500
committerunknown <paul@kite-hub.kitebird.com>2004-09-08 13:28:11 -0500
commit9b6ca7f3a516267422f4048d48ad1ce78a773c27 (patch)
treead9324080b69ea06fae8ad35c969ee2ecc51fd87 /client
parent9b1a33435a4b12e6b30b7098efccfbfe319edb4f (diff)
downloadmariadb-git-9b6ca7f3a516267422f4048d48ad1ce78a773c27.tar.gz
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.
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 142e396d424..e940fdcc406 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -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);