mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-07 21:09:14 +00:00
41 lines
1.2 KiB
Perl
41 lines
1.2 KiB
Perl
#!/usr/bin/env perl
|
|
|
|
BEGIN {
|
|
die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n"
|
|
unless $ENV{PERCONA_TOOLKIT_BRANCH} && -d $ENV{PERCONA_TOOLKIT_BRANCH};
|
|
unshift @INC, "$ENV{PERCONA_TOOLKIT_BRANCH}/lib";
|
|
};
|
|
|
|
use strict;
|
|
use warnings FATAL => 'all';
|
|
use English qw(-no_match_vars);
|
|
use Test::More tests => 2;
|
|
|
|
use PerconaTest;
|
|
|
|
# #############################################################################
|
|
# Issue 687: Test segfaults on old version of Perl
|
|
# #############################################################################
|
|
my $zcat = `uname` =~ m/Darwin/ ? 'gzcat' : 'zcat';
|
|
my $output = `$zcat $trunk/t/lib/samples/slowlogs/slow039.txt.gz | $trunk/bin/pt-query-digest 2>/tmp/mqd-warnings.txt`;
|
|
like(
|
|
$output,
|
|
qr/Query 1:/,
|
|
'INSERT that segfaulted fingerprint() (issue 687)'
|
|
);
|
|
|
|
$output = `cat /tmp/mqd-warnings.txt`;
|
|
chomp $output;
|
|
is(
|
|
$output,
|
|
'',
|
|
'No warnings on INSERT that segfaulted fingerprint() (issue 687)',
|
|
);
|
|
|
|
diag(`rm -rf /tmp/mqd-warnings.txt`);
|
|
|
|
# #############################################################################
|
|
# Done.
|
|
# #############################################################################
|
|
exit;
|