diff options
author | jani@rhols221.adsl.netsonic.fi <> | 2002-08-22 02:37:42 +0300 |
---|---|---|
committer | jani@rhols221.adsl.netsonic.fi <> | 2002-08-22 02:37:42 +0300 |
commit | ef0a24e0d60d26b662d292a636a2c2db9dbb3dd4 (patch) | |
tree | 2ba6ebb5a8e90bb723c4d4894b840c578cc823bb /client | |
parent | cad0e5144353f017ef7c747345e25a874920793a (diff) | |
download | mariadb-git-ef0a24e0d60d26b662d292a636a2c2db9dbb3dd4.tar.gz |
Fixed a bug in mysqladmin shutdown when checking pid file status.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqladmin.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/client/mysqladmin.c b/client/mysqladmin.c index 6ee09a9e848..2840b1f4516 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -457,19 +457,18 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv) my_bool got_pidfile= 0; time_t last_modified= 0; /* to keep compiler happy */ struct stat pidfile_status; - my_bool check_pidfile_status= 1; + my_bool check_pidfile_status= 0; /* Only wait for pidfile on local connections If pidfile doesn't exist, continue without pid file checking */ - if (mysql->unix_socket) - got_pidfile= !get_pidfile(mysql, pidfile); - - if (got_pidfile && stat(pidfile, &pidfile_status)) - check_pidfile_status= 0; - else + if (mysql->unix_socket && (got_pidfile= !get_pidfile(mysql, pidfile)) && + !stat(pidfile, &pidfile_status)) + { + check_pidfile_status= 1; last_modified= pidfile_status.st_mtime; + } if (mysql_shutdown(mysql)) { |