Merged fix-883098-extra-processlist-fields

This commit is contained in:
Brian Fraser
2012-08-02 15:12:59 -03:00
4 changed files with 33 additions and 6 deletions

View File

@@ -2968,7 +2968,7 @@ sub parse_event {
else {
PTDEBUG && _d('Saving new query, state', $curr->[STATE]);
push @new_cxn, [
@$curr, # proc info
@{$curr}[0..7], # proc info
int($query_start), # START
$etime, # ETIME
$time, # FSEEN
@@ -2982,7 +2982,7 @@ sub parse_event {
if ( $curr->[INFO] && defined $curr->[TIME] ) {
PTDEBUG && _d('Saving query of new cxn, state', $curr->[STATE]);
push @new_cxn, [
@$curr, # proc info
@{$curr}[0..7], # proc info
int($query_start), # START
$etime, # ETIME
$time, # FSEEN

View File

@@ -2397,7 +2397,7 @@ sub parse_event {
else {
PTDEBUG && _d('Saving new query, state', $curr->[STATE]);
push @new_cxn, [
@$curr, # proc info
@{$curr}[0..7], # proc info
int($query_start), # START
$etime, # ETIME
$time, # FSEEN
@@ -2411,7 +2411,7 @@ sub parse_event {
if ( $curr->[INFO] && defined $curr->[TIME] ) {
PTDEBUG && _d('Saving query of new cxn, state', $curr->[STATE]);
push @new_cxn, [
@$curr, # proc info
@{$curr}[0..7], # proc info
int($query_start), # START
$etime, # ETIME
$time, # FSEEN

View File

@@ -275,7 +275,7 @@ sub parse_event {
else {
PTDEBUG && _d('Saving new query, state', $curr->[STATE]);
push @new_cxn, [
@$curr, # proc info
@{$curr}[0..7], # proc info
int($query_start), # START
$etime, # ETIME
$time, # FSEEN
@@ -290,7 +290,7 @@ sub parse_event {
# But only save the new cxn if it's executing.
PTDEBUG && _d('Saving query of new cxn, state', $curr->[STATE]);
push @new_cxn, [
@$curr, # proc info
@{$curr}[0..7], # proc info
int($query_start), # START
$etime, # ETIME
$time, # FSEEN

View File

@@ -890,6 +890,33 @@ is(
"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.
# #############################################################################