mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-02 02:34:19 +00:00
Remove $Revision$ and finish re-branding modules. Rename MaatkitTest.pm to PerconaTest.pm. Put copyrights on one line.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# This program is copyright 2010 Percona Inc.
|
||||
# This program is copyright 2010-2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# Advisor package $Revision: 6830 $
|
||||
# Advisor package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: Advisor
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# This program is copyright 2010 Percona Inc.
|
||||
# This program is copyright 2010-2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# AdvisorRules package $Revision: 6813 $
|
||||
# AdvisorRules package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: AdvisorRules
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# BinaryLogParser package $Revision: 7522 $
|
||||
# BinaryLogParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: BinaryLogParser
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# ChangeHandler package $Revision: 6785 $
|
||||
# ChangeHandler package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: ChangeHandler
|
||||
@@ -260,7 +259,7 @@ sub process_rows {
|
||||
# ]
|
||||
$row = shift @$rows;
|
||||
my $sql = $self->$func(@$row);
|
||||
$sql .= " /*maatkit $trace_msg*/" if $trace_msg;
|
||||
$sql .= " /*percona-toolkit $trace_msg*/" if $trace_msg;
|
||||
$self->_take_action($sql, $row->[2]);
|
||||
}
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# CompareQueryTimes package $Revision: 6785 $
|
||||
# CompareQueryTimes package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: CompareQueryTimes
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# CompareResults package $Revision: 7096 $
|
||||
# CompareResults package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: CompareResults
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# CompareTableStructs package $Revision: 6785 $
|
||||
# CompareTableStructs package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: CompareTableStructs
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# CompareWarnings package $Revision: 7096 $
|
||||
# CompareWarnings package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: CompareWarnings
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# CopyRowsInsertSelect package $Revision: 7464 $
|
||||
# CopyRowsInsertSelect package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: CopyRowsInsertSelect
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# DSNParser package $Revision: 7388 $
|
||||
# DSNParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: DSNParser
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# Daemon package $Revision: 6255 $
|
||||
# Daemon package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: Daemon
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# DuplicateKeyFinder package $Revision: 7565 $
|
||||
# DuplicateKeyFinder package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: DuplicateKeyFinder
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# EventAggregator package $Revision: 7272 $
|
||||
# EventAggregator package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: EventAggregator
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# EventTimeline package $Revision: 6590 $
|
||||
# EventTimeline package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: EventTimeline
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# ExecutionThrottler package $Revision: 5266 $
|
||||
# ExecutionThrottler package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: ExecutionThrottler
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# ExplainAnalyzer package $Revision: 7096 $
|
||||
# ExplainAnalyzer package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: ExplainAnalyzer
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# FileIterator package $Revision: 7096 $
|
||||
# FileIterator package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: FileIterator
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# ForeignKeyIterator package $Revision: 7552 $
|
||||
# ForeignKeyIterator package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: ForeignKeyIterator
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# GeneralLogParser package $Revision: 7522 $
|
||||
# GeneralLogParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: GeneralLogParser
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# HTTPProtocolParser package $Revision: 5811 $
|
||||
# HTTPProtocolParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: HTTPProtocolParser
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# IndexUsage package $Revision: 7096 $
|
||||
# IndexUsage package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: IndexUsage
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2009-2010 Baron Schwartz.
|
||||
# This program is copyright 2009-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# InnoDBStatusParser package $Revision: 7096 $
|
||||
# InnoDBStatusParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: InnoDBStatusParser
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# KeySize package $Revision: 7096 $
|
||||
# KeySize package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: KeySize
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# LogSplitter package $Revision: 7177 $
|
||||
# LogSplitter package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: LogSplitter
|
||||
|
@@ -1,525 +0,0 @@
|
||||
# This program is copyright 2009-2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation, version 2; OR the Perl Artistic License. On UNIX and similar
|
||||
# systems, you can issue `man perlgpl' or `man perlartistic' to read these
|
||||
# licenses.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# MaatkitTest package $Revision: 7096 $
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: MaatkitTest
|
||||
# MaatkitTest is a collection of helper-subs for the Maatkit tests.
|
||||
# Any file arguments (like no_diff() $expected_output) are relative to
|
||||
# PERCONA_TOOLKIT_BRANCH. So passing "commont/t/samples/foo" means
|
||||
# "PERCONA_TOOLKIT_BRANCH/common/t/samples/foo". Do not BAIL_OUT() because
|
||||
# this terminates the *entire* test process; die instead. All
|
||||
# subs are exported by default, so is the variable $trunk, so there's
|
||||
# no need to import() in the test scripts.
|
||||
package MaatkitTest;
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use constant MKDEBUG => $ENV{MKDEBUG} || 0;
|
||||
|
||||
use Test::More;
|
||||
use Time::HiRes qw(usleep);
|
||||
use POSIX qw(signal_h);
|
||||
use Data::Dumper;
|
||||
$Data::Dumper::Indent = 1;
|
||||
$Data::Dumper::Sortkeys = 1;
|
||||
$Data::Dumper::Quotekeys = 0;
|
||||
|
||||
require Exporter;
|
||||
our @ISA = qw(Exporter);
|
||||
our %EXPORT_TAGS = ();
|
||||
our @EXPORT_OK = qw();
|
||||
our @EXPORT = qw(
|
||||
output
|
||||
load_data
|
||||
load_file
|
||||
parse_file
|
||||
wait_until
|
||||
wait_for
|
||||
test_log_parser
|
||||
test_protocol_parser
|
||||
test_packet_parser
|
||||
no_diff
|
||||
throws_ok
|
||||
remove_traces
|
||||
test_bash_tool
|
||||
$trunk
|
||||
$dsn_opts
|
||||
$sandbox_version
|
||||
);
|
||||
|
||||
our $trunk = $ENV{PERCONA_TOOLKIT_BRANCH};
|
||||
|
||||
our $sandbox_version = '';
|
||||
eval {
|
||||
chomp(my $v = `$trunk/sandbox/test-env version`);
|
||||
$sandbox_version = $v if $v;
|
||||
};
|
||||
|
||||
our $dsn_opts = [
|
||||
{
|
||||
key => 'A',
|
||||
desc => 'Default character set',
|
||||
dsn => 'charset',
|
||||
copy => 1,
|
||||
},
|
||||
{
|
||||
key => 'D',
|
||||
desc => 'Database to use',
|
||||
dsn => 'database',
|
||||
copy => 1,
|
||||
},
|
||||
{
|
||||
key => 'F',
|
||||
desc => 'Only read default options from the given file',
|
||||
dsn => 'mysql_read_default_file',
|
||||
copy => 1,
|
||||
},
|
||||
{
|
||||
key => 'h',
|
||||
desc => 'Connect to host',
|
||||
dsn => 'host',
|
||||
copy => 1,
|
||||
},
|
||||
{
|
||||
key => 'p',
|
||||
desc => 'Password to use when connecting',
|
||||
dsn => 'password',
|
||||
copy => 1,
|
||||
},
|
||||
{
|
||||
key => 'P',
|
||||
desc => 'Port number to use for connection',
|
||||
dsn => 'port',
|
||||
copy => 1,
|
||||
},
|
||||
{
|
||||
key => 'S',
|
||||
desc => 'Socket file to use for connection',
|
||||
dsn => 'mysql_socket',
|
||||
copy => 1,
|
||||
},
|
||||
{
|
||||
key => 't',
|
||||
desc => 'Table',
|
||||
dsn => undef,
|
||||
copy => 1,
|
||||
},
|
||||
{
|
||||
key => 'u',
|
||||
desc => 'User for login if not current user',
|
||||
dsn => 'user',
|
||||
copy => 1,
|
||||
},
|
||||
];
|
||||
|
||||
# Runs code, captures and returns its output.
|
||||
# Optional arguments:
|
||||
# * file scalar: capture output to this file (default none)
|
||||
# * stderr scalar: capture STDERR (default no)
|
||||
# * die scalar: die if code dies (default no)
|
||||
# * trf coderef: pass output to this coderef (default none)
|
||||
sub output {
|
||||
my ( $code, %args ) = @_;
|
||||
die "I need a code argument" unless $code;
|
||||
my ($file, $stderr, $die, $trf) = @args{qw(file stderr die trf)};
|
||||
|
||||
my $output = '';
|
||||
if ( $file ) {
|
||||
open *output_fh, '>', $file
|
||||
or die "Cannot open file $file: $OS_ERROR";
|
||||
}
|
||||
else {
|
||||
open *output_fh, '>', \$output
|
||||
or die "Cannot capture output to variable: $OS_ERROR";
|
||||
}
|
||||
local *STDOUT = *output_fh;
|
||||
|
||||
# If capturing STDERR we must dynamically scope (local) STDERR
|
||||
# in the outer scope of the sub. If we did,
|
||||
# if ( $args{stderr} ) { local *STDERR; ... }
|
||||
# then STDERR would revert to its original value outside the if
|
||||
# block.
|
||||
local *STDERR if $args{stderr}; # do in outer scope of this sub
|
||||
*STDERR = *STDOUT if $args{stderr};
|
||||
|
||||
eval { $code->() };
|
||||
close *output_fh;
|
||||
if ( $EVAL_ERROR ) {
|
||||
die $EVAL_ERROR if $die;
|
||||
return $EVAL_ERROR;
|
||||
}
|
||||
|
||||
# Possible transform output before returning it. This doesn't work
|
||||
# if output was captured to a file.
|
||||
$output = $trf->($output) if $trf;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
# Load data from file and removes spaces. Used to load tcpdump dumps.
|
||||
sub load_data {
|
||||
my ( $file ) = @_;
|
||||
$file = "$trunk/$file";
|
||||
open my $fh, '<', $file or die "Cannot open $file: $OS_ERROR";
|
||||
my $contents = do { local $/ = undef; <$fh> };
|
||||
close $fh;
|
||||
(my $data = join('', $contents =~ m/(.*)/g)) =~ s/\s+//g;
|
||||
return $data;
|
||||
}
|
||||
|
||||
# Slurp file and return its entire contents.
|
||||
sub load_file {
|
||||
my ( $file, %args ) = @_;
|
||||
$file = "$trunk/$file";
|
||||
open my $fh, "<", $file or die "Cannot open $file: $OS_ERROR";
|
||||
my $contents = do { local $/ = undef; <$fh> };
|
||||
close $fh;
|
||||
chomp $contents if $args{chomp_contents};
|
||||
return $contents;
|
||||
}
|
||||
|
||||
sub parse_file {
|
||||
my ( $file, $p, $ea ) = @_;
|
||||
$file = "$trunk/$file";
|
||||
my @e;
|
||||
eval {
|
||||
open my $fh, "<", $file or die "Cannot open $file: $OS_ERROR";
|
||||
my %args = (
|
||||
next_event => sub { return <$fh>; },
|
||||
tell => sub { return tell $fh; },
|
||||
fh => $fh,
|
||||
);
|
||||
while ( my $e = $p->parse_event(%args) ) {
|
||||
push @e, $e;
|
||||
$ea->aggregate($e) if $ea;
|
||||
}
|
||||
close $fh;
|
||||
};
|
||||
die $EVAL_ERROR if $EVAL_ERROR;
|
||||
return \@e;
|
||||
}
|
||||
|
||||
# Wait until code returns true.
|
||||
sub wait_until {
|
||||
my ( $code, $t, $max_t ) = @_;
|
||||
my $slept = 0;
|
||||
my $sleep_int = $t || .5;
|
||||
$t ||= .5;
|
||||
$max_t ||= 5;
|
||||
$t *= 1_000_000;
|
||||
while ( $slept <= $max_t ) {
|
||||
return if $code->();
|
||||
usleep($t);
|
||||
$slept += $sleep_int;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
# Wait t seconds for code to return.
|
||||
sub wait_for {
|
||||
my ( $code, $t ) = @_;
|
||||
$t ||= 0;
|
||||
my $mask = POSIX::SigSet->new(&POSIX::SIGALRM);
|
||||
my $action = POSIX::SigAction->new(
|
||||
sub { die },
|
||||
$mask,
|
||||
);
|
||||
my $oldaction = POSIX::SigAction->new();
|
||||
sigaction(&POSIX::SIGALRM, $action, $oldaction);
|
||||
eval {
|
||||
alarm $t;
|
||||
$code->();
|
||||
alarm 0;
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
# alarm was raised
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub _read {
|
||||
my ( $fh ) = @_;
|
||||
return <$fh>;
|
||||
}
|
||||
|
||||
sub test_log_parser {
|
||||
my ( %args ) = @_;
|
||||
foreach my $arg ( qw(parser file) ) {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my $p = $args{parser};
|
||||
|
||||
# Make sure caller isn't giving us something we don't understand.
|
||||
# We could ignore it, but then caller might not get the results
|
||||
# they expected.
|
||||
map { die "What is $_ for?"; }
|
||||
grep { $_ !~ m/^(?:parser|misc|file|result|num_events|oktorun)$/ }
|
||||
keys %args;
|
||||
|
||||
my $file = "$trunk/$args{file}";
|
||||
my @e;
|
||||
eval {
|
||||
open my $fh, "<", $file or die "Cannot open $file: $OS_ERROR";
|
||||
my %parser_args = (
|
||||
next_event => sub { return _read($fh); },
|
||||
tell => sub { return tell($fh); },
|
||||
fh => $fh,
|
||||
misc => $args{misc},
|
||||
oktorun => $args{oktorun},
|
||||
);
|
||||
while ( my $e = $p->parse_event(%parser_args) ) {
|
||||
push @e, $e;
|
||||
}
|
||||
close $fh;
|
||||
};
|
||||
|
||||
is(
|
||||
$EVAL_ERROR,
|
||||
'',
|
||||
"No error on $args{file}"
|
||||
);
|
||||
|
||||
if ( defined $args{result} ) {
|
||||
is_deeply(
|
||||
\@e,
|
||||
$args{result},
|
||||
$args{file}
|
||||
) or print "Got: ", Dumper(\@e);
|
||||
}
|
||||
|
||||
if ( defined $args{num_events} ) {
|
||||
is(
|
||||
scalar @e,
|
||||
$args{num_events},
|
||||
"$args{file} num_events"
|
||||
);
|
||||
}
|
||||
|
||||
return \@e;
|
||||
}
|
||||
|
||||
sub test_protocol_parser {
|
||||
my ( %args ) = @_;
|
||||
foreach my $arg ( qw(parser protocol file) ) {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my $parser = $args{parser};
|
||||
my $protocol = $args{protocol};
|
||||
|
||||
# Make sure caller isn't giving us something we don't understand.
|
||||
# We could ignore it, but then caller might not get the results
|
||||
# they expected.
|
||||
map { die "What is $_ for?"; }
|
||||
grep { $_ !~ m/^(?:parser|protocol|misc|file|result|num_events|desc)$/ }
|
||||
keys %args;
|
||||
|
||||
my $file = "$trunk/$args{file}";
|
||||
my @e;
|
||||
eval {
|
||||
open my $fh, "<", $file or die "Cannot open $file: $OS_ERROR";
|
||||
my %parser_args = (
|
||||
next_event => sub { return _read($fh); },
|
||||
tell => sub { return tell($fh); },
|
||||
misc => $args{misc},
|
||||
);
|
||||
while ( my $p = $parser->parse_event(%parser_args) ) {
|
||||
my $e = $protocol->parse_event(%parser_args, event => $p);
|
||||
push @e, $e if $e;
|
||||
}
|
||||
close $fh;
|
||||
};
|
||||
|
||||
is(
|
||||
$EVAL_ERROR,
|
||||
'',
|
||||
"No error on $args{file}"
|
||||
);
|
||||
|
||||
if ( defined $args{result} ) {
|
||||
is_deeply(
|
||||
\@e,
|
||||
$args{result},
|
||||
$args{file} . ($args{desc} ? ": $args{desc}" : '')
|
||||
) or print "Got: ", Dumper(\@e);
|
||||
}
|
||||
|
||||
if ( defined $args{num_events} ) {
|
||||
is(
|
||||
scalar @e,
|
||||
$args{num_events},
|
||||
"$args{file} num_events"
|
||||
);
|
||||
}
|
||||
|
||||
return \@e;
|
||||
}
|
||||
|
||||
sub test_packet_parser {
|
||||
my ( %args ) = @_;
|
||||
foreach my $arg ( qw(parser file) ) {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my $parser = $args{parser};
|
||||
|
||||
# Make sure caller isn't giving us something we don't understand.
|
||||
# We could ignore it, but then caller might not get the results
|
||||
# they expected.
|
||||
map { die "What is $_ for?"; }
|
||||
grep { $_ !~ m/^(?:parser|misc|file|result|desc|oktorun)$/ }
|
||||
keys %args;
|
||||
|
||||
my $file = "$trunk/$args{file}";
|
||||
my @packets;
|
||||
open my $fh, '<', $file or die "Cannot open $file: $OS_ERROR";
|
||||
my %parser_args = (
|
||||
next_event => sub { return _read($fh); },
|
||||
tell => sub { return tell($fh); },
|
||||
misc => $args{misc},
|
||||
oktorun => $args{oktorun},
|
||||
);
|
||||
while ( my $packet = $parser->parse_event(%parser_args) ) {
|
||||
push @packets, $packet;
|
||||
}
|
||||
|
||||
# raw_packet is the actual dump text from the file. It's used
|
||||
# in MySQLProtocolParser but I don't think we need to double-check
|
||||
# it here. It will make the results very long.
|
||||
foreach my $packet ( @packets ) {
|
||||
delete $packet->{raw_packet};
|
||||
}
|
||||
|
||||
if ( !is_deeply(
|
||||
\@packets,
|
||||
$args{result},
|
||||
"$args{file}" . ($args{desc} ? ": $args{desc}" : '')
|
||||
) ) {
|
||||
print Dumper(\@packets);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
# no_diff() compares the STDOUT output of a cmd or code to expected output.
|
||||
# Returns true if there are no differences between the two outputs,
|
||||
# else returns false. Dies if the cmd/code dies. Does not capture STDERR.
|
||||
# Args:
|
||||
# * cmd scalar or coderef: if cmd is a scalar then the
|
||||
# cmd is ran via the shell. if it's a coderef then
|
||||
# the code is ran. the latter is preferred because
|
||||
# it generates test coverage.
|
||||
# * expected_output scalar: file name relative to PERCONA_TOOLKIT_BRANCH
|
||||
# * args hash: (optional) may include
|
||||
# update_sample overwrite expected_output with cmd/code output
|
||||
# keep_output keep last cmd/code output file
|
||||
# * trf transform cmd/code output before diff
|
||||
# The sub dies if cmd or code dies. STDERR is not captured.
|
||||
sub no_diff {
|
||||
my ( $cmd, $expected_output, %args ) = @_;
|
||||
die "I need a cmd argument" unless $cmd;
|
||||
die "I need an expected_output argument" unless $expected_output;
|
||||
|
||||
$expected_output = "$trunk/$expected_output";
|
||||
die "$expected_output does not exist" unless -f $expected_output;
|
||||
|
||||
my $tmp_file = '/tmp/maatkit-test-output.txt';
|
||||
my $tmp_file_orig = '/tmp/maatkit-test-output-original.txt';
|
||||
|
||||
# Determine cmd type and run it.
|
||||
if ( ref $cmd eq 'CODE' ) {
|
||||
output($cmd, file => $tmp_file);
|
||||
}
|
||||
elsif ( $args{cmd_output} ) {
|
||||
# Copy cmd output to tmp file so we don't with the original.
|
||||
open my $tmp_fh, '>', $tmp_file or die "Cannot open $tmp_file: $OS_ERROR";
|
||||
print $tmp_fh $cmd;
|
||||
close $tmp_fh;
|
||||
}
|
||||
else {
|
||||
`$cmd > $tmp_file`;
|
||||
}
|
||||
|
||||
# Do optional arg stuff.
|
||||
`cp $tmp_file $tmp_file_orig`;
|
||||
if ( my $trf = $args{trf} ) {
|
||||
`$trf $tmp_file_orig > $tmp_file`;
|
||||
}
|
||||
if ( my $sed = $args{sed} ) {
|
||||
foreach my $sed_args ( @{$args{sed}} ) {
|
||||
`sed $sed_args $tmp_file`;
|
||||
}
|
||||
}
|
||||
|
||||
# diff the outputs.
|
||||
my $retval = system("diff $tmp_file $expected_output");
|
||||
|
||||
# diff returns 0 if there were no differences,
|
||||
# so !0 = 1 = no diff in our testing parlance.
|
||||
$retval = $retval >> 8;
|
||||
|
||||
if ( $retval ) {
|
||||
if ( $ENV{UPDATE_SAMPLES} || $args{update_sample} ) {
|
||||
`cat $tmp_file > $expected_output`;
|
||||
print STDERR "Updated $expected_output\n";
|
||||
}
|
||||
}
|
||||
|
||||
# Remove our tmp files.
|
||||
`rm -f $tmp_file $tmp_file_orig`
|
||||
unless $ENV{KEEP_OUTPUT} || $args{keep_output};
|
||||
|
||||
return !$retval;
|
||||
}
|
||||
|
||||
sub throws_ok {
|
||||
my ( $code, $pat, $msg ) = @_;
|
||||
eval { $code->(); };
|
||||
like ( $EVAL_ERROR, $pat, $msg );
|
||||
}
|
||||
|
||||
# Remove /*maatkit ...*/ trace comments from the given SQL statement(s).
|
||||
# Traces are added in ChangeHandler::process_rows().
|
||||
sub remove_traces {
|
||||
my ( $sql ) = @_;
|
||||
my $trace_pat = qr/ \/\*maatkit .+?\*\//;
|
||||
if ( ref $sql && ref $sql eq 'ARRAY' ) {
|
||||
map { $_ =~ s/$trace_pat//gm } @$sql;
|
||||
}
|
||||
else {
|
||||
$sql =~ s/$trace_pat//gm;
|
||||
}
|
||||
return $sql;
|
||||
}
|
||||
|
||||
sub test_bash_tool {
|
||||
my ( $tool ) = @_;
|
||||
die "I need a tool argument" unless $tool;
|
||||
my $outfile = "/tmp/$tool-test-results.txt";
|
||||
`rm -rf $outfile >/dev/null`;
|
||||
`$trunk/util/test-bash-tool $tool > $outfile`;
|
||||
print `cat $outfile`;
|
||||
return;
|
||||
}
|
||||
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End MaatkitTest package
|
||||
# ###########################################################################
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# MasterSlave package $Revision: 7525 $
|
||||
# MasterSlave package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: MasterSlave
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# MemcachedEvent package $Revision: 7096 $
|
||||
# MemcachedEvent package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: MemcachedEvent
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# MemcachedProtocolParser package $Revision: 7521 $
|
||||
# MemcachedProtocolParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: MemcachedProtocolParser
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2009 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -15,7 +14,9 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
# ###########################################################################
|
||||
# MockSth package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: MockSth
|
||||
# MockSth simulates a DBI statement handle without a database connection.
|
||||
@@ -80,3 +81,6 @@ sub _d {
|
||||
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End MockSth package
|
||||
# ###########################################################################
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -14,7 +14,9 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
# ###########################################################################
|
||||
# MockSync package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: MockSync
|
||||
# MockSync simulates a table syncer module. It's used by RowDiff.t.
|
||||
@@ -56,3 +58,6 @@ sub key_cols {
|
||||
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End MockSync package
|
||||
# ###########################################################################
|
||||
|
@@ -14,7 +14,9 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
# ###########################################################################
|
||||
# MockSyncStream package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: MockSyncStream
|
||||
# MockSyncStream simulates a <TableSyncStream> module.
|
||||
@@ -144,3 +146,6 @@ sub _d {
|
||||
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End MockSyncStream package
|
||||
# ###########################################################################
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# MySQLConfig package $Revision: 7403 $
|
||||
# MySQLConfig package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: MySQLConfig
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# MySQLConfigComparer package $Revision: 7403 $
|
||||
# MySQLConfigComparer package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: MySQLConfigComparer
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2011 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# MySQLDump package $Revision: 6345 $
|
||||
# MySQLDump package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: MySQLDump
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# MySQLProtocolParser package $Revision: 7522 $
|
||||
# MySQLProtocolParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: MySQLProtocolParser
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# OSCCaptureSync package $Revision: 7463 $
|
||||
# OSCCaptureSync package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: OSCCaptureSync
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# OptionParser package $Revision: 7102 $
|
||||
# OptionParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: OptionParser
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# Outfile package $Revision: 5266 $
|
||||
# Outfile package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: Outfile
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2010 Baron Schwartz.
|
||||
# This program is copyright 2010-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# PgLogParser package $Revision: 5835 $
|
||||
# PgLogParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: PgLogParser
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# Pipeline package $Revision: 7509 $
|
||||
# Pipeline package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: Pipeline
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# PodParser package $Revision: 7053 $
|
||||
# PodParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: PodParser
|
||||
@@ -62,7 +62,6 @@ sub new {
|
||||
my $self = {
|
||||
current_section => '',
|
||||
current_item => '',
|
||||
in_list => 0,
|
||||
items => {}, # keyed off SECTION
|
||||
magic => {}, # keyed off SECTION->magic ident (without MAGIC_)
|
||||
magic_ident => '', # set when next para is a magic para
|
||||
@@ -83,7 +82,7 @@ sub get_magic {
|
||||
sub parse_from_file {
|
||||
my ( $self, $file ) = @_;
|
||||
return unless $file;
|
||||
|
||||
MKDEBUG && _d('Parsing POD in', $file);
|
||||
open my $fh, "<", $file or die "Cannot open $file: $OS_ERROR";
|
||||
local $INPUT_RECORD_SEPARATOR = ''; # read paragraphs
|
||||
my $para;
|
||||
@@ -99,7 +98,7 @@ sub parse_from_file {
|
||||
MKDEBUG && _d('cmd:', $cmd, 'name:', $name);
|
||||
$self->command($cmd, $name);
|
||||
}
|
||||
else {
|
||||
elsif ( $parse_items_from{$self->{current_section}} ) {
|
||||
$self->textblock($para);
|
||||
}
|
||||
}
|
||||
@@ -113,17 +112,18 @@ sub command {
|
||||
my ( $self, $cmd, $name ) = @_;
|
||||
|
||||
$name =~ s/\s+\Z//m; # Remove \n and blank line after name.
|
||||
|
||||
if ( $cmd eq 'head1' && $parse_items_from{$name} ) {
|
||||
|
||||
if ( $cmd eq 'head1' ) {
|
||||
MKDEBUG && _d('In section', $name);
|
||||
$self->{current_section} = $name;
|
||||
$self->{items}->{$name} = {};
|
||||
}
|
||||
elsif ( $cmd eq 'over' ) {
|
||||
MKDEBUG && _d('Start items in', $self->{current_section});
|
||||
$self->{in_list} = 1;
|
||||
if ( $parse_items_from{$name} ) {
|
||||
MKDEBUG && _d('Start items in', $self->{current_section});
|
||||
$self->{items}->{$self->{current_section}} = {};
|
||||
}
|
||||
}
|
||||
elsif ( $cmd eq 'item' ) {
|
||||
elsif ( $cmd eq 'item' && $parse_items_from{$self->{current_section}} ) {
|
||||
my $pat = $item_pattern_for{ $self->{current_section} };
|
||||
my ($item) = $name =~ m/$pat/;
|
||||
if ( $item ) {
|
||||
@@ -137,13 +137,13 @@ sub command {
|
||||
warn "Item $name does not match $pat";
|
||||
}
|
||||
}
|
||||
elsif ( $cmd eq '=back' ) {
|
||||
MKDEBUG && _d('End items');
|
||||
$self->{in_list} = 0;
|
||||
elsif ( $cmd eq 'back' ) {
|
||||
if ( $parse_items_from{$self->{current_section}} ) {
|
||||
MKDEBUG && _d('End items in', $self->{current_section});
|
||||
}
|
||||
}
|
||||
else {
|
||||
$self->{current_section} = '';
|
||||
$self->{in_list} = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2008-2011 Baron Schwartz.
|
||||
# This program is copyright 2008-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# Processlist package $Revision: 7289 $
|
||||
# Processlist package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: Processlist
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# ProcesslistAggregator package $Revision: 6590 $
|
||||
# ProcesslistAggregator package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: ProcesslistAggregator
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# Progress package $Revision: 7096 $
|
||||
# Progress package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: Progress
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# ProtocolParser package $Revision: 7522 $
|
||||
# ProtocolParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: ProtocolParser
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# QueryAdvisorRules package $Revision: 7473 $
|
||||
# QueryAdvisorRules package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: QueryAdvisorRules
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# QueryParser package $Revision: 7452 $
|
||||
# QueryParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: QueryParser
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# QueryReportFormatter package $Revision: 7274 $
|
||||
# QueryReportFormatter package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: QueryReportFormatter
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# QueryReview package $Revision: 7342 $
|
||||
# QueryReview package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: QueryReview
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2011 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# QueryRewriter package $Revision: 7473 $
|
||||
# QueryRewriter package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: QueryRewriter
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# Quoter package $Revision: 6850 $
|
||||
# Quoter package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: Quoter
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# ReportFormatter package $Revision: 7473 $
|
||||
# ReportFormatter package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: ReportFormatter
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# Retry package $Revision: 7473 $
|
||||
# Retry package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: Retry
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2009 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# RowDiff package $Revision: 5697 $
|
||||
# RowDiff package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: RowDiff
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# Runtime package $Revision: 7221 $
|
||||
# Runtime package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: Runtime
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# SQLParser package $Revision: 7565 $
|
||||
# SQLParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: SQLParser
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# Sandbox package $Revision: 7140 $
|
||||
# Sandbox package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: Sandbox
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# Schema package $Revision: 7565 $
|
||||
# Schema package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: Schema
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# SchemaIterator package $Revision: 7547 $
|
||||
# SchemaIterator package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: SchemaIterator
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2011 Baron Schwartz.
|
||||
# This program is copyright 2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# SimpleTCPDumpParser package $Revision: 7515 $
|
||||
# SimpleTCPDumpParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: SimpleTCPDumpParser
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2011 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# SlowLogParser package $Revision: 7522 $
|
||||
# SlowLogParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: SlowLogParser
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2009 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# SlowLogWriter package $Revision: 6590 $
|
||||
# SlowLogWriter package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: SlowLogWriter
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2010 Baron Schwartz.
|
||||
# This program is copyright 2010-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# SysLogParser package $Revision: 5831 $
|
||||
# SysLogParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: SysLogParser
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2011 Baron Schwartz.
|
||||
# This program is copyright 2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TCPRequestAggregator package $Revision: 7515 $
|
||||
# TCPRequestAggregator package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TCPRequestAggregator
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2009 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TableChecksum package $Revision: 7080 $
|
||||
# TableChecksum package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TableChecksum
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TableChunker package $Revision: 7169 $
|
||||
# TableChunker package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TableChunker
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2009 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TableNibbler package $Revision: 5266 $
|
||||
# TableNibbler package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TableNibbler
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TableParser package $Revision: 7550 $
|
||||
# TableParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TableParser
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TableSyncChunk package $Revision: 6389 $
|
||||
# TableSyncChunk package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TableSyncChunk
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TableSyncGroupBy package $Revision: 5697 $
|
||||
# TableSyncGroupBy package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TableSyncGroupBy
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TableSyncNibble package $Revision: 6511 $
|
||||
# TableSyncNibble package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TableSyncNibble
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TableSyncStream package $Revision: 5697 $
|
||||
# TableSyncStream package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TableSyncStream
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TableSyncer package $Revision: 7528 $
|
||||
# TableSyncer package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TableSyncer
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TableUsage package $Revision: 7498 $
|
||||
# TableUsage package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TableUsage
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2010 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TcpdumpParser package $Revision: 7505 $
|
||||
# TcpdumpParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TcpdumpParser
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TextResultSetParser package $Revision: 6898 $
|
||||
# TextResultSetParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TextResultSetParser
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# TimeSeriesTrender package $Revision: 7096 $
|
||||
# TimeSeriesTrender package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: TimeSeriesTrender
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# Transformers package $Revision: 7226 $
|
||||
# Transformers package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: Transformers
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# UpgradeReportFormatter package $Revision: 7193 $
|
||||
# UpgradeReportFormatter package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: UpgradeReportFormatter
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# VariableAdvisorRules package $Revision: 6821 $
|
||||
# VariableAdvisorRules package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: VariableAdvisorRules
|
||||
|
@@ -1,5 +1,4 @@
|
||||
# This program is copyright 2011 Percona Inc.
|
||||
# This program is copyright 2007-2009 Baron Schwartz.
|
||||
# This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -16,7 +15,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
# Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
# ###########################################################################
|
||||
# VersionParser package $Revision: 6667 $
|
||||
# VersionParser package
|
||||
# ###########################################################################
|
||||
{
|
||||
# Package: VersionParser
|
||||
|
@@ -11,7 +11,7 @@ use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use Test::More tests => 5;
|
||||
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
use QueryAdvisorRules;
|
||||
use Advisor;
|
||||
use PodParser;
|
||||
|
@@ -11,7 +11,7 @@ use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use Test::More tests => 7;
|
||||
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
use BinaryLogParser;
|
||||
|
||||
my $p = new BinaryLogParser();
|
||||
|
@@ -15,7 +15,7 @@ use ChangeHandler;
|
||||
use Quoter;
|
||||
use DSNParser;
|
||||
use Sandbox;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
my $dp = new DSNParser(opts => $dsn_opts);
|
||||
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
||||
@@ -463,7 +463,7 @@ $ch->process_rows(1, "trace");
|
||||
|
||||
is_deeply(
|
||||
\@rows,
|
||||
["INSERT INTO `test`.`foo`(`a`, `b`) VALUES ('1', '2') /*maatkit trace*/",],
|
||||
["INSERT INTO `test`.`foo`(`a`, `b`) VALUES ('1', '2') /*percona-toolkit trace*/",],
|
||||
"process_rows() appends trace msg to SQL statements"
|
||||
);
|
||||
|
||||
|
@@ -16,7 +16,7 @@ use Transformers;
|
||||
use DSNParser;
|
||||
use Sandbox;
|
||||
use CompareQueryTimes;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
my $dp = new DSNParser(opts=>$dsn_opts);
|
||||
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
||||
|
@@ -30,7 +30,7 @@ use Transformers;
|
||||
use Retry;
|
||||
use Sandbox;
|
||||
use CompareResults;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
my $dp = new DSNParser(opts=>$dsn_opts);
|
||||
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
||||
@@ -136,7 +136,7 @@ isa_ok($cr, 'CompareResults');
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
MaatkitTest::wait_until(
|
||||
PerconaTest::wait_until(
|
||||
sub {
|
||||
my $r;
|
||||
eval {
|
||||
@@ -355,7 +355,7 @@ isa_ok($cr, 'CompareResults');
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
MaatkitTest::wait_until(
|
||||
PerconaTest::wait_until(
|
||||
sub {
|
||||
my $r;
|
||||
eval {
|
||||
|
@@ -18,7 +18,7 @@ use Transformers;
|
||||
use DSNParser;
|
||||
use Sandbox;
|
||||
use CompareWarnings;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
my $dp = new DSNParser(opts=>$dsn_opts);
|
||||
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
BEGIN {
|
||||
die "The MAATKIT_WORKING_COPY environment variable is not set. See http://code.google.com/p/maatkit/wiki/Testing"
|
||||
unless $ENV{MAATKIT_WORKING_COPY} && -d $ENV{MAATKIT_WORKING_COPY};
|
||||
unshift @INC, "$ENV{MAATKIT_WORKING_COPY}/common";
|
||||
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;
|
||||
@@ -13,7 +13,7 @@ use Test::More;
|
||||
|
||||
use DSNParser;
|
||||
use Sandbox;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
use Progress;
|
||||
use Transformers;
|
||||
use Retry;
|
||||
@@ -46,7 +46,7 @@ my $osc = new CopyRowsInsertSelect(Retry => $rr);
|
||||
my $msg = sub { print "$_[0]\n"; };
|
||||
my $output = "";
|
||||
|
||||
$sb->load_file("master", "common/t/samples/osc/tbl001.sql");
|
||||
$sb->load_file("master", "t/lib/samples/osc/tbl001.sql");
|
||||
$dbh->do("USE osc");
|
||||
|
||||
$osc->copy(
|
||||
@@ -83,7 +83,7 @@ $output = output( sub {
|
||||
ok(
|
||||
no_diff(
|
||||
$output,
|
||||
"common/t/samples/osc/copyins001.txt",
|
||||
"t/lib/samples/osc/copyins001.txt",
|
||||
cmd_output => 1,
|
||||
),
|
||||
"Prints 2 SQL statments for the 2 chunks"
|
||||
|
@@ -13,7 +13,7 @@ use Test::More tests => 27;
|
||||
|
||||
use DSNParser;
|
||||
use OptionParser;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
my $opts = [
|
||||
{
|
||||
|
@@ -13,7 +13,7 @@ use Test::More tests => 23;
|
||||
|
||||
use Daemon;
|
||||
use OptionParser;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
my $o = new OptionParser(file => "$trunk/t/lib/samples/daemonizes.pl");
|
||||
my $d = new Daemon(o=>$o);
|
||||
|
@@ -14,7 +14,7 @@ use Test::More tests => 37;
|
||||
use DuplicateKeyFinder;
|
||||
use Quoter;
|
||||
use TableParser;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
my $dk = new DuplicateKeyFinder();
|
||||
my $q = new Quoter();
|
||||
|
@@ -17,7 +17,7 @@ use QueryParser;
|
||||
use SlowLogParser;
|
||||
use BinaryLogParser;
|
||||
use Transformers;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
my $qr = new QueryRewriter();
|
||||
my $qp = new QueryParser();
|
||||
|
@@ -14,7 +14,7 @@ use Test::More tests => 3;
|
||||
use Transformers;
|
||||
use QueryRewriter;
|
||||
use EventTimeline;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
my $qr = new QueryRewriter();
|
||||
my ( $result, $events, $et, $expected );
|
||||
|
@@ -12,7 +12,7 @@ use English qw(-no_match_vars);
|
||||
use Test::More tests => 12;
|
||||
|
||||
use ExecutionThrottler;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
use constant MKDEBUG => $ENV{MKDEBUG};
|
||||
|
||||
|
@@ -22,7 +22,7 @@ use QueryRewriter;
|
||||
use QueryParser;
|
||||
use DSNParser;
|
||||
use Sandbox;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
my $dp = new DSNParser(opts=>$dsn_opts);
|
||||
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
||||
|
@@ -12,7 +12,7 @@ use English qw(-no_match_vars);
|
||||
use Test::More tests => 12;
|
||||
|
||||
use FileIterator;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
use constant MKDEBUG => $ENV{MKDEBUG} || 0;
|
||||
|
||||
|
@@ -19,7 +19,7 @@ use Quoter;
|
||||
use TableParser;
|
||||
use DSNParser;
|
||||
use OptionParser;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
use constant MKDEBUG => $ENV{MKDEBUG} || 0;
|
||||
|
||||
|
@@ -12,7 +12,7 @@ use English qw(-no_match_vars);
|
||||
use Test::More tests => 7;
|
||||
|
||||
use GeneralLogParser;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
my $p = new GeneralLogParser();
|
||||
|
||||
|
@@ -14,7 +14,7 @@ use Test::More tests => 16;
|
||||
use TcpdumpParser;
|
||||
use ProtocolParser;
|
||||
use HTTPProtocolParser;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
my $tcpdump = new TcpdumpParser();
|
||||
my $protocol; # Create a new HTTPProtocolParser for each test.
|
||||
|
@@ -19,7 +19,7 @@ use DSNParser;
|
||||
use Transformers;
|
||||
use QueryRewriter;
|
||||
use Sandbox;
|
||||
use MaatkitTest;
|
||||
use PerconaTest;
|
||||
|
||||
use Data::Dumper;
|
||||
$Data::Dumper::Indent = 1;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user