Finish re-branding tools. Remove pt-schema-advisor.

This commit is contained in:
Daniel Nichter
2011-07-12 16:36:36 -06:00
parent 2597c09f17
commit 39ea018581
42 changed files with 150 additions and 4231 deletions

View File

@@ -4421,7 +4421,7 @@ whether known or unknown, of using this tool. The two main categories of risks
are those created by the nature of the tool (e.g. read-only tools vs. read-write
tools) and those created by bugs.
mk-achiver is a read-write tool. It deletes data from the source by default, so
pt-achiver is a read-write tool. It deletes data from the source by default, so
you should test your archiving jobs with the L<"--dry-run"> option if you're not
sure about them. It is designed to have as little impact on production systems
as possible, but tuning with L<"--limit">, L<"--txn-size"> and similar options
@@ -4464,7 +4464,7 @@ rows. Specifying the index with the 'i' part of the L<"--source"> argument can
be crucial for this; use L<"--dry-run"> to examine the generated queries and be
sure to EXPLAIN them to see if they are efficient (most of the time you probably
want to scan the PRIMARY key, which is the default). Even better, profile
pt-archiver with mk-query-profiler and make sure it is not scanning the whole
pt-archiver with pt-query-profiler and make sure it is not scanning the whole
table every query.
You can disable the seek-then-scan optimizations partially or wholly with
@@ -4853,7 +4853,7 @@ Pause archiving if the slave given by L<"--check-slave-lag"> lags.
This option causes pt-archiver to look at the slave every time it's about
to fetch another row. If the slave's lag is greater than the option's value,
or if the slave isn't running (so its lag is NULL), mk-table-checksum sleeps
or if the slave isn't running (so its lag is NULL), pt-table-checksum sleeps
for L<"--check-interval"> seconds and then looks at the lag again. It repeats
until the slave is caught up, then proceeds to fetch and archive the row.
@@ -5279,7 +5279,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -1177,20 +1177,20 @@ exit $exit_status;
=head1 NAME
pt-checksum-filter - Filter checksums from mk-table-checksum.
pt-checksum-filter - Filter checksums from pt-table-checksum.
=head1 SYNOPSIS
Usage: pt-checksum-filter [OPTION]... FILE
pt-checksum-filter filters checksums from mk-table-checksum and prints those
pt-checksum-filter filters checksums from pt-table-checksum and prints those
that differ. With no FILE, or when FILE is -, read standard input.
Examples:
pt-checksum-filter checksums.txt
mk-table-checksum host1 host2 | pt-checksum-filter
pt-table-checksum host1 host2 | pt-checksum-filter
pt-checksum-filter db1-checksums.txt db2-checksums.txt --ignore-databases
@@ -1215,12 +1215,12 @@ See also L<"BUGS"> for more information on filing bugs and getting help.
=head1 DESCRIPTION
This program takes the unsorted, verbose output from L<mk-table-checksum> and
This program takes the unsorted, verbose output from L<pt-table-checksum> and
sorts it, then filters it so you only see lines that have different checksums
or counts.
You can pipe input directly into it from L<mk-table-checksum>, or you can
save the mk-table-checksum's output and run pt-checksum-filter on the
You can pipe input directly into it from L<pt-table-checksum>, or you can
save the pt-table-checksum's output and run pt-checksum-filter on the
resulting file(s). If you run it against just one file, or pipe output
directly into it, it'll output results during processing. Processing multiple
files is slightly more expensive, and you won't see any output until they're
@@ -1258,7 +1258,7 @@ input is processed.
short form: -h
Preserves headers output by mk-table-checksum.
Preserves headers output by pt-table-checksum.
=item --help

View File

