summaryrefslogtreecommitdiff
path: root/client/mysqladmin.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <georgi.kodinov@oracle.com>2016-09-01 13:30:44 +0300
committerGeorgi Kodinov <georgi.kodinov@oracle.com>2016-09-08 18:12:02 +0300
commit0d43e570ba66618dbe8078e11844b11e53af22f1 (patch)
treedf30134059eb2fff0ed2b32833b93efbabd56162 /client/mysqladmin.cc
parent48523716a8632a20ef36cb9a98aabb9758e7e48c (diff)
downloadmariadb-git-0d43e570ba66618dbe8078e11844b11e53af22f1.tar.gz
Bug #24496214: MISLEADING ERROR EXECUTING MYSQLADMIN SHUTDOWN AGAINST A SERVER
RUNNING FIREWALL mysqladmin shutdown will try to extract the server's pid file before executing the actual shutdown command. It will do that by executing a SHOW VARIABLES query and processing the result. However if that query fails it print a (somewhat confusing) error mesasage and will still continue to do the shutdown command. If that passes then the mysqladmin user will get an error but the shutdown will still be successful. This is confusing so the error message text is changed to say that this is a non-fatal error and execution continues. No test case added since it'd require a selective query failure device that's not available in 5.5.
Diffstat (limited to 'client/mysqladmin.cc')
-rw-r--r--client/mysqladmin.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index f0ae2c12137..c03b37ab165 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -1438,8 +1438,10 @@ static my_bool get_pidfile(MYSQL *mysql, char *pidfile)
if (mysql_query(mysql, "SHOW VARIABLES LIKE 'pid_file'"))
{
- my_printf_error(0, "query failed; error: '%s'", error_flags,
- mysql_error(mysql));
+ my_printf_error(mysql_errno(mysql),
+ "The query to get the server's pid file failed,"
+ " error: '%s'. Continuing.", error_flags,
+ mysql_error(mysql));
}
result = mysql_store_result(mysql);
if (result)