Skip to content
/ server Public
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/mysqldumpslow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ unless (@ARGV) {
my $defaults = `my_print_defaults --mysqld`;

my $datadir = ($defaults =~ m/--datadir=(.*)/g)[-1];
if (!$datadir or $opt{i}) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is incorrect. When instance option is specified, It will go read the instances and try to determine data dir even if datadir is specified.

I would support Serg's request: retarget this against main and remove the whole instance thing. The simpler, the better. I doubt anybody is using that.

Failing that please only go to read the instances only if there's an instance option and datadir is not specified.

if ($opt{i}) {
# determine the datadir from the instances section of /etc/my.cnf, if any
my $instances = `my_print_defaults instances`;
die "Can't determine datadir from 'my_print_defaults instances' output: $defaults"
Expand Down