Browse Source

Ensure that the last --datadir option is used from the my.cnf files.

scripts/mysqldumpslow.sh:
  Remove not used --basedir option
  Ensure that the last --datadir option is used from the my.cnf files.
pull/843/head
Michael Widenius 15 years ago
parent
commit
db9291fa22
  1. 5
      scripts/mysqldumpslow.sh

5
scripts/mysqldumpslow.sh

@ -35,11 +35,8 @@ $opt{'help'} and usage();
unless (@ARGV) {
my $defaults = `my_print_defaults mysqld`;
my $basedir = ($defaults =~ m/--basedir=(.*)/)[0]
or die "Can't determine basedir from 'my_print_defaults mysqld' output: $defaults";
warn "basedir=$basedir\n" if $opt{v};
my $datadir = ($defaults =~ m/--datadir=(.*)/)[0];
my $datadir = ($defaults =~ m/--datadir=(.*)/g)[-1];
my $slowlog = ($defaults =~ m/--log-slow-queries=(.*)/)[0];
if (!$datadir or $opt{i}) {
# determine the datadir from the instances section of /etc/my.cnf, if any

Loading…
Cancel
Save