mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 13:11:32 +00:00
Fix for 883098: Extra processlist fields causing errors
This commit is contained in:
@@ -275,7 +275,7 @@ sub parse_event {
|
|||||||
else {
|
else {
|
||||||
PTDEBUG && _d('Saving new query, state', $curr->[STATE]);
|
PTDEBUG && _d('Saving new query, state', $curr->[STATE]);
|
||||||
push @new_cxn, [
|
push @new_cxn, [
|
||||||
@$curr, # proc info
|
@{$curr}[0..7], # proc info
|
||||||
int($query_start), # START
|
int($query_start), # START
|
||||||
$etime, # ETIME
|
$etime, # ETIME
|
||||||
$time, # FSEEN
|
$time, # FSEEN
|
||||||
@@ -290,7 +290,7 @@ sub parse_event {
|
|||||||
# But only save the new cxn if it's executing.
|
# But only save the new cxn if it's executing.
|
||||||
PTDEBUG && _d('Saving query of new cxn, state', $curr->[STATE]);
|
PTDEBUG && _d('Saving query of new cxn, state', $curr->[STATE]);
|
||||||
push @new_cxn, [
|
push @new_cxn, [
|
||||||
@$curr, # proc info
|
@{$curr}[0..7], # proc info
|
||||||
int($query_start), # START
|
int($query_start), # START
|
||||||
$etime, # ETIME
|
$etime, # ETIME
|
||||||
$time, # FSEEN
|
$time, # FSEEN
|
||||||
|
@@ -890,6 +890,33 @@ is(
|
|||||||
"NULL STATE shouldn't cause warnings"
|
"NULL STATE shouldn't cause warnings"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# #############################################################################
|
||||||
|
# Extra processlist fields are ignored and don't cause errors
|
||||||
|
# https://bugs.launchpad.net/percona-toolkit/+bug/883098
|
||||||
|
# #############################################################################
|
||||||
|
|
||||||
|
$procs = [
|
||||||
|
[ [1, 'unauthenticated user', 'localhost', undef, 'Connect', 7,
|
||||||
|
'some state', 1, 0, 0, 1] ],
|
||||||
|
[ [1, 'unauthenticated user', 'localhost', undef, 'Connect', 8,
|
||||||
|
undef, 2, 1, 2, 0] ],
|
||||||
|
],
|
||||||
|
|
||||||
|
eval {
|
||||||
|
parse_n_times(
|
||||||
|
2,
|
||||||
|
code => sub {
|
||||||
|
return shift @$procs;
|
||||||
|
},
|
||||||
|
time => Transformers::unix_timestamp('2001-01-01 00:05:00'),
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
is(
|
||||||
|
$EVAL_ERROR,
|
||||||
|
'',
|
||||||
|
"Extra processlist fields don't cause errors"
|
||||||
|
);
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
# Done.
|
# Done.
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
|
Reference in New Issue
Block a user