summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2015-05-29 11:26:46 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2015-05-29 11:26:46 -0400
commit903cfde149778daf67d21144a1172e1ef998599e (patch)
tree9c9e1e5d60a8b8b4b8a69ba89d364a471f3e692e /scripts
parent1b00edc49a2f1e0a1995fc0562639d90d4c19ca2 (diff)
downloadmariadb-git-903cfde149778daf67d21144a1172e1ef998599e.tar.gz
MDEV-7067: Server outputs Galera (WSREP) information, even if Galera is disabled
* mysqld_safe: Since wsrep_on variable is mandatory in 10.1, skip wsrep position recovery if its OFF. * mysqld: Remove "-wsrep" from server version * mysqld: Remove wsrep patch version from @@version_comment * mysqld: Introduce @@wsrep_patch_version
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysqld_safe.sh32
1 files changed, 24 insertions, 8 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 6424edc43c0..d5a5cbe979d 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -20,6 +20,7 @@ mysqld_ld_preload=
mysqld_ld_library_path=
flush_caches=0
numa_interleave=0
+wsrep_on=0
# Initial logging status: error log is not open, and not using syslog
logging=init
@@ -319,6 +320,15 @@ parse_arguments() {
--timezone=*) TZ="$val"; export TZ; ;;
--flush[-_]caches) flush_caches=1 ;;
--numa[-_]interleave) numa_interleave=1 ;;
+ --wsrep[-_]on) wsrep_on=1 ;;
+ --skip[-_]wsrep[-_]on) wsrep_on=0 ;;
+ --wsrep[-_]on=*)
+ if echo $val | grep -iq '\(ON\|1\)'; then
+ wsrep_on=1
+ else
+ wsrep_on=0
+ fi
+ ;;
--wsrep[-_]urls=*) wsrep_urls="$val"; ;;
--wsrep[-_]provider=*)
if test -n "$val" && test "$val" != "none"
@@ -968,18 +978,24 @@ do
start_time=`date +%M%S`
- # this sets wsrep_start_position_opt
- wsrep_recover_position "$cmd"
+ # Perform wsrep position recovery if wsrep_on=1, skip otherwise.
+ if test $wsrep_on -eq 1
+ then
+ # this sets wsrep_start_position_opt
+ wsrep_recover_position "$cmd"
- [ $? -ne 0 ] && exit 1 #
+ [ $? -ne 0 ] && exit 1 #
- [ -n "$wsrep_urls" ] && url=`wsrep_pick_url $wsrep_urls` # check connect address
+ [ -n "$wsrep_urls" ] && url=`wsrep_pick_url $wsrep_urls` # check connect address
- if [ -z "$url" ]
- then
- eval_log_error "$cmd $wsrep_start_position_opt"
+ if [ -z "$url" ]
+ then
+ eval_log_error "$cmd $wsrep_start_position_opt"
+ else
+ eval_log_error "$cmd $wsrep_start_position_opt --wsrep_cluster_address=$url"
+ fi
else
- eval_log_error "$cmd $wsrep_start_position_opt --wsrep_cluster_address=$url"
+ eval_log_error "$cmd"
fi
if [ $want_syslog -eq 0 -a ! -f "$err_log" ]; then