@@ -3108,7 +3108,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -2583,7 +2583,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -4194,7 +4194,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -3669,7 +3669,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -2303,7 +2303,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -4151,7 +4151,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -2163,7 +2163,7 @@ sub fingerprint {
$query =~ m#\ASELECT /\*!40001 SQL_NO_CACHE \*/ \* FROM `# # mysqldump query
&& return 'mysqldump';
$query =~ m#/\*\w+\.\w+:[0-9]/[0-9]\*/# # mk-table-checksum, etc query
$query =~ m#/\*\w+\.\w+:[0-9]/[0-9]\*/# # pt-table-checksum, etc query
&& return 'maatkit';
$query =~ m/\Aadministrator command: /
&& return $query;
@@ -5429,7 +5429,7 @@ uses EXPLAIN to ask MySQL how it will use each query. When it is finished, it
prints out a report on indexes that the queries didn't use.
The query log needs to be in MySQL's slow query log format. If you need to
input a different format, you can use L<mk-query-digest> to translate the
input a different format, you can use L<pt-query-digest> to translate the
formats. If you don't specify a filename, the tool reads from STDIN.
The tool runs two stages. In the first stage, the tool takes inventory of all
@@ -5864,7 +5864,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -3124,7 +3124,7 @@ sub fingerprint {
$query =~ m#\ASELECT /\*!40001 SQL_NO_CACHE \*/ \* FROM `# # mysqldump query
&& return 'mysqldump';
$query =~ m#/\*\w+\.\w+:[0-9]/[0-9]\*/# # mk-table-checksum, etc query
$query =~ m#/\*\w+\.\w+:[0-9]/[0-9]\*/# # pt-table-checksum, etc query
&& return 'maatkit';
$query =~ m/\Aadministrator command: /
&& return $query;
@@ -4526,7 +4526,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -2340,76 +2340,6 @@ sub _d {
# End DSNParser package
# ###########################################################################
# ###########################################################################
# MaatkitCommon package 7096
# This package is a copy without comments from the original. The original
# with comments and its test file can be found in the SVN repository at,
# trunk/common/MaatkitCommon.pm
# trunk/common/t/MaatkitCommon.t
# See http://code.google.com/p/maatkit/wiki/Developers for more information.
# ###########################################################################
package MaatkitCommon;
use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
require Exporter;
our @ISA = qw(Exporter);
our %EXPORT_TAGS = ();
our @EXPORT = qw();
our @EXPORT_OK = qw(
_d
get_number_of_cpus
);
use constant MKDEBUG => $ENV{MKDEBUG} || 0;
sub _d {
my ($package, undef, $line) = caller 0;
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
map { defined $_ ? $_ : 'undef' }
@_;
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
}
sub get_number_of_cpus {
my ( $sys_info ) = @_;
my $n_cpus;
my $cpuinfo;
if ( $sys_info || (open $cpuinfo, "<", "/proc/cpuinfo") ) {
local $INPUT_RECORD_SEPARATOR = undef;
my $contents = $sys_info || <$cpuinfo>;
MKDEBUG && _d('sys info:', $contents);
close $cpuinfo if $cpuinfo;
$n_cpus = scalar( map { $_ } $contents =~ m/(processor)/g );
MKDEBUG && _d('Got', $n_cpus, 'cpus from /proc/cpuinfo');
return $n_cpus if $n_cpus;
}
if ( $sys_info || ($OSNAME =~ m/freebsd/i) || ($OSNAME =~ m/darwin/i) ) {
my $contents = $sys_info || `sysctl hw.ncpu`;
MKDEBUG && _d('sys info:', $contents);
($n_cpus) = $contents =~ m/(\d)/ if $contents;
MKDEBUG && _d('Got', $n_cpus, 'cpus from sysctl hw.ncpu');
return $n_cpus if $n_cpus;
}
$n_cpus ||= $ENV{NUMBER_OF_PROCESSORS};
return $n_cpus || 1; # There has to be at least 1 CPU.
}
1;
# ###########################################################################
# End MaatkitCommon package
# ###########################################################################
# ###########################################################################
# Daemon package
# This package is a copy without comments from the original. The original
@@ -2658,7 +2588,7 @@ sub main {
. $o->get('base-dir') . ' is not a directory');
}
$o->set('threads', max(2, MaatkitCommon::get_number_of_cpus()))
$o->set('threads', max(2, get_number_of_cpus()))
unless $o->got('threads');
$o->set('verbose', 0) if $o->get('quiet');
@@ -3015,6 +2945,44 @@ sub warn_error {
return;
}
# Returns the number of CPUs. If no sys info is given, then it's gotten
# from /proc/cpuinfo, sysctl or whatever method will work. If sys info
# is given, then we try to parse the number of CPUs from it. Passing in
# $sys_info makes this code easy to test.
sub get_number_of_cpus {
my ( $sys_info ) = @_;
my $n_cpus;
# Try to read the number of CPUs in /proc/cpuinfo.
# This only works on GNU/Linux.
my $cpuinfo;
if ( $sys_info || (open $cpuinfo, "<", "/proc/cpuinfo") ) {
local $INPUT_RECORD_SEPARATOR = undef;
my $contents = $sys_info || <$cpuinfo>;
MKDEBUG && _d('sys info:', $contents);
close $cpuinfo if $cpuinfo;
$n_cpus = scalar( map { $_ } $contents =~ m/(processor)/g );
MKDEBUG && _d('Got', $n_cpus, 'cpus from /proc/cpuinfo');
return $n_cpus if $n_cpus;
}
# Alternatives to /proc/cpuinfo:
# FreeBSD and Mac OS X
if ( $sys_info || ($OSNAME =~ m/freebsd/i) || ($OSNAME =~ m/darwin/i) ) {
my $contents = $sys_info || `sysctl hw.ncpu`;
MKDEBUG && _d('sys info:', $contents);
($n_cpus) = $contents =~ m/(\d)/ if $contents;
MKDEBUG && _d('Got', $n_cpus, 'cpus from sysctl hw.ncpu');
return $n_cpus if $n_cpus;
}
# Windows
$n_cpus ||= $ENV{NUMBER_OF_PROCESSORS};
return $n_cpus || 1; # There has to be at least 1 CPU.
}
sub _d {
my ($package, undef, $line) = caller 0;
@_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
@@ -3054,9 +3022,9 @@ Play all those sessions on host1, save results in ./results:
pt-log-player --play ./sessions --base-dir ./results h=host1
Use L<mk-query-digest> to summarize the results:
Use L<pt-query-digest> to summarize the results:
mk-query-digest ./results/*
pt-query-digest ./results/*
=head1 RISKS
@@ -3100,7 +3068,7 @@ script on a production server!
Each L<"--play"> thread writes its results to a separate file. These result
files are in slow log format so they can be aggregated and summarized with
L<mk-query-digest>. See L<"OUTPUT">.
L<pt-query-digest>. See L<"OUTPUT">.
=head1 OUTPUT
@@ -3495,7 +3463,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -5143,7 +5143,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -1169,7 +1169,7 @@ if ( !caller ) { exit main(@ARGV); }
=head1 NAME
pt-profile-compact - Compact the output from mk-query-profiler.
pt-profile-compact - Compact the output from pt-query-profiler.
=head1 SYNOPSIS
@@ -1207,7 +1207,7 @@ See also L<"BUGS"> for more information on filing bugs and getting help.
=head1 DESCRIPTION
pt-profile-compact slices and aligns the output from mk-query-profiler
pt-profile-compact slices and aligns the output from pt-query-profiler
so you can compare profile results side by side easily. It prints the first
profile result intact, but each subsequent result is trimmed to be as narrow
as possible, then aligned next to the first.
@@ -1222,7 +1222,7 @@ If the first profile it sees is labeled QUERY X, it will only look at QUERY
profiles from then on. The same holds for SUMMARY profiles. This is because
there are different numbers of lines in QUERY and SUMMARY profiles. You can
specify which kind of profile result you want to process. See
L<mk-query-profiler> for the full list of types.
L<pt-query-profiler> for the full list of types.
=head1 OPTIONS

View File

@@ -2332,7 +2332,7 @@ sub fingerprint {
$query =~ m#\ASELECT /\*!40001 SQL_NO_CACHE \*/ \* FROM `# # mysqldump query
&& return 'mysqldump';
$query =~ m#/\*\w+\.\w+:[0-9]/[0-9]\*/# # mk-table-checksum, etc query
$query =~ m#/\*\w+\.\w+:[0-9]/[0-9]\*/# # pt-table-checksum, etc query
&& return 'maatkit';
$query =~ m/\Aadministrator command: /
&& return $query;
@@ -6668,8 +6668,8 @@ Queries are given either by specifying slowlog files, --query, or --review.
# Analyzer all queries in the given slowlog
pt-query-advisor /path/to/slow-query.log
# Get queries from tcpdump using mk-query-digest
mk-query-digest --type tcpdump.txt --print --no-report | pt-query-advisor
# Get queries from tcpdump using pt-query-digest
pt-query-digest --type tcpdump.txt --print --no-report | pt-query-advisor
# Get queries from a general log
pt-query-advisor --type genlog mysql.log
@@ -7060,7 +7060,7 @@ information is suppressed, and only the rule ID is displayed.
type: DSN
Analyze queries from this mk-query-digest query review table.
Analyze queries from this pt-query-digest query review table.
=item --sample
@@ -7133,7 +7133,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -1822,7 +1822,7 @@ sub fingerprint {
$query =~ m#\ASELECT /\*!40001 SQL_NO_CACHE \*/ \* FROM `# # mysqldump query
&& return 'mysqldump';
$query =~ m#/\*\w+\.\w+:[0-9]/[0-9]\*/# # mk-table-checksum, etc query
$query =~ m#/\*\w+\.\w+:[0-9]/[0-9]\*/# # pt-table-checksum, etc query
&& return 'maatkit';
$query =~ m/\Aadministrator command: /
&& return $query;
@@ -13757,8 +13757,6 @@ See also L<"BUGS"> for more information on filing bugs and getting help.
=head1 DESCRIPTION
This tool was formerly known as mk-log-parser.
C<pt-query-digest> is a framework for doing things with events from a query
source such as the slow query log or PROCESSLIST. By default it acts as a very
sophisticated log analysis tool. You can group and sort queries in many
@@ -14099,7 +14097,7 @@ fingerprinting, which might not be exhaustive:
=item *
Group all SELECT queries from mysqldump together, even if they are against
different tables. Ditto for all of mk-table-checksum's checksum queries.
different tables. Ditto for all of pt-table-checksum's checksum queries.
=item *
@@ -15578,7 +15576,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -2697,7 +2697,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

File diff suppressed because it is too large Load Diff

View File

@@ -2075,7 +2075,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -2559,7 +2559,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -3038,7 +3038,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -3209,7 +3209,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -6593,7 +6593,7 @@ sub do_tbl_replicate {
foreach my $warning ( @$warnings ) {
if ( $warning->{message} =~ m/Data truncated for column 'boundaries'/ ) {
_d("Warning: WHERE clause too large for boundaries column; ",
"mk-table-sync may fail; value:", $where);
"pt-table-sync may fail; value:", $where);
}
elsif ( ($warning->{code} || 0) == 1592 ) {
# Error: 1592 SQLSTATE: HY000 (ER_BINLOG_UNSAFE_STATEMENT)
@@ -7133,7 +7133,7 @@ Or,
Or,
pt-table-checksum host1 host2 ... hostN | mk-checksum-filter
pt-table-checksum host1 host2 ... hostN | pt-checksum-filter
See L<"SPECIFYING HOSTS"> for more on the syntax of the host arguments.
@@ -7182,7 +7182,7 @@ on the same server, just checksum both databases:
pt-table-checksum --databases db1,db2
You can then use L<mk-checksum-filter> to compare the results in both databases
You can then use L<pt-checksum-filter> to compare the results in both databases
easily.
pt-table-checksum examines table structure only on the first host specified,
@@ -7412,7 +7412,7 @@ Output is unsorted, though all lines for one table should be output together.
For speed, all checksums are done in parallel (as much as possible) and may
complete out of the order in which they were started. You might want to run
them through another script or command-line utility to make sure they are in the
order you want. If you pipe the output through L<mk-checksum-filter>, you
order you want. If you pipe the output through L<pt-checksum-filter>, you
can sort the output and/or avoid seeing output about tables that have no
differences.
@@ -8176,8 +8176,8 @@ L<"--replicate-check"> option, pt-table-checksum can run the query for you to
make it even easier. See L<"CONSISTENT CHECKSUMS"> for details.
If you find tables that have differences, you can use the chunk boundaries in a
WHERE clause with L<mk-table-sync> to help repair them more efficiently. See
L<mk-table-sync> for details.
WHERE clause with L<pt-table-sync> to help repair them more efficiently. See
L<pt-table-sync> for details.
The table must have at least these columns: db, tbl, chunk, boundaries,
this_crc, master_crc, this_cnt, master_cnt. The table may be named anything you
@@ -8606,7 +8606,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -8933,7 +8933,7 @@ Make slave1 have the same data as its replication master:
pt-table-sync --execute --sync-to-master slave1
Resolve differences that L<mk-table-checksum> found on all slaves of master1:
Resolve differences that L<pt-table-checksum> found on all slaves of master1:
pt-table-sync --execute --replicate test.checksum master1
@@ -9031,11 +9031,11 @@ The default is to run without L<"--replicate"> which causes pt-table-sync
to automatically find differences efficiently with one of several
algorithms (see L<"ALGORITHMS">). Alternatively, the value of
L<"--replicate">, if specified, causes pt-table-sync to use the differences
already found by having previously ran L<mk-table-checksum> with its own
already found by having previously ran L<pt-table-checksum> with its own
C<--replicate> option. Strictly speaking, you don't need to use
L<"--replicate"> because pt-table-sync can find differences, but many
people use L<"--replicate"> if, for example, they checksum regularly
using L<mk-table-checksum> then fix differences as needed with pt-table-sync.
using L<pt-table-checksum> then fix differences as needed with pt-table-sync.
If you're unsure, read each tool's documentation carefully and decide for
yourself, or consult with an expert.
@@ -9179,7 +9179,7 @@ before.
=item Nibble
Finds an index and ascends the index in fixed-size nibbles of L<"--chunk-size">
rows, using a non-backtracking algorithm (see L<mk-archiver> for more on this
rows, using a non-backtracking algorithm (see L<pt-archiver> for more on this
algorithm). It is very similar to L<"Chunk">, but instead of pre-calculating
the boundaries of each piece of the table based on index cardinality, it uses
C<LIMIT> to define each nibble's upper limit, and the previous nibble's upper
@@ -9633,7 +9633,7 @@ The default is C<CRC32>. Other good choices include C<MD5> and C<SHA1>. If you
have installed the C<FNV_64> user-defined function, C<pt-table-sync> will detect
it and prefer to use it, because it is much faster than the built-ins. You can
also use MURMUR_HASH if you've installed that user-defined function. Both of
these are distributed with Maatkit. See L<mk-table-checksum> for more
these are distributed with Maatkit. See L<pt-table-checksum> for more
information and benchmarks.
=item --help
@@ -9744,7 +9744,7 @@ value of L<"--lock">. See L<"--[no]transaction">.
Lock the source and destination table, sync, then swap names. This is useful as
a less-blocking ALTER TABLE, once the tables are reasonably in sync with each
other (which you may choose to accomplish via any number of means, including
dump and reload or even something like L<mk-archiver>). It requires exactly two
dump and reload or even something like L<pt-archiver>). It requires exactly two
DSNs and assumes they are on the same server, so it does no waiting for
replication or the like. Tables are locked with LOCK TABLES.
@@ -9816,11 +9816,11 @@ Sync tables listed as different in this table.
Specifies that C<pt-table-sync> should examine the specified table to find data
that differs. The table is exactly the same as the argument of the same name to
L<mk-table-checksum>. That is, it contains records of which tables (and ranges
L<pt-table-checksum>. That is, it contains records of which tables (and ranges
of values) differ between the master and slave.
For each table and range of values that shows differences between the master and
slave, C<mk-table-checksum> will sync that table, with the appropriate C<WHERE>
slave, C<pt-table-checksum> will sync that table, with the appropriate C<WHERE>
clause, to its master.
This automatically sets L<"--wait"> to 60 and causes changes to be made on the
@@ -9993,7 +9993,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -2278,7 +2278,7 @@ you can do something like the following (the port must come last on FreeBSD):
tcpdump -s 65535 -x -nn -q -tttt -i any -c 1000 port 3306 \
> mysql.tcp.txt
mk-query-digest --type tcpdump mysql.tcp.txt
pt-query-digest --type tcpdump mysql.tcp.txt
The other tcpdump parameters, such as -s, -c, and -i, are up to you. Just make
sure the output looks like this (there is a line break in the first line to

View File

@@ -4087,7 +4087,7 @@ sub fingerprint {
$query =~ m#\ASELECT /\*!40001 SQL_NO_CACHE \*/ \* FROM `# # mysqldump query
&& return 'mysqldump';
$query =~ m#/\*\w+\.\w+:[0-9]/[0-9]\*/# # mk-table-checksum, etc query
$query =~ m#/\*\w+\.\w+:[0-9]/[0-9]\*/# # pt-table-checksum, etc query
&& return 'maatkit';
$query =~ m/\Aadministrator command: /
&& return $query;
@@ -11227,10 +11227,10 @@ Execute and compare all queries in slow.log on host1 to host2:
pt-upgrade slow.log h=host1 h=host2
Use mk-query-digest to get, execute and compare queries from tcpdump:
Use pt-query-digest to get, execute and compare queries from tcpdump:
tcpdump -i eth0 port 3306 -s 65535 -x -n -q -tttt \
| mk-query-digest --type tcpdump --no-report --print \
| pt-query-digest --type tcpdump --no-report --print \
| pt-upgrade h=host1 h=host2
Compare only query times on host1 to host2 and host3:
@@ -11276,7 +11276,7 @@ the results to which the other DSNs are compared. You can "compare" only one
host, in which case there will be no differences but the output can be saved
to be diffed later against the output of another single host "comparison".
At present, pt-upgrade only reads slowlogs. Use C<mk-query-digest --print> to
At present, pt-upgrade only reads slowlogs. Use C<pt-query-digest --print> to
transform other log formats to slowlog.
DSNs and slowlog files can be specified in any order. pt-upgrade will
@@ -11678,7 +11678,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=>, and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -3454,7 +3454,7 @@ severity: warn
This variable is set too high. This is too long to wait before
noticing that the connection to the master has failed and retrying. This
should probably be set to 60 seconds or less. It is also a good idea to
use mk-heartbeat to ensure that the connection does not appear to time out
use pt-heartbeat to ensure that the connection does not appear to time out
when the master is simply idle.
=item slave_skip_errors
@@ -3464,7 +3464,7 @@ severity: crit
You should not set this option. If replication is having errors,
you need to find and resolve the cause of that; it is likely that your
slave's data is different from the master. You can find out with
mk-table-checksum.
pt-table-checksum.
=item sort_buffer_size-1
@@ -3752,7 +3752,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -2942,7 +2942,7 @@ These DSN options are used to create a DSN. Each option is given like
C<option=value>. The options are case-sensitive, so P and p are not the
same option. There cannot be whitespace before or after the C<=> and
if the value contains whitespace it must be quoted. DSN options are
comma-separated. See the L<maatkit> manpage for full details.
comma-separated. See the L<percona-toolkit> manpage for full details.
=over

View File

@@ -152,7 +152,7 @@ sub fingerprint {
&& return 'mysqldump';
# Matches queries like REPLACE /*foo.bar:3/3*/ INTO checksum.checksum
$query =~ m#/\*\w+\.\w+:[0-9]/[0-9]\*/# # mk-table-checksum, etc query
&& return 'maatkit';
&& return 'percona-toolkit';
# Administrator commands appear to be a comment, so return them as-is
$query =~ m/\Aadministrator command: /
&& return $query;

View File

@@ -103,7 +103,7 @@ is(
.q{ISNULL(`foo_base_foo_id`), ISNULL(`fooe_foo_id`)))) AS UNSIGNED)), 10, }
.q{16)) AS crc FROM `foo`.`bar` USE INDEX (`PRIMARY`) WHERE }
.q{(`id` >= 2166633); }),
'maatkit',
'percona-toolkit',
'Fingerprints mk-table-checksum queries together',
);