summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2013-03-01 18:09:06 +0200
committerMichael Widenius <monty@askmonty.org>2013-03-01 18:09:06 +0200
commit4cace76d4d3d75cf94762497937479c475d12167 (patch)
tree9c7bad491bb0762dfb460bdd9dc9c58b840a3e49 /scripts
parent492c3b09d2b3c11ebb043276ff4b245d54d99fd0 (diff)
parent8ed283d882e7147b1caa3f90f708720c94446024 (diff)
downloadmariadb-git-4cace76d4d3d75cf94762497937479c475d12167.tar.gz
Automatic merge
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysqld_safe.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 4f503def01d..222279cc8ff 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -71,6 +71,7 @@ Usage: $0 [OPTIONS]
--defaults-extra-file=FILE Also use defaults from the specified file
--ledir=DIRECTORY Look for mysqld in the specified directory
--open-files-limit=LIMIT Limit the number of open files
+ --crash-script=FILE Script to call when mysqld crashes
--timezone=TZ Set the system timezone
--malloc-lib=LIB Preload shared library LIB if available
--mysqld=FILE Use the specified file as mysqld
@@ -202,6 +203,7 @@ parse_arguments() {
optname_subst=`echo "$optname" | sed 's/_/-/g'`
arg=`echo $arg | sed "s/^$optname/$optname_subst/"`
case "$arg" in
+ --crash-script=*) CRASH_SCRIPT="$val" ;;
# these get passed explicitly to mysqld
--basedir=*) MY_BASEDIR_VERSION="$val" ;;
--datadir=*|--data=*) DATADIR="$val" ;;
@@ -799,7 +801,7 @@ have_sleep=1
while true
do
- rm -f $safe_mysql_unix_port "$pid_file" # Some extra safety
+ rm -f "$pid_file" # Some extra safety
start_time=`date +%M%S`
@@ -874,6 +876,11 @@ do
done
fi
log_notice "mysqld restarted"
+ if test -n "$CRASH_SCRIPT"
+ then
+ crash_script_output=`$CRASH_SCRIPT 2>&1`
+ log_error "$crash_script_output"
+ fi
done
log_notice "mysqld from pid file $pid_file ended"