summaryrefslogtreecommitdiff
path: root/scripts/mysqldumpslow.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mysqldumpslow.sh')
-rw-r--r--scripts/mysqldumpslow.sh6
1 files changed, 1 insertions, 5 deletions
diff --git a/scripts/mysqldumpslow.sh b/scripts/mysqldumpslow.sh
index 94665f345f4..776b7d06a2d 100644
--- a/scripts/mysqldumpslow.sh
+++ b/scripts/mysqldumpslow.sh
@@ -1,5 +1,4 @@
#!/usr/bin/perl
-
# Copyright (c) 2000-2002, 2005-2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
# Use is subject to license terms.
#
@@ -54,11 +53,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