summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-07-24 01:27:48 -0700
committerMichael Widenius <monty@askmonty.org>2011-07-24 01:27:48 -0700
commitdb9291fa2201e51b29713966612a589c9aa025fd (patch)
treeb92b35cbc583152a532622ebb4136ecf24ca163d
parent10065404eae16de02aa843a52d1d1f48dd23e9ac (diff)
downloadmariadb-git-db9291fa2201e51b29713966612a589c9aa025fd.tar.gz
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.
-rw-r--r--scripts/mysqldumpslow.sh5
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/mysqldumpslow.sh b/scripts/mysqldumpslow.sh
index 8580b8e6203..0d6989aa523 100644
--- a/scripts/mysqldumpslow.sh
+++ b/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