diff options
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); } |