Skip to content

Commit 27fd1ea

Browse files
committed
Moved skip auto bootstrap as first if statement
1 parent 7064d21 commit 27fd1ea

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docker-entrypoint.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,13 +456,19 @@ wsrep_enable_new_cluster() {
456456
local wsrepdir="$(mysql_get_config 'wsrep-data-home-dir' "$@")"
457457
local wsrepaddr="$(wsrep_address_normalize "$(mysql_get_config 'wsrep-node-address' "$@")")"
458458

459+
if [ -n "$WSREP_SKIP_AUTO_BOOTSTRAP" ]; then
460+
return 1
461+
fi
462+
459463
if [ -s "$wsrepdir/grastate.dat" ]; then
460464
if [[ "$(cat "$wsrepdir/grastate.dat" | grep -i safe_to_bootstrap)" =~ 1 ]]; then
461465
return 0
462466
fi
467+
468+
return 1
463469
fi
464470

465-
if [ -z "$address" ] || [ -n "$WSREP_SKIP_AUTO_BOOTSTRAP" ] || [ -s "$wsrepdir/gvwstate.dat" ]; then
471+
if [ -z "$address" ] || [ -s "$wsrepdir/gvwstate.dat" ]; then
466472
return 1
467473
fi
468474

0 commit comments

Comments
 (0)