diff options
author | unknown <msvensson@pilot.mysql.com> | 2007-11-26 19:50:43 +0100 |
---|---|---|
committer | unknown <msvensson@pilot.mysql.com> | 2007-11-26 19:50:43 +0100 |
commit | 53cf19216fb06d794fbdab56f2fb34b3e327b66b (patch) | |
tree | 6c2250574e920370dd1ff0ea0d37cf9ef78a293e /client | |
parent | 835dcc09710f12302e8cbdeaece18a03cc8081f4 (diff) | |
download | mariadb-git-53cf19216fb06d794fbdab56f2fb34b3e327b66b.tar.gz |
Bug#25146 Some warnings/errors not shown when using --show-warnings
- Additional patch to fix compiler warnings
client/mysql.cc:
Initialize warnings to 0 to avid compiler warning
Call 'print_warnings' also when error occured
mysql-test/r/mysql.result:
Change test to make is possible to see that second set of warnings
are from second invocation of mysql
mysql-test/t/mysql.test:
Change test to make is possible to see that second set of warnings
are from second invocation of mysql
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 1e6207aab51..b102c80655a 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2166,7 +2166,7 @@ com_go(String *buffer,char *line __attribute__((unused))) { char buff[200], time_buff[32], *pos; MYSQL_RES *result; - ulong timer, warnings; + ulong timer, warnings= 0; uint error= 0; int err= 0; @@ -2316,7 +2316,8 @@ com_go(String *buffer,char *line __attribute__((unused))) end: - if (show_warnings == 1 && warnings >= 1) /* Show warnings if any */ + /* Show warnings if any or error occured */ + if (show_warnings == 1 && (warnings >= 1 || error)) print_warnings(); if (!error && !status.batch && |