3
# This script is executed by "/etc/init.d/mysql" on every (re)start.
5
# Changes to this file will be preserved when updating the Debian package.
8
source /usr/share/mysql/debian-start.inc.sh
10
MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
11
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
12
MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf"
13
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
14
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
15
MYCHECK_PARAMS="--all-databases --fast --silent"
18
# The following commands should be run when the server is up but in background
19
# where they do not block the server start and in one shell instance so that
20
# they run sequentially. They are supposed not to echo anything to stdout.
21
# If you want to disable the check for crashed tables comment
22
# "check_for_crashed_tables" out.
23
# (There may be no output to stdout inside the background process!)
24
echo "Checking for corrupt, not cleanly closed and upgrade needing tables."
26
upgrade_system_tables_if_necessary;
28
check_for_crashed_tables;