~percona-dev/percona-server/release-5.5.11-20.2-fix-bug-764138

« back to all changes in this revision

Viewing changes to build/debian/additions/debian-start

  • Committer: Ignacio Nin
  • Date: 2011-03-13 17:18:23 UTC
  • mfrom: (33.3.17 release-5.5.8-20)
  • Revision ID: ignacio.nin@percona.com-20110313171823-m06xs104nekulywb
Merge changes from release-5.5.8-20 to 5.5.9

Merge changes from the release branch of 5.5.8 to 5.5.9. These include
the HandlerSocket and UDF directories and the building scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# This script is executed by "/etc/init.d/mysql" on every (re)start.
 
4
 
5
# Changes to this file will be preserved when updating the Debian package.
 
6
#
 
7
 
 
8
PERCONA_PREFIX=/opt/percona/percona-server-5.5
 
9
source "${PERCONA_PREFIX}"/share/debian-start.inc.sh
 
10
 
 
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"
 
17
MYCHECK_RCPT="root"
 
18
 
 
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."
 
26
(
 
27
  upgrade_system_tables_if_necessary;
 
28
  check_root_accounts;
 
29
  check_for_crashed_tables;
 
30
) >&2 &
 
31
 
 
32
exit 0