mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-19 10:34:01 +00:00
Change --version-check to --[no]version-check, update POD text and how version_check() is called.
This commit is contained in:
@@ -5408,9 +5408,6 @@ sub main {
|
||||
if ( $bulk_del && $limit < 2 ) {
|
||||
$o->save_error("--bulk-delete is meaningless with --limit 1");
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
}
|
||||
|
||||
if ( $bulk_del || $o->get('bulk-insert') ) {
|
||||
@@ -5808,13 +5805,12 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [
|
||||
{ dbh => $src->{dbh}, dsn => $src->{dsn} },
|
||||
( $dst ? { dbh => $dst->{dbh}, dsn => $dst->{dsn} } : () ),
|
||||
],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7284,30 +7280,25 @@ User for login if not current user.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=item --where
|
||||
|
||||
|
@@ -4991,7 +4991,6 @@ sub main {
|
||||
if ( @ARGV < 1 ) {
|
||||
$o->save_error("Specify at least one file or DSN on the command line");
|
||||
}
|
||||
VersionCheck::validate_options($o);
|
||||
}
|
||||
|
||||
$o->usage_or_errors();
|
||||
@@ -5067,10 +5066,9 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [ map({ +{ dbh => $_->dbh, dsn => $_->dsn } } @cxn) ],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5358,30 +5356,25 @@ MySQL user if not current user.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=back
|
||||
|
||||
|
@@ -3978,8 +3978,6 @@ sub main {
|
||||
$o->save_error("--dest requires a 't' (table) part");
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
# Avoid running forever with zero second interval.
|
||||
if ( $o->get('run-time') && !$o->get('interval') ) {
|
||||
$o->set('interval', 1);
|
||||
@@ -4049,13 +4047,12 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [
|
||||
{ dbh => $dbh, dsn => $source_dsn },
|
||||
($dest_dsn ? { dbh => $dest_dsn, dsn => $dest_dsn } : ()),
|
||||
],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4748,30 +4745,25 @@ User for login if not current user.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=back
|
||||
|
||||
|
@@ -4803,7 +4803,6 @@ sub main {
|
||||
if ( !$o->get('columns-regex') ) {
|
||||
$o->save_error("A regex pattern for --column-regex must be specified");
|
||||
}
|
||||
VersionCheck::validate_options($o);
|
||||
}
|
||||
|
||||
$o->usage_or_errors();
|
||||
@@ -4811,8 +4810,8 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(protocol => $o->get('version-check'));
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check();
|
||||
}
|
||||
|
||||
# ########################################################################
|
||||
@@ -5401,30 +5400,25 @@ aggregated into one line, the first timestamp is shown.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=back
|
||||
|
||||
|
@@ -4668,7 +4668,6 @@ sub main {
|
||||
|
||||
my $dp = $o->DSNParser();
|
||||
$dp->prop('set-vars', $o->get('set-vars'));
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
$o->usage_or_errors();
|
||||
|
||||
@@ -4699,10 +4698,9 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [ {dbh => $dbh, dsn => $dsn} ],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5204,30 +5202,25 @@ Output all keys and/or foreign keys found, not just redundant ones.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=back
|
||||
|
||||
|
40
bin/pt-find
40
bin/pt-find
@@ -3739,8 +3739,6 @@ sub main {
|
||||
$o->save_error("--server-id regex doesn't capture digits with (\\d+)");
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
$o->usage_or_errors();
|
||||
|
||||
# Interpolate strings for printf and exec. At the same time discover whether
|
||||
@@ -3840,10 +3838,9 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [{dbh => $dbh, dsn => $dsn}],
|
||||
protocol => $o->get('version-check'),
|
||||
instances => [ { dbh => $dbh, dsn => $dsn } ],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4294,30 +4291,25 @@ User for login if not current user.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=back
|
||||
|
||||
|
@@ -3437,8 +3437,6 @@ sub main {
|
||||
if ( $dst_dsn && !$dst_dsn->{t} ) {
|
||||
$o->save_error("--dest requires a 't' (table) part");
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
}
|
||||
|
||||
$o->usage_or_errors();
|
||||
@@ -3499,13 +3497,12 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [
|
||||
{ dbh => $dbh, dsn => $src_dsn },
|
||||
($dst_dbh ? { dbh => $dst_dbh, dsn => $dst_dsn } : ())
|
||||
],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3797,30 +3794,25 @@ User for login if not current user.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=back
|
||||
|
||||
|
@@ -4692,8 +4692,6 @@ sub main {
|
||||
$o->save_error("Invalid --recursion-method: $EVAL_ERROR")
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
$o->usage_or_errors();
|
||||
|
||||
# ########################################################################
|
||||
@@ -5071,10 +5069,9 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [ {dbh => $dbh, dsn => $dsn} ],
|
||||
protocol => $o->get('version-check'),
|
||||
instances => [ { dbh => $dbh, dsn => $dsn } ],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5828,30 +5825,25 @@ is running on a system that uses UTC).
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=back
|
||||
|
||||
|
@@ -6135,8 +6135,6 @@ sub main {
|
||||
. "--save-results-database DSN");
|
||||
}
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
}
|
||||
|
||||
$o->usage_or_errors();
|
||||
@@ -6280,13 +6278,12 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [
|
||||
{ dbh => $dbh, dsn => $dsn },
|
||||
($res_dbh ? { dbh => $res_dbh, dsn => $res_dsn } : ())
|
||||
],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7199,30 +7196,25 @@ User for login if not current user.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=back
|
||||
|
||||
|
38
bin/pt-kill
38
bin/pt-kill
@@ -6371,8 +6371,6 @@ sub main {
|
||||
$o->save_error("Invalid value for --victims: $victims");
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
$o->usage_or_errors();
|
||||
|
||||
# ########################################################################
|
||||
@@ -6653,10 +6651,9 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [ ($dbh ? { dbh => $dbh, dsn => $cxn->dsn() } : ()) ],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7385,30 +7382,25 @@ User for login if not current user.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=item --victims
|
||||
|
||||
|
@@ -7968,8 +7968,6 @@ sub main {
|
||||
$o->save_error("Invalid --recursion-method: $EVAL_ERROR")
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
$o->usage_or_errors();
|
||||
|
||||
if ( $o->get('quiet') ) {
|
||||
@@ -8257,11 +8255,14 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [ map({ +{ dbh => $_->dbh(), dsn => $_->dsn() } }
|
||||
$cxn, ($slaves ? @$slaves : ())) ],
|
||||
protocol => $o->get('version-check'),
|
||||
instances => [
|
||||
map (
|
||||
{ +{ dbh => $_->dbh(), dsn => $_->dsn() } }
|
||||
$cxn, ($slaves ? @$slaves : ())
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10965,30 +10966,25 @@ User for login if not current user.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=back
|
||||
|
||||
|
@@ -8098,8 +8098,6 @@ sub main {
|
||||
$o->save_error("Invalid --group-by value. Valid values are: "
|
||||
. "rule_id, query_id, none");
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
}
|
||||
|
||||
$o->usage_or_errors();
|
||||
@@ -8429,13 +8427,12 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [
|
||||
($review_dbh ? { dbh => $review_dbh, dsn => $review_dsn } : ()),
|
||||
($dbh ? { dbh => $dbh, dsn => $dsn } : ()),
|
||||
],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9206,30 +9203,25 @@ L<"--report-format">.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=item --where
|
||||
|
||||
|
@@ -13812,8 +13812,6 @@ sub main {
|
||||
$o->save_error($EVAL_ERROR);
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
$o->usage_or_errors();
|
||||
|
||||
# ########################################################################
|
||||
@@ -14901,13 +14899,12 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [
|
||||
($qv_dbh ? { dbh => $qv_dbh, dsn => $review_dsn } : ()),
|
||||
($ps_dbh ? { dbh => $ps_dbh, dsn => $ps_dsn } : ()),
|
||||
],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17096,30 +17093,25 @@ distinct checksums are treated as equal.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
tem --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=item --watch-server
|
||||
|
||||
|
@@ -4029,8 +4029,6 @@ sub main {
|
||||
$o->set('run-time', max($o->get('run-time'), 1));
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
$o->usage_or_errors();
|
||||
|
||||
# #######################################################################
|
||||
@@ -4084,19 +4082,22 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
my $tmp_master_dsn = $master_dsn
|
||||
? $master_dsn
|
||||
: { h => $status->{master_host}, P => $status->{master_port} };
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
my $tmp_master_dsn
|
||||
= $master_dsn ? $master_dsn
|
||||
: {h=>$status->{master_host}, P=>$status->{master_port}};
|
||||
VersionCheck::version_check(
|
||||
instances => [
|
||||
{ dbh => $slave_dbh, dsn => $slave_dsn },
|
||||
{ dbh => $master_dbh, dsn => $tmp_master_dsn }
|
||||
],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
# ########################################################################
|
||||
# Main loop
|
||||
# ########################################################################
|
||||
|
||||
# If the I/O thread isn't running when the program starts,
|
||||
# it never knows what to do. So start it.
|
||||
$slave_dbh->do('START SLAVE IO_THREAD');
|
||||
@@ -4568,30 +4569,25 @@ User for login if not current user.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=back
|
||||
|
||||
|
@@ -4665,8 +4665,6 @@ sub main {
|
||||
$o->save_error("Invalid --recursion-method: $EVAL_ERROR")
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
$o->usage_or_errors();
|
||||
|
||||
# ########################################################################
|
||||
@@ -4771,14 +4769,15 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [ { dbh => $dbh, dsn => $dsn }, @servers_to_watch ],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
# ########################################################################
|
||||
# Watch each server found.
|
||||
# ########################################################################
|
||||
my $must_fork = @servers_to_watch > 1;
|
||||
foreach my $host ( @servers_to_watch ) {
|
||||
|
||||
@@ -5483,30 +5482,25 @@ the current sleep time each time pt-slave-restart sleeps.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=back
|
||||
|
||||
|
@@ -8648,8 +8648,6 @@ sub main {
|
||||
$o->save_error("Invalid --recursion-method: $EVAL_ERROR")
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
$o->usage_or_errors();
|
||||
|
||||
# ########################################################################
|
||||
@@ -9236,13 +9234,12 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [
|
||||
{ dbh => $master_dbh, dsn => $master_dsn },
|
||||
map({ +{ dbh => $_->dbh(), dsn => $_->dsn() } } @$slaves)
|
||||
],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11844,30 +11841,25 @@ group: Help
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=item --where
|
||||
|
||||
|
@@ -9575,8 +9575,6 @@ sub main {
|
||||
$o->save_error("Invalid --recursion-method: $EVAL_ERROR")
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
$o->usage_or_errors();
|
||||
|
||||
# ########################################################################
|
||||
@@ -9668,31 +9666,29 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
|
||||
# This tool has way too many dbhs and doesn't use Cxn, so we have to
|
||||
# manually disconnect them else they'll throw a warning. Also, it
|
||||
# creates some dbh late, so here we need to create a dbh and then
|
||||
# disconnect it only if we created it, i.e. don't disconnect the few
|
||||
# dbh created early by the tool.
|
||||
my @vc_dbhs;
|
||||
my @instances = map {
|
||||
my $dsn = $_;
|
||||
my $dbh = $dsn->{dbh};
|
||||
if ( !$dbh ) {
|
||||
$dbh = get_cxn($dsn, %modules);
|
||||
push @vc_dbhs, $dbh; # disconnect this dbh after version check
|
||||
}
|
||||
+{ dbh => $dbh, dsn => $dsn }
|
||||
} @dsns;
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
my @vc_dbhs;
|
||||
my @instances = map {
|
||||
my $dsn = $_;
|
||||
my $dbh = $dsn->{dbh};
|
||||
if ( !$dbh ) {
|
||||
$dbh = get_cxn($dsn, %modules);
|
||||
push @vc_dbhs, $dbh; # disconnect this dbh after version check
|
||||
}
|
||||
+{ dbh => $dbh, dsn => $dsn }
|
||||
} @dsns;
|
||||
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [@instances],
|
||||
protocol => $o->get('version-check'),
|
||||
instances => \@instances,
|
||||
);
|
||||
}
|
||||
|
||||
map { $_->disconnect } @vc_dbhs; # disconnect dbh created for version check
|
||||
map { $_->disconnect } @vc_dbhs;
|
||||
}
|
||||
|
||||
# ########################################################################
|
||||
# Sync!
|
||||
@@ -12248,30 +12244,25 @@ See L<"OUTPUT"> for more details about the output.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=item --wait
|
||||
|
||||
|
@@ -12340,8 +12340,6 @@ sub main {
|
||||
$o->save_error('Specify at least one host DSN');
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
$o->usage_or_errors();
|
||||
|
||||
if ( $o->get('explain-hosts') ) {
|
||||
@@ -12603,11 +12601,14 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off'
|
||||
&& (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [ map({ +{ dbh => $_->{dbh}, dsn => $_->{dsn} } } @$hosts) ],
|
||||
protocol => $o->get('version-check'),
|
||||
instances => [
|
||||
map(
|
||||
{ +{ dbh => $_->{dbh}, dsn => $_->{dsn} } }
|
||||
@$hosts
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -13579,30 +13580,25 @@ User for login if not current user.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=item --zero-query-times
|
||||
|
||||
|
@@ -4929,8 +4929,6 @@ sub main {
|
||||
}
|
||||
}
|
||||
|
||||
VersionCheck::validate_options($o);
|
||||
|
||||
$o->usage_or_errors();
|
||||
|
||||
# #########################################################################
|
||||
@@ -5005,10 +5003,9 @@ sub main {
|
||||
# ########################################################################
|
||||
# Do the version-check
|
||||
# ########################################################################
|
||||
if ( $o->get('version-check') ne 'off' && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
if ( $o->get('version-check') && (!$o->has('quiet') || !$o->get('quiet')) ) {
|
||||
VersionCheck::version_check(
|
||||
instances => [ ($dbh ? { dbh => $dbh, dsn => $dsn } : ()) ],
|
||||
protocol => $o->get('version-check'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5835,30 +5832,25 @@ higher levels, the program prints more of the description.
|
||||
|
||||
Show version and exit.
|
||||
|
||||
=item --version-check
|
||||
=item --[no]version-check
|
||||
|
||||
type: string; default: off
|
||||
default: yes
|
||||
|
||||
Send program versions to Percona and print suggested upgrades and problems.
|
||||
Possible values for --version-check:
|
||||
Check for the latest version of Percona Toolkit, MySQL, and other programs.
|
||||
|
||||
=for comment ignore-pt-internal-value
|
||||
MAGIC_version_check
|
||||
This is a standard "check for updates automatically" feature, with two
|
||||
additional features. First, the tool checks the version of other programs
|
||||
on the local system in addition to its own version. For example, it checks
|
||||
the version of every MySQL server it connects to, Perl, and the Perl module
|
||||
DBD::mysql. Second, it checks for and warns about versions with known
|
||||
problems. For example, MySQL 5.5.25 had a critical bug and was re-released
|
||||
as 5.5.25a.
|
||||
|
||||
https, http, auto, off
|
||||
Any updates or known problems are printed to STDOUT before the tool's normal
|
||||
output. This feature should never interfere with the normal operation of the
|
||||
tool.
|
||||
|
||||
C<auto> first tries using C<https>, and resorts to C<http> if that fails.
|
||||
Keep in mind that C<https> might not be available if
|
||||
C<IO::Socket::SSL> is not installed on your system, although
|
||||
C<--version-check http> should work everywhere.
|
||||
|
||||
The version check feature causes the tool to send and receive data from
|
||||
Percona over the web. The data contains program versions from the local
|
||||
machine. Percona uses the data to focus development on the most widely
|
||||
used versions of programs, and to suggest to customers possible upgrades
|
||||
and known bad versions of programs.
|
||||
|
||||
For more information, visit L<http://www.percona.com/version-check>.
|
||||
For more information, visit L<https://www.percona.com/version-check>.
|
||||
|
||||
=back
|
||||
|
||||
|
Reference in New Issue
Block a user