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
PERCONA_PREFIX=/opt/percona/percona-server-5.5
9
source "${PERCONA_PREFIX}"/share/debian-start.inc.sh
11
MYSQL="${PERCONA_PREFIX}/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
12
MYADMIN="${PERCONA_PREFIX}/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
13
MYUPGRADE="${PERCONA_PREFIX}/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf"
14
MYCHECK="${PERCONA_PREFIX}/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
15
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
16
MYCHECK_PARAMS="--all-databases --fast --silent"
19
# The following commands should be run when the server is up but in background
20
# where they do not block the server start and in one shell instance so that
21
# they run sequentially. They are supposed not to echo anything to stdout.
22
# If you want to disable the check for crashed tables comment
23
# "check_for_crashed_tables" out.
24
# (There may be no output to stdout inside the background process!)
25
echo "Checking for corrupt, not cleanly closed and upgrade needing tables."
27
upgrade_system_tables_if_necessary;
29
check_for_crashed_tables;