mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-22 02:39:04 +00:00
Failing test and XXX code comment about a bug used to test this bug.
This commit is contained in:
@@ -13239,6 +13239,11 @@ sub print_reports {
|
||||
);
|
||||
|
||||
if ( $o->get('report') ) {
|
||||
# XXX There's a bug here: --expected-range '','' will cause
|
||||
# Use of uninitialized value in numeric lt (<)
|
||||
# This bug is intentionally left unfixed at the moment because
|
||||
# we exploit it to test a more serious bug: an infinite loop:
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/888114
|
||||
my $expected_range = $o->get('expected-range');
|
||||
my $explain_why = $expected_range
|
||||
&& ( @$worst < $expected_range->[0]
|
||||
|
||||
@@ -9,9 +9,12 @@ BEGIN {
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use Test::More tests => 2;
|
||||
use Test::More tests => 3;
|
||||
|
||||
use PerconaTest;
|
||||
shift @INC; # our unshift (above)
|
||||
shift @INC; # PerconaTest's unshift
|
||||
require "$trunk/bin/pt-query-digest";
|
||||
|
||||
my $output;
|
||||
|
||||
@@ -30,6 +33,25 @@ like(
|
||||
'Continues on error by default'
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
# Infinite loop in pt-query-digest if a report crashe
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/888114
|
||||
# #############################################################################
|
||||
|
||||
# This bug is due to the fact that --continue-on-error is on by default.
|
||||
# To reproduce the problem, we must intentionally crash pt-query-digest
|
||||
# in the right place, which means we're using another bug:a
|
||||
$output = output(
|
||||
sub { pt_query_digest::main("$trunk/t/lib/samples/slowlogs/slow002.txt",
|
||||
"--expected-range", "'',''") },
|
||||
stderr => 1,
|
||||
);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/Query\s+1/,
|
||||
"No infinite loop in report crashes (bug 888114)"
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
|
||||
Reference in New Issue
Block a user