summaryrefslogtreecommitdiff
path: root/client/mysql.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-07-07 11:30:03 +0200
committerSergei Golubchik <serg@mariadb.org>2017-07-07 11:30:03 +0200
commit9e11e055ce1461caecbb30e8300dfdcd48af22f1 (patch)
tree48f5dc07a29e44a106c37e7e8e3234c62abbebf6 /client/mysql.cc
parent2b5c9bc2c813ea7963959e515da5d60392c35431 (diff)
parent6b99859fff6b8c0a52ea45965834c9c3fdfc4cb3 (diff)
downloadmariadb-git-9e11e055ce1461caecbb30e8300dfdcd48af22f1.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'client/mysql.cc')
-rw-r--r--client/mysql.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 0a0fca286e1..28d781aff8b 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -4798,10 +4798,11 @@ com_status(String *buffer __attribute__((unused)),
tee_fprintf(stdout, "Protocol:\t\tCompressed\n");
#endif
- if ((status_str= mysql_stat(&mysql)) && !mysql_error(&mysql)[0])
+ const char *pos;
+ if ((status_str= mysql_stat(&mysql)) && !mysql_error(&mysql)[0] &&
+ (pos= strchr(status_str,' ')))
{
ulong sec;
- const char *pos= strchr(status_str,' ');
/* print label */
tee_fprintf(stdout, "%.*s\t\t\t", (int) (pos-status_str), status_str);
if ((status_str= str2int(pos,10,0,LONG_MAX,(long*) &sec)))