Fix for 923896

This commit is contained in:
Brian Fraser fraserb@gmail.com
2012-05-27 23:28:35 -03:00
parent f6e265613c
commit 20d6ccff9e
3 changed files with 36 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ BEGIN {
use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
use Test::More tests => 32;
use Test::More tests => 34;
use Processlist;
use PerconaTest;
@@ -827,6 +827,37 @@ is_deeply(
"Find all queries that aren't ignored"
);
# #############################################################################
# https://bugs.launchpad.net/percona-toolkit/+bug/923896
# #############################################################################
%find_spec = (
busy_time => 1,
ignore => {},
match => {},
);
my $proc = { 'Time' => undef,
'Command' => 'Query',
'db' => undef,
'Id' => '7',
'Info' => undef,
'User' => 'msandbox',
'State' => '',
'Host' => 'localhost'
};
local $@;
eval { $pl->find([$proc], %find_spec) };
ok !$@;
delete $find_spec{busy_time};
$find_spec{idle_time} = 1;
$proc->{Command} = 'Sleep';
local $@;
eval { $pl->find([$proc], %find_spec) };
ok !$@;
# #############################################################################
# Done.
# #############################################################################