Rename Pingback.pm to VersionCheck.pm.

This commit is contained in:
Daniel Nichter
2013-02-11 19:02:59 -07:00
parent c02844a9d6
commit b6bd78d205
21 changed files with 159 additions and 163 deletions

View File

@@ -28,7 +28,7 @@ BEGIN {
Daemon Daemon
MasterSlave MasterSlave
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -4675,15 +4675,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -5276,7 +5276,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -5409,7 +5409,7 @@ sub main {
$o->save_error("--bulk-delete is meaningless with --limit 1"); $o->save_error("--bulk-delete is meaningless with --limit 1");
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
} }
@@ -5809,7 +5809,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ instances => [
{ dbh => $src->{dbh}, dsn => $src->{dsn} }, { dbh => $src->{dbh}, dsn => $src->{dsn} },
( $dst ? { dbh => $dst->{dbh}, dsn => $dst->{dsn} } : () ), ( $dst ? { dbh => $dst->{dbh}, dsn => $dst->{dsn} } : () ),

View File

@@ -28,7 +28,7 @@ BEGIN {
MySQLConfigComparer MySQLConfigComparer
ReportFormatter ReportFormatter
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -4349,15 +4349,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -4950,7 +4950,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -4991,7 +4991,7 @@ sub main {
if ( @ARGV < 1 ) { if ( @ARGV < 1 ) {
$o->save_error("Specify at least one file or DSN on the command line"); $o->save_error("Specify at least one file or DSN on the command line");
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
} }
$o->usage_or_errors(); $o->usage_or_errors();
@@ -5068,7 +5068,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ map({ +{ dbh => $_->dbh, dsn => $_->dsn } } @cxn) ], instances => [ map({ +{ dbh => $_->dbh, dsn => $_->dsn } } @cxn) ],
protocol => $o->get('version-check'), protocol => $o->get('version-check'),
); );

View File

