summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorjani@ua141d10.elisa.omakaista.fi <>2005-04-26 14:28:22 +0300
committerjani@ua141d10.elisa.omakaista.fi <>2005-04-26 14:28:22 +0300
commit7810721f401c28193af8cecb22dc9b047681fb23 (patch)
tree8b4e19afe4ad686e1028002007e01fad071d95b5 /scripts
parent0ca934de63a8737a2c90315765ef1830afab950c (diff)
downloadmariadb-git-7810721f401c28193af8cecb22dc9b047681fb23.tar.gz
Fixed Bug#9835: mysqld_multi --help won't output help if there are
parameter problems.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysqld_multi.sh23
1 files changed, 13 insertions, 10 deletions
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index ee873a86c8d..e4895ae4bef 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -4,7 +4,7 @@ use Getopt::Long;
use POSIX qw(strftime);
$|=1;
-$VER="2.12";
+$VER="2.13";
$opt_config_file = undef();
$opt_example = 0;
@@ -37,13 +37,13 @@ main();
sub main
{
- my ($flag_exit);
+ my $flag_exit= 0;
if (!defined(my_which(my_print_defaults)))
{
# We can't throw out yet, since --version, --help, or --example may
# have been given
- print "WARNING! my_print_defaults command not found!\n";
+ print "WARNING: my_print_defaults command not found.\n";
print "Please make sure you have this command available and\n";
print "in your path. The command is available from the latest\n";
print "MySQL distribution.\n";
@@ -76,10 +76,14 @@ sub main
chop @defops;
splice @ARGV, 0, 0, @defops;
}
- GetOptions("help","example","version","mysqld=s","mysqladmin=s",
- "config-file=s","user=s","password=s","log=s","no-log","tcp-ip",
- "silent","verbose")
- || die "Wrong option! See $my_progname --help for detailed information!\n";
+ if (!GetOptions("help","example","version","mysqld=s","mysqladmin=s",
+ "config-file=s","user=s","password=s","log=s","no-log",
+ "tcp-ip", "silent","verbose"))
+ {
+ $flag_exit= 1;
+ }
+
+ usage() if ($opt_help);
if ($opt_verbose && $opt_silent)
{
@@ -95,15 +99,14 @@ sub main
exit(0);
}
example() if ($opt_example);
- usage() if ($opt_help);
if ($flag_exit)
{
- print "Error with an option, see $my_progname --help for more info!\n";
+ print "Error with an option, see $my_progname --help for more info.\n";
exit(1);
}
if (!defined(my_which(my_print_defaults)))
{
- print "ABORT: Can't find command 'my_print_defaults'!\n";
+ print "ABORT: Can't find command 'my_print_defaults'.\n";
print "This command is available from the latest MySQL\n";
print "distribution. Please make sure you have the command\n";
print "in your PATH.\n";