mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 13:40:07 +00:00
Remove _d from Percona::Toolkit because I can't get it to export correctly. Put Percona::Toolkit in most tools.
This commit is contained in:
@@ -6,7 +6,42 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
OptionParser
|
||||
Mo
|
||||
TableParser
|
||||
DSNParser
|
||||
VersionParser
|
||||
Quoter
|
||||
TableNibbler
|
||||
Daemon
|
||||
MasterSlave
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# OptionParser package
|
||||
@@ -3815,6 +3850,7 @@ use Data::Dumper;
|
||||
$Data::Dumper::Indent = 1;
|
||||
$Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# Global variables; as few as possible.
|
||||
|
@@ -6,7 +6,41 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
OptionParser
|
||||
DSNParser
|
||||
Cxn
|
||||
Daemon
|
||||
TextResultSetParser
|
||||
MySQLConfig
|
||||
MySQLConfigComparer
|
||||
ReportFormatter
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# OptionParser package
|
||||
@@ -2917,6 +2951,7 @@ $Data::Dumper::Indent = 1;
|
||||
$Data::Dumper::Sortkeys = 1;
|
||||
$Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
sub main {
|
||||
|
@@ -6,7 +6,39 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
OptionParser
|
||||
Mo
|
||||
VersionParser
|
||||
Quoter
|
||||
DSNParser
|
||||
Daemon
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# OptionParser package
|
||||
@@ -2373,6 +2405,7 @@ use List::Util qw(max);
|
||||
use Socket qw(inet_aton);
|
||||
use sigtrap qw(handler finish untrapped normal-signals);
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
my $o;
|
||||
|
@@ -6,7 +6,42 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
Quoter
|
||||
TableParser
|
||||
DSNParser
|
||||
OptionParser
|
||||
KeySize
|
||||
DuplicateKeyFinder
|
||||
Daemon
|
||||
Schema
|
||||
SchemaIterator
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# Quoter package
|
||||
@@ -3324,10 +3359,12 @@ package pt_duplicate_key_checker;
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
use List::Util qw(max);
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
$OUTPUT_AUTOFLUSH = 1;
|
||||
|
||||
my $max_width = 74;
|
||||
|
34
bin/pt-find
34
bin/pt-find
@@ -6,7 +6,38 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
DSNParser
|
||||
OptionParser
|
||||
Quoter
|
||||
TableParser
|
||||
Daemon
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# DSNParser package
|
||||
@@ -2170,6 +2201,7 @@ use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
$OUTPUT_AUTOFLUSH = 1;
|
||||
|
@@ -6,7 +6,38 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
OptionParser
|
||||
Quoter
|
||||
DSNParser
|
||||
Daemon
|
||||
Transformers
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# OptionParser package
|
||||
@@ -2073,9 +2104,12 @@ sub _d {
|
||||
# ###########################################################################
|
||||
package pt_fk_error_logger;
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use sigtrap qw(handler finish untrapped normal-signals);
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
Transformers->import(qw(parse_timestamp));
|
||||
|
@@ -6,7 +6,40 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
MasterSlave
|
||||
OptionParser
|
||||
DSNParser
|
||||
Daemon
|
||||
Quoter
|
||||
TableParser
|
||||
Transformers
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# MasterSlave package
|
||||
@@ -3248,11 +3281,14 @@ sub _d {
|
||||
# ###########################################################################
|
||||
package pt_heartbeat;
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use List::Util qw(min max sum);
|
||||
use Time::HiRes qw(gettimeofday time sleep usleep);
|
||||
use IO::File;
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
Transformers->import(qw(ts unix_timestamp));
|
||||
|
@@ -6,7 +6,48 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
DSNParser
|
||||
Quoter
|
||||
OptionParser
|
||||
PodParser
|
||||
QueryParser
|
||||
QueryRewriter
|
||||
SlowLogParser
|
||||
TableParser
|
||||
Transformers
|
||||
Schema
|
||||
SchemaIterator
|
||||
FileIterator
|
||||
ExplainAnalyzer
|
||||
IndexUsage
|
||||
Progress
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# DSNParser package
|
||||
@@ -4823,11 +4864,14 @@ sub _d {
|
||||
# ###########################################################################
|
||||
package pt_index_usage;
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use Data::Dumper;
|
||||
$Data::Dumper::Indent = 1;
|
||||
$OUTPUT_AUTOFLUSH = 1;
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
Transformers->import(qw(make_checksum));
|
||||
@@ -4835,7 +4879,6 @@ Transformers->import(qw(make_checksum));
|
||||
# Global variables. Only really essential variables should be here.
|
||||
my $oktorun = 1;
|
||||
|
||||
if ( !caller ) { exit main(@ARGV); } # Run the program.
|
||||
sub main {
|
||||
@ARGV = @_; # set global ARGV for this package
|
||||
|
||||
@@ -5428,6 +5471,11 @@ sub _d {
|
||||
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||
}
|
||||
|
||||
# ############################################################################
|
||||
# Run the program.
|
||||
# ############################################################################
|
||||
if ( !caller ) { exit main(@ARGV); }
|
||||
|
||||
1; # Because this is a module as well as a script.
|
||||
|
||||
# #############################################################################
|
||||
|
44
bin/pt-kill
44
bin/pt-kill
@@ -6,7 +6,46 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
OptionParser
|
||||
Mo
|
||||
DSNParser
|
||||
Daemon
|
||||
Transformers
|
||||
TableParser
|
||||
Processlist
|
||||
TextResultSetParser
|
||||
MasterSlave
|
||||
Quoter
|
||||
QueryRewriter
|
||||
Retry
|
||||
Cxn
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# OptionParser package
|
||||
@@ -4822,6 +4861,8 @@ sub _d {
|
||||
# ###########################################################################
|
||||
package pt_kill;
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use POSIX qw(setsid);
|
||||
use List::Util qw(max);
|
||||
@@ -4833,6 +4874,7 @@ $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
Transformers->import(qw(ts));
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
$OUTPUT_AUTOFLUSH = 1;
|
||||
|
@@ -6,7 +6,52 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
OptionParser
|
||||
Mo
|
||||
VersionParser
|
||||
DSNParser
|
||||
Daemon
|
||||
Quoter
|
||||
TableNibbler
|
||||
TableParser
|
||||
Progress
|
||||
Retry
|
||||
Cxn
|
||||
MasterSlave
|
||||
ReplicaLagWaiter
|
||||
MySQLStatusWaiter
|
||||
WeightedAvgRate
|
||||
NibbleIterator
|
||||
Transformers
|
||||
CleanupTask
|
||||
IndexLength
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# OptionParser package
|
||||
@@ -5833,6 +5878,8 @@ package pt_online_schema_change;
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
use Time::HiRes qw(time sleep);
|
||||
|
@@ -6,7 +6,49 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
DSNParser
|
||||
OptionParser
|
||||
Quoter
|
||||
SlowLogParser
|
||||
GeneralLogParser
|
||||
QueryParser
|
||||
QueryRewriter
|
||||
Transformers
|
||||
Daemon
|
||||
Advisor
|
||||
AdvisorRules
|
||||
QueryAdvisorRules
|
||||
PodParser
|
||||
SQLParser
|
||||
TableParser
|
||||
ReportFormatter
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# DSNParser package
|
||||
@@ -6014,6 +6056,7 @@ $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
Transformers->import(qw(make_checksum));
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# Some rules report their match pos. This sets how many
|
||||
|
@@ -6,7 +6,66 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
DSNParser
|
||||
Quoter
|
||||
OptionParser
|
||||
Transformers
|
||||
QueryRewriter
|
||||
Processlist
|
||||
TcpdumpParser
|
||||
MySQLProtocolParser
|
||||
SysLogParser
|
||||
PgLogParser
|
||||
SlowLogParser
|
||||
SlowLogWriter
|
||||
EventAggregator
|
||||
ReportFormatter
|
||||
QueryReportFormatter
|
||||
EventTimeline
|
||||
QueryParser
|
||||
TableParser
|
||||
QueryReview
|
||||
Daemon
|
||||
MemcachedProtocolParser
|
||||
MemcachedEvent
|
||||
BinaryLogParser
|
||||
GeneralLogParser
|
||||
ProtocolParser
|
||||
HTTPProtocolParser
|
||||
ExecutionThrottler
|
||||
MasterSlave
|
||||
Progress
|
||||
FileIterator
|
||||
ExplainAnalyzer
|
||||
Runtime
|
||||
Pipeline
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# DSNParser package
|
||||
@@ -11848,6 +11907,7 @@ $OUTPUT_AUTOFLUSH = 1;
|
||||
Transformers->import(qw(shorten micro_t percentage_of ts make_checksum
|
||||
any_unix_timestamp parse_timestamp unix_timestamp crc32));
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
use sigtrap 'handler', \&sig_int, 'normal-signals';
|
||||
|
@@ -6,7 +6,39 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
OptionParser
|
||||
Mo
|
||||
DSNParser
|
||||
Daemon
|
||||
Transformers
|
||||
Retry
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# OptionParser package
|
||||
@@ -2488,6 +2520,7 @@ use sigtrap qw(handler finish untrapped normal-signals);
|
||||
|
||||
Transformers->import(qw(ts));
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
my $now;
|
||||
|
@@ -6,7 +6,40 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
Quoter
|
||||
OptionParser
|
||||
Mo
|
||||
VersionParser
|
||||
DSNParser
|
||||
MasterSlave
|
||||
Daemon
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# Quoter package
|
||||
@@ -3109,6 +3142,7 @@ use List::Util qw(min max);
|
||||
use Time::HiRes qw(sleep);
|
||||
use sigtrap qw(handler finish untrapped normal-signals);
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
$OUTPUT_AUTOFLUSH = 1;
|
||||
|
@@ -6,7 +6,57 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
VersionCheck
|
||||
HTTP::Micro
|
||||
Pingback
|
||||
DSNParser
|
||||
OptionParser
|
||||
Mo
|
||||
Cxn
|
||||
Quoter
|
||||
VersionParser
|
||||
TableParser
|
||||
TableNibbler
|
||||
MasterSlave
|
||||
RowChecksum
|
||||
NibbleIterator
|
||||
OobNibbleIterator
|
||||
Daemon
|
||||
SchemaIterator
|
||||
Retry
|
||||
Transformers
|
||||
Progress
|
||||
ReplicaLagWaiter
|
||||
MySQLStatusWaiter
|
||||
WeightedAvgRate
|
||||
IndexLength
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# VersionCheck package
|
||||
@@ -7623,6 +7673,8 @@ package pt_table_checksum;
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
use POSIX qw(signal_h);
|
||||
|
@@ -6,7 +6,55 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
OptionParser
|
||||
Mo
|
||||
Quoter
|
||||
DSNParser
|
||||
VersionParser
|
||||
TableSyncStream
|
||||
TableParser
|
||||
RowDiff
|
||||
MySQLDump
|
||||
ChangeHandler
|
||||
TableChunker
|
||||
TableChecksum
|
||||
TableSyncChunk
|
||||
TableSyncNibble
|
||||
TableSyncGroupBy
|
||||
TableSyncer
|
||||
TableNibbler
|
||||
MasterSlave
|
||||
Daemon
|
||||
SchemaIterator
|
||||
Transformers
|
||||
Retry
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# OptionParser package
|
||||
@@ -8244,6 +8292,7 @@ use Data::Dumper;
|
||||
|
||||
Transformers->import(qw(time_to_secs any_unix_timestamp));
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
$OUTPUT_AUTOFLUSH = 1;
|
||||
|
@@ -6,7 +6,61 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
DSNParser
|
||||
TableParser
|
||||
Quoter
|
||||
OptionParser
|
||||
Transformers
|
||||
SlowLogParser
|
||||
EventAggregator
|
||||
QueryParser
|
||||
QueryRewriter
|
||||
Daemon
|
||||
ChangeHandler
|
||||
RowDiff
|
||||
TableChunker
|
||||
TableNibbler
|
||||
TableChecksum
|
||||
TableSyncer
|
||||
TableSyncChunk
|
||||
TableSyncNibble
|
||||
TableSyncGroupBy
|
||||
Outfile
|
||||
MockSyncStream
|
||||
MockSth
|
||||
ReportFormatter
|
||||
UpgradeReportFormatter
|
||||
CompareResults
|
||||
CompareQueryTimes
|
||||
CompareWarnings
|
||||
Retry
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# DSNParser package
|
||||
@@ -10295,6 +10349,7 @@ $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
Transformers->import(qw(make_checksum));
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
use sigtrap 'handler', \&sig_int, 'normal-signals';
|
||||
|
@@ -6,7 +6,43 @@
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
# This tool is "fat-packed": most of its dependent modules are embedded
|
||||
# in this file. Setting %INC to this file for each module makes Perl aware
|
||||
# of this so it will not try to load the module from @INC. See the tool's
|
||||
# documentation for a full list of dependencies.
|
||||
BEGIN {
|
||||
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
|
||||
Percona::Toolkit
|
||||
OptionParser
|
||||
Mo
|
||||
DSNParser
|
||||
VersionParser
|
||||
Daemon
|
||||
PodParser
|
||||
TextResultSetParser
|
||||
Advisor
|
||||
AdvisorRules
|
||||
VariableAdvisorRules
|
||||
));
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# Percona::Toolkit package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# lib/Percona/Toolkit.pm
|
||||
# t/lib/Percona/Toolkit.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.3';
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
# End Percona::Toolkit package
|
||||
# ###########################################################################
|
||||
|
||||
# ###########################################################################
|
||||
# OptionParser package
|
||||
@@ -3393,6 +3429,8 @@ package pt_variable_advisor;
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
|
||||
use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
sub main {
|
||||
|
@@ -19,27 +19,7 @@
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '2.1.3';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
require Exporter;
|
||||
our @ISA = qw(Exporter);
|
||||
our %EXPORT_TAGS = ();
|
||||
our @EXPORT = (qw(_d));
|
||||
|
||||
sub _d {
|
||||
my ($package, undef, $line) = caller 0;
|
||||
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
|
||||
map { defined $_ ? $_ : 'undef' }
|
||||
@_;
|
||||
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||
}
|
||||
|
||||
1;
|
||||
}
|
||||
# ###########################################################################
|
||||
|
Reference in New Issue
Block a user