@@ -25,7 +25,7 @@ BEGIN {
DSNParser DSNParser
Daemon Daemon
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -3265,15 +3265,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -3866,7 +3866,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -3978,7 +3978,7 @@ sub main {
$o->save_error("--dest requires a 't' (table) part"); $o->save_error("--dest requires a 't' (table) part");
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
# Avoid running forever with zero second interval. # Avoid running forever with zero second interval.
if ( $o->get('run-time') && !$o->get('interval') ) { if ( $o->get('run-time') && !$o->get('interval') ) {
@@ -4050,7 +4050,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ instances => [
{ dbh => $dbh, dsn => $source_dsn }, { dbh => $dbh, dsn => $source_dsn },
($dest_dsn ? { dbh => $dest_dsn, dsn => $dest_dsn } : ()), ($dest_dsn ? { dbh => $dest_dsn, dsn => $dest_dsn } : ()),

View File

@@ -23,7 +23,7 @@ BEGIN {
DiskstatsGroupBySample DiskstatsGroupBySample
DiskstatsMenu DiskstatsMenu
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -4160,15 +4160,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -4761,7 +4761,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -4803,7 +4803,7 @@ sub main {
if ( !$o->get('columns-regex') ) { if ( !$o->get('columns-regex') ) {
$o->save_error("A regex pattern for --column-regex must be specified"); $o->save_error("A regex pattern for --column-regex must be specified");
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
} }
$o->usage_or_errors(); $o->usage_or_errors();
@@ -4812,7 +4812,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check(protocol => $o->get('version-check')); VersionCheck::version_check(protocol => $o->get('version-check'));
} }
# ######################################################################## # ########################################################################

View File

@@ -24,7 +24,7 @@ BEGIN {
Schema Schema
SchemaIterator SchemaIterator
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -4021,15 +4021,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -4622,7 +4622,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ############################################################################# # #############################################################################
@@ -4668,7 +4668,7 @@ sub main {
my $dp = $o->DSNParser(); my $dp = $o->DSNParser();
$dp->prop('set-vars', $o->get('set-vars')); $dp->prop('set-vars', $o->get('set-vars'));
Pingback::validate_options($o); VersionCheck::validate_options($o);
$o->usage_or_errors(); $o->usage_or_errors();
@@ -4700,7 +4700,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ {dbh => $dbh, dsn => $dsn} ], instances => [ {dbh => $dbh, dsn => $dsn} ],
protocol => $o->get('version-check'), protocol => $o->get('version-check'),
); );

View File

@@ -20,7 +20,7 @@ BEGIN {
TableParser TableParser
Daemon Daemon
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -2833,15 +2833,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -3434,7 +3434,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -3739,7 +3739,7 @@ sub main {
$o->save_error("--server-id regex doesn't capture digits with (\\d+)"); $o->save_error("--server-id regex doesn't capture digits with (\\d+)");
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
$o->usage_or_errors(); $o->usage_or_errors();
@@ -3841,7 +3841,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [{dbh => $dbh, dsn => $dsn}], instances => [{dbh => $dbh, dsn => $dsn}],
protocol => $o->get('version-check'), protocol => $o->get('version-check'),
); );

View File

@@ -20,7 +20,7 @@ BEGIN {
Daemon Daemon
Transformers Transformers
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -2775,15 +2775,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -3376,7 +3376,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -3438,7 +3438,7 @@ sub main {
$o->save_error("--dest requires a 't' (table) part"); $o->save_error("--dest requires a 't' (table) part");
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
} }
$o->usage_or_errors(); $o->usage_or_errors();
@@ -3500,7 +3500,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ instances => [
{ dbh => $dbh, dsn => $src_dsn }, { dbh => $dbh, dsn => $src_dsn },
($dst_dbh ? { dbh => $dst_dbh, dsn => $dst_dsn } : ()) ($dst_dbh ? { dbh => $dst_dbh, dsn => $dst_dsn } : ())

View File

@@ -23,7 +23,7 @@ BEGIN {
Retry Retry
Transformers Transformers
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -4001,15 +4001,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -4602,7 +4602,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -4692,7 +4692,7 @@ sub main {
$o->save_error("Invalid --recursion-method: $EVAL_ERROR") $o->save_error("Invalid --recursion-method: $EVAL_ERROR")
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
$o->usage_or_errors(); $o->usage_or_errors();
@@ -5072,7 +5072,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ {dbh => $dbh, dsn => $dsn} ], instances => [ {dbh => $dbh, dsn => $dsn} ],
protocol => $o->get('version-check'), protocol => $o->get('version-check'),
); );

View File

@@ -30,7 +30,7 @@ BEGIN {
IndexUsage IndexUsage
Progress Progress
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -5476,15 +5476,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -6077,7 +6077,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -6136,7 +6136,7 @@ sub main {
} }
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
} }
$o->usage_or_errors(); $o->usage_or_errors();
@@ -6281,7 +6281,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ instances => [
{ dbh => $dbh, dsn => $dsn }, { dbh => $dbh, dsn => $dsn },
($res_dbh ? { dbh => $res_dbh, dsn => $res_dsn } : ()) ($res_dbh ? { dbh => $res_dbh, dsn => $res_dsn } : ())

View File

@@ -32,7 +32,7 @@ BEGIN {
Retry Retry
Cxn Cxn
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -5698,15 +5698,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -6299,7 +6299,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -6371,7 +6371,7 @@ sub main {
$o->save_error("Invalid value for --victims: $victims"); $o->save_error("Invalid value for --victims: $victims");
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
$o->usage_or_errors(); $o->usage_or_errors();
@@ -6654,7 +6654,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ ($dbh ? { dbh => $dbh, dsn => $cxn->dsn() } : ()) ], instances => [ ($dbh ? { dbh => $dbh, dsn => $cxn->dsn() } : ()) ],
protocol => $o->get('version-check'), protocol => $o->get('version-check'),
); );

View File

@@ -39,7 +39,7 @@ BEGIN {
CleanupTask CleanupTask
IndexLength IndexLength
HTTPMicro HTTPMicro
Pingback VersionCheck
Percona::XtraDB::Cluster Percona::XtraDB::Cluster
)); ));
} }
@@ -7148,15 +7148,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -7749,7 +7749,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -7968,7 +7968,7 @@ sub main {
$o->save_error("Invalid --recursion-method: $EVAL_ERROR") $o->save_error("Invalid --recursion-method: $EVAL_ERROR")
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
$o->usage_or_errors(); $o->usage_or_errors();
@@ -8258,7 +8258,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ map({ +{ dbh => $_->dbh(), dsn => $_->dsn() } } instances => [ map({ +{ dbh => $_->dbh(), dsn => $_->dsn() } }
$cxn, ($slaves ? @$slaves : ())) ], $cxn, ($slaves ? @$slaves : ())) ],
protocol => $o->get('version-check'), protocol => $o->get('version-check'),

View File

