summaryrefslogtreecommitdiff
path: root/scripts/wsrep_sst_common.sh
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2015-07-14 16:05:29 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2015-07-14 16:05:29 -0400
commitdced5146bdfc46e200ba35a86c3c55fb60972e33 (patch)
tree22e3dd18f4edec2a585341fee607765f96b2744f /scripts/wsrep_sst_common.sh
parent75931feabe99595e9659a423e299c4229d3c02ba (diff)
downloadmariadb-git-dced5146bdfc46e200ba35a86c3c55fb60972e33.tar.gz
Merge branch '10.0-galera' into 10.1
Diffstat (limited to 'scripts/wsrep_sst_common.sh')
-rw-r--r--scripts/wsrep_sst_common.sh32
1 files changed, 29 insertions, 3 deletions
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh
index 5f84a00c214..78060f70ca5 100644
--- a/scripts/wsrep_sst_common.sh
+++ b/scripts/wsrep_sst_common.sh
@@ -105,13 +105,39 @@ done
readonly WSREP_SST_OPT_BYPASS
readonly WSREP_SST_OPT_BINLOG
+# try to use my_print_defaults, mysql and mysqldump that come with the sources
+# (for MTR suite)
+SCRIPTS_DIR="$(cd $(dirname "$0"); pwd -P)"
+EXTRA_DIR="$SCRIPTS_DIR/../extra"
+CLIENT_DIR="$SCRIPTS_DIR/../client"
+
+if [ -x "$CLIENT_DIR/mysql" ]; then
+ MYSQL_CLIENT="$CLIENT_DIR/mysql"
+else
+ MYSQL_CLIENT=$(which mysql)
+fi
+
+if [ -x "$CLIENT_DIR/mysqldump" ]; then
+ MYSQLDUMP="$CLIENT_DIR/mysqldump"
+else
+ MYSQLDUMP=$(which mysqldump)
+fi
+
+if [ -x "$SCRIPTS_DIR/my_print_defaults" ]; then
+ MY_PRINT_DEFAULTS="$SCRIPTS_DIR/my_print_defaults"
+elif [ -x "$EXTRA_DIR/my_print_defaults" ]; then
+ MY_PRINT_DEFAULTS="$EXTRA_DIR/my_print_defaults"
+else
+ MY_PRINT_DEFAULTS=$(which my_print_defaults)
+fi
+
readonly WSREP_SST_OPT_CONF="$WSREP_SST_OPT_DEFAULT $WSREP_SST_OPT_EXTRA_DEFAULT"
-readonly my_print_defaults="my_print_defaults $WSREP_SST_OPT_CONF"
+MY_PRINT_DEFAULTS="$MY_PRINT_DEFAULTS $WSREP_SST_OPT_CONF"
# State Snapshot Transfer authentication password was displayed in the ps output. Bug fixed #1200727.
-if $my_print_defaults sst | grep -q "wsrep_sst_auth";then
+if $MY_PRINT_DEFAULTS sst | grep -q "wsrep_sst_auth";then
if [ -z "$WSREP_SST_OPT_AUTH" -o "$WSREP_SST_OPT_AUTH" = "(null)" ];then
- WSREP_SST_OPT_AUTH=$($my_print_defaults sst | grep -- "--wsrep_sst_auth" | cut -d= -f2)
+ WSREP_SST_OPT_AUTH=$($MY_PRINT_DEFAULTS sst | grep -- "--wsrep_sst_auth" | cut -d= -f2)
fi
fi