Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.0.13-galera
-
None
-
ubuntu 14.04
Description
I installed mariadb via the ubuntu 14.04 repo and documentation provided on mariadb.org.
I found the /etc/init.d/mysql script wasn't waiting for mysqld to fully shutdown after running mysqladmin shutdown in the init script. There is logic that looks for an error condition and then runs a sequence to verify it has finished shutting down.
For some reason, it is not able to return an error condition for mysqladmin shutdown on this platform, so the stop() function completes too early and then start() fails and this leaves the mysql process not running. If you run service mysql restart again, it works, because enough time has passed for mysqladmin shutdown to complete.
I found I could fix this by forcing the following shell script code to run immediately after this line:
shutdown_out=`$MYADMIN shutdown 2>&1`; r=$?
|
but before this line:
if [ "$r" -ne 0 ]; then
|
new code:
for i in `seq 1 600`; do
|
sleep 1
|
if mysqld_status check_dead nowarn; then server_down=1; break; fi
|
done
|
Please verify/fix for the benefit of others.
I'm also using the innodb pool dump feature, which makes it take longer to shutdown possibly.