@@ -36,7 +36,7 @@ BEGIN {
TableParser TableParser
ReportFormatter ReportFormatter
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -7431,15 +7431,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -8032,7 +8032,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -8099,7 +8099,7 @@ sub main {
. "rule_id, query_id, none"); . "rule_id, query_id, none");
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
} }
$o->usage_or_errors(); $o->usage_or_errors();
@@ -8430,7 +8430,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ instances => [
($review_dbh ? { dbh => $review_dbh, dsn => $review_dsn } : ()), ($review_dbh ? { dbh => $review_dbh, dsn => $review_dsn } : ()),
($dbh ? { dbh => $dbh, dsn => $dsn } : ()), ($dbh ? { dbh => $dbh, dsn => $dsn } : ()),

View File

@@ -53,7 +53,7 @@ BEGIN {
Runtime Runtime
Pipeline Pipeline
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -13060,15 +13060,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -13661,7 +13661,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -13812,7 +13812,7 @@ sub main {
$o->save_error($EVAL_ERROR); $o->save_error($EVAL_ERROR);
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
$o->usage_or_errors(); $o->usage_or_errors();
@@ -14902,7 +14902,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ instances => [
($qv_dbh ? { dbh => $qv_dbh, dsn => $review_dsn } : ()), ($qv_dbh ? { dbh => $qv_dbh, dsn => $review_dsn } : ()),
($ps_dbh ? { dbh => $ps_dbh, dsn => $ps_dsn } : ()), ($ps_dbh ? { dbh => $ps_dbh, dsn => $ps_dsn } : ()),

View File

@@ -25,7 +25,7 @@ BEGIN {
Transformers Transformers
Retry Retry
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -3376,15 +3376,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -3977,7 +3977,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -4029,7 +4029,7 @@ sub main {
$o->set('run-time', max($o->get('run-time'), 1)); $o->set('run-time', max($o->get('run-time'), 1));
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
$o->usage_or_errors(); $o->usage_or_errors();
@@ -4088,7 +4088,7 @@ sub main {
my $tmp_master_dsn = $master_dsn my $tmp_master_dsn = $master_dsn
? $master_dsn ? $master_dsn
: { h => $status->{master_host}, P => $status->{master_port} }; : { h => $status->{master_host}, P => $status->{master_port} };
Pingback::version_check( VersionCheck::version_check(
instances => [ instances => [
{ dbh => $slave_dbh, dsn => $slave_dsn }, { dbh => $slave_dbh, dsn => $slave_dsn },
{ dbh => $master_dbh, dsn => $tmp_master_dsn } { dbh => $master_dbh, dsn => $tmp_master_dsn }

View File

@@ -26,7 +26,7 @@ BEGIN {
MasterSlave MasterSlave
Daemon Daemon
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -4000,15 +4000,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -4601,7 +4601,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -4665,7 +4665,7 @@ sub main {
$o->save_error("Invalid --recursion-method: $EVAL_ERROR") $o->save_error("Invalid --recursion-method: $EVAL_ERROR")
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
$o->usage_or_errors(); $o->usage_or_errors();
@@ -4772,7 +4772,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ { dbh => $dbh, dsn => $dsn }, @servers_to_watch ], instances => [ { dbh => $dbh, dsn => $dsn }, @servers_to_watch ],
protocol => $o->get('version-check'), protocol => $o->get('version-check'),
); );

View File

@@ -15,7 +15,7 @@ BEGIN {
$INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw( $INC{$_} = __FILE__ for map { (my $pkg = "$_.pm") =~ s!::!/!g; $pkg } (qw(
Percona::Toolkit Percona::Toolkit
HTTPMicro HTTPMicro
Pingback VersionCheck
DSNParser DSNParser
OptionParser OptionParser
Lmo::Utils Lmo::Utils
@@ -714,15 +714,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -1315,7 +1315,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -8648,7 +8648,7 @@ sub main {
$o->save_error("Invalid --recursion-method: $EVAL_ERROR") $o->save_error("Invalid --recursion-method: $EVAL_ERROR")
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
$o->usage_or_errors(); $o->usage_or_errors();
@@ -9237,7 +9237,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ instances => [
{ dbh => $master_dbh, dsn => $master_dsn }, { dbh => $master_dbh, dsn => $master_dsn },
map({ +{ dbh => $_->dbh(), dsn => $_->dsn() } } @$slaves) map({ +{ dbh => $_->dbh(), dsn => $_->dsn() } } @$slaves)

View File

@@ -41,7 +41,7 @@ BEGIN {
Transformers Transformers
Retry Retry
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -9121,15 +9121,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -9722,7 +9722,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -9858,7 +9858,7 @@ sub main {
$o->save_error("Invalid --recursion-method: $EVAL_ERROR") $o->save_error("Invalid --recursion-method: $EVAL_ERROR")
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
$o->usage_or_errors(); $o->usage_or_errors();
@@ -9971,7 +9971,7 @@ sub main {
} @dsns; } @dsns;
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [@instances], instances => [@instances],
protocol => $o->get('version-check'), protocol => $o->get('version-check'),
); );

View File

@@ -48,7 +48,7 @@ BEGIN {
CompareWarnings CompareWarnings
Retry Retry
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -11657,15 +11657,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -12258,7 +12258,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -12340,7 +12340,7 @@ sub main {
$o->save_error('Specify at least one host DSN'); $o->save_error('Specify at least one host DSN');
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
$o->usage_or_errors(); $o->usage_or_errors();
@@ -12605,7 +12605,7 @@ sub main {
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' if ( $o->get('version-check') ne 'off'
&& (!$o->has('quiet') || !$o->get('quiet')) ) { && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ map({ +{ dbh => $_->{dbh}, dsn => $_->{dsn} } } @$hosts) ], instances => [ map({ +{ dbh => $_->{dbh}, dsn => $_->{dsn} } } @$hosts) ],
protocol => $o->get('version-check'), protocol => $o->get('version-check'),
); );

View File

@@ -29,7 +29,7 @@ BEGIN {
AdvisorRules AdvisorRules
VariableAdvisorRules VariableAdvisorRules
HTTPMicro HTTPMicro
Pingback VersionCheck
)); ));
} }
@@ -4283,15 +4283,15 @@ if ( $INC{"IO/Socket/SSL.pm"} ) {
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# This package is a copy without comments from the original. The original # 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, # with comments and its test file can be found in the Bazaar repository at,
# lib/Pingback.pm # lib/VersionCheck.pm
# t/lib/Pingback.t # t/lib/VersionCheck.t
# See https://launchpad.net/percona-toolkit for more information. # See https://launchpad.net/percona-toolkit for more information.
# ########################################################################### # ###########################################################################
{ {
package Pingback; package VersionCheck;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -4884,7 +4884,7 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################
# ########################################################################### # ###########################################################################
@@ -4929,7 +4929,7 @@ sub main {
} }
} }
Pingback::validate_options($o); VersionCheck::validate_options($o);
$o->usage_or_errors(); $o->usage_or_errors();
@@ -5006,7 +5006,7 @@ sub main {
# Do the version-check # Do the version-check
# ######################################################################## # ########################################################################
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) { if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
Pingback::version_check( VersionCheck::version_check(
instances => [ ($dbh ? { dbh => $dbh, dsn => $dsn } : ()) ], instances => [ ($dbh ? { dbh => $dbh, dsn => $dsn } : ()) ],
protocol => $o->get('version-check'), protocol => $o->get('version-check'),
); );

View File

@@ -1,4 +1,4 @@
# This program is copyright 2012 Percona Ireland Ltd. # This program is copyright 2012-2013 Percona Ireland Ltd.
# Feedback and improvements are welcome. # Feedback and improvements are welcome.
# #
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED # THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
@@ -15,12 +15,10 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA. # Place, Suite 330, Boston, MA 02111-1307 USA.
# ########################################################################### # ###########################################################################
# Pingback package # VersionCheck package
# ########################################################################### # ###########################################################################
{ {
# Package: Pingback package VersionCheck;
# Pingback gets and reports program versions to Percona.
package Pingback;
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
@@ -683,5 +681,5 @@ sub _d {
1; 1;
} }
# ########################################################################### # ###########################################################################
# End Pingback package # End VersionCheck package
# ########################################################################### # ###########################################################################

View File

@@ -12,7 +12,7 @@ use English qw(-no_match_vars);
use Test::More; use Test::More;
use Data::Dumper; use Data::Dumper;
use Pingback; use VersionCheck;
use DSNParser; use DSNParser;
use Sandbox; use Sandbox;
use PerconaTest; use PerconaTest;
@@ -23,7 +23,7 @@ my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
my $master_dbh = $sb->get_dbh_for('master'); my $master_dbh = $sb->get_dbh_for('master');
my $slave1_dbh = $sb->get_dbh_for('slave1'); my $slave1_dbh = $sb->get_dbh_for('slave1');
my $vc = 'Pingback'; my $vc = 'VersionCheck';
sub test_v { sub test_v {
my (%args) = @_; my (%args) = @_;
@@ -52,7 +52,7 @@ sub test_v {
}, },
], ],
); );
diag(Dumper($versions));
is_deeply( is_deeply(
$versions, $versions,
$args{versions}, $args{versions},
@@ -168,7 +168,6 @@ SKIP: {
# at least know that an OS should have these two things: a word # at least know that an OS should have these two things: a word
# and version with at least major and minor numbers. # and version with at least major and minor numbers.
my $os = $vc->get_os_version; my $os = $vc->get_os_version;
diag($os);
like( like(
$os, $os,
@@ -216,4 +215,3 @@ is_deeply(
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox") ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox")
if $master_dbh; if $master_dbh;
done_testing; done_testing;
exit;