Commit 49dff5a4 authored by PinkFreud's avatar PinkFreud Committed by Daniel Black

MDEV-34604 mytop - fix specifying filters in .mytop

Specifying filters (filter_status, filter_user, etc) in the mytop config
previously wouldn't work, because any filter specified here was added to
the config hash as a literal string.

This change fixes that - if filter_* is defined in the config and matches
an existing filter_* key, then run the value through StringOrRegex() and
assign to the config hash.
parent 03a35037
......@@ -147,7 +147,12 @@ if (-e $config)
if (/(\S+)\s*=\s*(.*\S)/)
{
$config{lc $1} = $2 if exists $config{lc $1};
my ($k, $v) = ($1, $2);
if ($k =~ /^filter_/i) {
$config{lc $k} = StringOrRegex($v) if exists $config{lc $k};
} else {
$config{lc $k} = $v if exists $config{lc $k};
}
}
}
close CFG;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment