Description:
With the current MySQL version 5.6.37 there's what seems like a bug in the tool "mysqladmin".
Upon using the "shutdown" command, there's no shutdown-timeout anymore.
This was still working in version 5.6.35.
This way the mysqladmin command always returns RC=0, although the server is not yet stopped. This might lead to potential data loss during e.g. shutting down the entire system.
How to repeat:
Using this command, there's no default --shutdown-timeout:
/usr/local/mysql5/bin/mysqladmin --defaults-file=/etc/mysql5/maint.cnf shutdown
According to the help page, there should be a default timeout of '3600'.
Explicitly defining a --shutdown-timeout is also ignored:
/usr/local/mysql5/bin/mysqladmin --defaults-file=/etc/mysql5/maint.cnf --shutdown-timeout=5000 shutdown
An easy way to see what I mean is issuing this command:
/usr/local/mysql5/bin/mysqladmin --defaults-file=/etc/mysql5/ph-sys-maint.cnf --shutdown-timeout=5000 shutdown ; ps aux | grep mysqld
The ps output shows mysqld still running. Checking a second time, mysld is stopped.
#################################
content of /etc/mysql5/maint.cnf:
[client]
host = localhost
user = ********
password = ********
socket = /home/tmp/mysql5.sock
[mysql_upgrade]
host = localhost
user = ********
password = ********
socket = /home/tmp/mysql5.sock
basedir = /usr/local/mysql5