mk-checksum-filter.1p man page

mk-checksum-filter — Filter checksums from mk-table-checksum.


Usage: mk-checksum-filter [OPTION]... FILE

mk-checksum-filter filters checksums from mk-table-checksum and prints those that differ. With no FILE, or when FILE is -, read standard input.


mk-checksum-filter checksums.txt
mk-table-checksum host1 host2 | mk-checksum-filter
mk-checksum-filter db1-checksums.txt db2-checksums.txt --ignore-databases


The following section is included to inform users about the potential risks, 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-checksum-filter is read-only and very low-risk.

At the time of this release, we know of no bugs that could cause serious harm to users.

The authoritative source for updated information is always the online issue tracking system. Issues that affect this tool will be marked as such. You can see a list of such issues at the following URL: <http://www.maatkit.org/bugs/mk-checksum…>.

See also "Bugs" for more information on filing bugs and getting help.


This program takes the unsorted, verbose output from mk-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 mk-table-checksum, or you can save the mk-table-checksum's output and run mk-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 all read.

Exit Status

An exit status of 0 (sometimes also called a return value or return code) indicates that no differences were found. If there were any differences, the tool exits with status 1.


"--ignore-databases" and "--equal-databases" are mutually exclusive.

This tool accepts additional command-line arguments. Refer to the "Synopsis" and usage information for details.

type: Hash

This comma-separated list of databases are equal.

These database names are always considered to have the same tables. In other words, this makes "database1.table1.chunk1" equal to "database2.table1.chunk1" if they have the same checksum.

This disables incremental processing, so you won't see any results until all input is processed.
short form: -h

Preserves headers output by mk-table-checksum.
Show help and exit.
Ignore the database name when comparing lines.

This disables incremental processing, so you won't see any results until all input is processed.
type: string

The name of the master server.

Specifies which host is the replication master, and sorts lines for that host first, so you can see the checksum values on the master server before the slave.
type: string

Show unique differing host/db/table names.

The argument must be one of host, db, or table.
short form: -v

Output all lines, even those that have no differences, except for header lines.
Show version and exit.


You can download Maatkit from Google Code at <http://code.google.com/p/maatkit/>, or you can get any of the tools easily with a command like the following:

wget http://www.maatkit.org/get/toolname
wget http://www.maatkit.org/trunk/toolname

Where "toolname" can be replaced with the name (or fragment of a name) of any of the Maatkit tools. Once downloaded, they're ready to run; no installation is needed. The first URL gets the latest released version of the tool, and the second gets the latest trunk code from Subversion.


The environment variable "MKDEBUG" enables verbose debugging output in all of the Maatkit tools:

MKDEBUG=1 mk-....

System Requirements

You need Perl and some core packages that ought to be installed in any reasonably new version of Perl.


For a list of known bugs see <http://www.maatkit.org/bugs/mk-checksum…>.

Please use Google Code Issues and Groups to report bugs or request support: <http://code.google.com/p/maatkit/>. You can also join #maatkit on Freenode to discuss Maatkit.

Please include the complete command-line used to reproduce the problem you are seeing, the version of all MySQL servers involved, the complete output of the tool when run with "--version", and if possible, debugging output produced by running with the "MKDEBUG=1" environment variable.

Copyright, License and Warranty

This program is copyright 2007-2011 Baron Schwartz. Feedback and improvements are welcome.


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2; OR the Perl Artistic License. On UNIX and similar systems, you can issue `man perlgpl' or `man perlartistic' to read these licenses.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.


Baron "Xaprb" Schwartz

About Maatkit

This tool is part of Maatkit, a toolkit for power users of MySQL. Maatkit was created by Baron Schwartz; Baron and Daniel Nichter are the primary code contributors. Both are employed by Percona. Financial support for Maatkit development is primarily provided by Percona and its clients.


This manual page documents Ver 1.2.23 Distrib 7540 $Revision: 7477 $.