summaryrefslogtreecommitdiff
path: root/support-files/mysql.server.sh
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@skysql.com>2014-08-06 15:39:15 +0300
committerJan Lindström <jan.lindstrom@skysql.com>2014-08-26 15:43:46 +0300
commitdf4dd593f29aec8e2116aec1775ad4b8833d8c93 (patch)
treebecae67f02054e15ead58e929e91c044f0b7aa15 /support-files/mysql.server.sh
parente974b564389af8251c2ba51060e6129e45431586 (diff)
downloadmariadb-git-df4dd593f29aec8e2116aec1775ad4b8833d8c93.tar.gz
MDEV-6247: Merge 10.0-galera to 10.1.
Merged lp:maria/maria-10.0-galera up to revision 3879. Added a new functions to handler API to forcefully abort_transaction, producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These were added for future possiblity to add more storage engines that could use galera replication.
Diffstat (limited to 'support-files/mysql.server.sh')
-rw-r--r--support-files/mysql.server.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index a1ee5c4c653..c98c8284a97 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -253,6 +253,8 @@ wait_for_gone () {
wait_for_ready () {
+ sst_progress_file=$datadir/sst_in_progress
+
i=0
while test $i -ne $service_startup_timeout ; do
@@ -261,6 +263,11 @@ wait_for_ready () {
return 0
fi
+ if test -e $sst_progress_file && [ $startup_sleep -ne 10 ];then
+ echo $echo_n "SST in progress, setting sleep higher"
+ startup_sleep=10
+ fi
+
echo $echo_n ".$echo_c"
i=`expr $i + 1`
sleep 1
@@ -349,7 +356,10 @@ case "$mode" in
# Stop the service and regardless of whether it was
# running or not, start it again.
if $0 stop $other_args; then
- $0 start $other_args
+ if ! $0 start $other_args; then
+ log_failure_msg "Failed to restart server."
+ exit 1
+ fi
else
log_failure_msg "Failed to stop running server, so refusing to try to start."
exit 1
@@ -426,10 +436,16 @@ case "$mode" in
fi
exit $r
;;
+ 'bootstrap')
+ # Bootstrap the cluster, start the first node
+ # that initiate the cluster
+ echo $echo_n "Bootstrapping the cluster"
+ $0 start $other_args --wsrep-new-cluster
+ ;;
*)
# usage
basename=`basename "$0"`
- echo "Usage: $basename {start|stop|restart|reload|force-reload|status|configtest} [ MySQL server options ]"
+ echo "Usage: $basename {start|stop|restart|reload|force-reload|status|configtest|bootstrap} [ MySQL server options ]"
exit 1
;;
esac