diff options
author | Igor Babaev <igor@askmonty.org> | 2016-08-30 16:14:51 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2016-08-30 16:14:51 -0700 |
commit | 2250e9ea261f661cb73c147a28f4d30655d7483d (patch) | |
tree | 04673b47943fdb137f8fe5bafdb64a24887f8c0f /scripts/mysqld_multi.sh | |
parent | cb1e44219b9beae92e104cfe5e67aab3073dd8aa (diff) | |
parent | 4ca7b226c05ae883accec64b1afe6d60daf1b323 (diff) | |
download | mariadb-git-2250e9ea261f661cb73c147a28f4d30655d7483d.tar.gz |
Merge 10.2 into 10.2-mdev9864.
Diffstat (limited to 'scripts/mysqld_multi.sh')
-rw-r--r-- | scripts/mysqld_multi.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index ca259e5396d..a0bc06e5e58 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -17,7 +17,7 @@ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # MA 02110-1301, USA -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -54,6 +54,7 @@ $opt_user = "root"; $opt_version = 0; $opt_silent = 0; $opt_verbose = 0; +$opt_wsrep_new_cluster = 0; my $my_print_defaults_exists= 1; my $logdir= undef(); @@ -126,7 +127,7 @@ sub main # We've already handled --no-defaults, --defaults-file, etc. if (!GetOptions("help", "example", "version", "mysqld=s", "mysqladmin=s", "user=s", "password=s", "log=s", "no-log", - "tcp-ip", "silent", "verbose")) + "tcp-ip", "silent", "verbose", "wsrep-new-cluster")) { $flag_exit= 1; } @@ -378,6 +379,11 @@ sub start_mysqlds() $info_sent= 1; } $com.= $tmp; + + if ($opt_wsrep_new_cluster) { + $com.= " --wsrep-new-cluster"; + } + $com.= " >> $opt_log 2>&1" if (!$opt_no_log); $com.= " &"; if (!$mysqld_found) @@ -625,7 +631,11 @@ sub my_which my ($command) = @_; my (@paths, $path); - return $command if (-f $command && -x $command); + # If the argument is not 'my_print_defaults' then it would be of the format + # <absolute_path>/<program> + return $command if ($command ne 'my_print_defaults' && -f $command && + -x $command); + @paths = split(':', $ENV{'PATH'}); foreach $path (@paths) { @@ -848,6 +858,7 @@ Using: @{[join ' ', @defaults_options]} --user=... mysqladmin user. Using: $opt_user --verbose Be more verbose. --version Print the version number and exit. +--wsrep-new-cluster Bootstrap a cluster. EOF exit(0); } |