diff options
author | unknown <jani@a80-186-41-201.elisa-laajakaista.fi> | 2004-10-07 23:51:47 +0300 |
---|---|---|
committer | unknown <jani@a80-186-41-201.elisa-laajakaista.fi> | 2004-10-07 23:51:47 +0300 |
commit | c9465b91584eca59b5bd6ef3e0b4768abb64489b (patch) | |
tree | 9b0a4c8f74fab7e0e89a9eaf63d3bd9df6f46c40 /scripts/mysqld_multi.sh | |
parent | 64155e3cbbdcf06409487d6d9e1cddad441b63a6 (diff) | |
download | mariadb-git-c9465b91584eca59b5bd6ef3e0b4768abb64489b.tar.gz |
Fixed a bug in --log option.
Diffstat (limited to 'scripts/mysqld_multi.sh')
-rw-r--r-- | scripts/mysqld_multi.sh | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 9767976460c..b2931468e82 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.7"; +$VER="2.8"; $opt_config_file = undef(); $opt_example = 0; @@ -78,7 +78,7 @@ sub main "config-file=s","user=s","password=s","log=s","no-log","tcp-ip") || die "Wrong option! See $my_progname --help for detailed information!\n"; - init_log(); + init_log() if (!defined($opt_log)); $groupids = $ARGV[1]; if ($opt_version) { @@ -180,45 +180,6 @@ sub init_log } #### -#### Init log file. Check for appropriate place for log file, in the following -#### order my_print_defaults mysqld datadir, @datadir@, /var/log, /tmp -#### - -sub init_log -{ - if ($my_print_defaults_exists) - { - @mysqld_opts= `my_print_defaults mysqld`; - chomp @mysqld_opts; - foreach my $opt (@mysqld_opts) - { - if ($opt =~ m/^\-\-datadir[=](.*)/) - { - if (-d "$1" && -w "$1") - { - $logdir= $1; - } - } - } - } - if (!defined($logdir)) - { - $logdir= "@datadir@" if (-d "@datadir@" && -w "@datadir@"); - } - if (!defined($logdir)) - { - # Log file was not specified and we could not log to a standard place, - # so log file be disabled for now. - print "WARNING: Log file disabled. Maybe directory/file isn't writable?\n"; - $opt_no_log= 1; - } - else - { - $opt_log= "$logdir/mysqld_multi.log"; - } -} - -#### #### Report living and not running MySQL servers #### |