mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 17:54:16 +01:00
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.
This commit is contained in:
parent
03a350378a
commit
49dff5a4b6
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue