14
pt-table-checksum - Perform an online replication consistency check, or
15
checksum MySQL tables efficiently on one or many servers.
23
Usage: pt-table-checksum [OPTION...] DSN [DSN...]
25
pt-table-checksum checksums MySQL tables efficiently on one or more hosts.
26
Each host is specified as a DSN and missing values are inherited from the
27
first host. If you specify multiple hosts, the first is assumed to be the
30
STOP! Are you checksumming a slave(s) against its master? Then be sure to learn
31
what "--replicate" does. It is probably the option you want to use.
36
pt-table-checksum --replicate=mydb.checksum master-host
37
... time passses, replication catches up ...
38
pt-table-checksum --replicate=mydb.checksum --replicate-check 2 \
47
pt-table-checksum h=host1,u=user,p=password h=host2 ...
55
pt-table-checksum host1 host2 ... hostN | pt-checksum-filter
58
See "SPECIFYING HOSTS" for more on the syntax of the host arguments.
66
The following section is included to inform users about the potential risks,
67
whether known or unknown, of using this tool. The two main categories of risks
68
are those created by the nature of the tool (e.g. read-only tools vs. read-write
69
tools) and those created by bugs.
71
pt-table-checksum executes queries that cause the MySQL server to checksum its
72
data. This can cause significant server load. It is read-only unless you use
73
the "--replicate" option, in which case it inserts a small amount of data
74
into the specified table.
76
At the time of this release, we know of no bugs that could cause serious harm to
77
users. There are miscellaneous bugs that might be annoying.
79
The authoritative source for updated information is always the online issue
80
tracking system. Issues that affect this tool will be marked as such. You can
81
see a list of such issues at the following URL:
82
`http://www.percona.com/bugs/pt-table-checksum <http://www.percona.com/bugs/pt-table-checksum>`_.
84
See also "BUGS" for more information on filing bugs and getting help.
92
pt-table-checksum generates table checksums for MySQL tables, typically
93
useful for verifying your slaves are in sync with the master. The checksums
94
are generated by a query on the server, and there is very little network
97
Checksums typically take about twice as long as COUNT(\*) on very large InnoDB
98
tables in my tests. For smaller tables, COUNT(\*) is a good bit faster than
99
the checksums. See "--algorithm" for more details on performance.
101
If you specify more than one server, pt-table-checksum assumes the first
102
server is the master and others are slaves. Checksums are parallelized for
103
speed, forking off a child process for each table. Duplicate server names are
104
ignored, but if you want to checksum a server against itself you can use two
105
different forms of the hostname (for example, "localhost 127.0.0.1", or
106
"h=localhost,P=3306 h=localhost,P=3307").
108
If you want to compare the tables in one database to those in another database
109
on the same server, just checksum both databases:
114
pt-table-checksum --databases db1,db2
117
You can then use pt-checksum-filter to compare the results in both databases
120
pt-table-checksum examines table structure only on the first host specified,
121
so if anything differs on the others, it won't notice. It ignores views.
123
The checksums work on MySQL version 3.23.58 through 6.0-alpha. They will not
124
necessarily produce the same values on all versions. Differences in
125
formatting and/or space-padding between 4.1 and 5.0, for example, will cause
126
the checksums to be different.
134
pt-table-checksum connects to a theoretically unlimited number of MySQL
135
servers. You specify a list of one or more host definitions on the command
136
line, such as "host1 host2". Each host definition can be just a hostname, or it
137
can be a complex string that specifies connection options as well. You can
138
specify connection options two ways:
143
Format a host definition in a key=value,key=value form. If an argument on the
144
command line contains the letter '=', pt-table-checksum will parse it into
145
its component parts. Examine the "--help" output for details on the allowed
148
Specifying a list of simple host definitions "host1 host2" is equivalent to the
149
more complicated "h=host1 h=host2" format.
155
With the command-line options such as "--user" and "--password". These
156
options, if given, apply globally to all host definitions.
160
In addition to specifying connection options this way, pt-table-checksum
161
allows shortcuts. Any options specified for the first host definition on the
162
command line fill in missing values in subsequent ones. Any options that are
163
still missing after this are filled in from the command-line options if
166
In other words, the places you specify connection options have precedence:
167
highest precedence is the option specified directly in the host definition, next
168
is the option specified in the first host definition, and lowest is the
171
You can mix simple and complex host definitions and/or command-line arguments.
172
For example, if all your servers except one of your slaves uses a non-standard
178
pt-table-checksum --port 4500 master h=slave1,P=3306 slave2 slave3
181
If you are confused about how pt-table-checksum will connect to your servers,
182
give the "--explain-hosts" option and it will tell you.
190
Speed and efficiency are important, because the typical use case is checksumming
191
large amounts of data.
193
\ ``pt-table-checksum``\ is designed to do very little work itself, and generates
194
very little network traffic aside from inspecting table structures with \ ``SHOW
195
CREATE TABLE``\ . The results of checksum queries are typically 40-character or
198
The MySQL server does the bulk of the work, in the form of the checksum queries.
199
The following benchmarks show the checksum query times for various checksum
200
algorithms. The first two results are simply running \ ``COUNT(col8)``\ and
201
\ ``CHECKSUM TABLE``\ on the table. \ ``CHECKSUM TABLE``\ is just \ ``CRC32``\ under the
202
hood, but it's implemented inside the storage engine layer instead of at the
208
ALGORITHM HASH FUNCTION EXTRA TIME
209
============== ============= ============== =====
214
BIT_XOR MD5 --optimize-xor 80.0
216
BIT_XOR SHA1 --optimize-xor 90.1
222
The tests are entirely CPU-bound. The sample data is an InnoDB table with the
235
col7 smallint unsigned NOT NULL,
236
col8 timestamp NOT NULL,
237
PRIMARY KEY (col2, col1),
243
The table has 4303585 rows, 365969408 bytes of data and 173457408 bytes of
244
indexes. The server is a Dell PowerEdge 1800 with dual 32-bit Xeon 2.8GHz
245
processors and 2GB of RAM. The tests are fully CPU-bound, and the server is
246
otherwise idle. The results are generally consistent to within a tenth of a
247
second on repeated runs.
249
\ ``CRC32``\ is the default checksum function to use, and should be enough for most
250
cases. If you need stronger guarantees that your data is identical, you should
251
use one of the other functions.
259
The "--algorithm" option allows you to specify which algorithm you would
260
like to use, but it does not guarantee that pt-table-checksum will use this
261
algorithm. pt-table-checksum will ultimately select the best algorithm possible
262
given various factors such as the MySQL version and other command line options.
264
The three basic algorithms in descending order of preference are CHECKSUM,
265
BIT_XOR and ACCUM. CHECKSUM cannot be used if any one of these criteria
271
* L<"--where"> is used.
272
* L<"--since"> is used.
273
* L<"--chunk-size"> is used.
274
* L<"--replicate"> is used.
275
* L<"--count"> is used.
276
* MySQL version less than 4.1.1.
279
The BIT_XOR algorithm also requires MySQL version 4.1.1 or later.
281
After checking these criteria, if the requested "--algorithm" remains then it
282
is used, otherwise the first remaining algorithm with the highest preference
291
If you are using this tool to verify your slaves still have the same data as the
292
master, which is why I wrote it, you should read this section.
294
The best way to do this with replication is to use the "--replicate" option.
295
When the queries are finished running on the master and its slaves, you can go
296
to the slaves and issue SQL queries to see if any tables are different from the
297
master. Try the following:
302
SELECT db, tbl, chunk, this_cnt-master_cnt AS cnt_diff,
303
this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc)
306
WHERE master_cnt <> this_cnt OR master_crc <> this_crc
307
OR ISNULL(master_crc) <> ISNULL(this_crc);
310
The "--replicate-check" option can do this query for you. If you can't use
311
this method, try the following:
316
If your servers are not being written to, you can just run the tool with no
322
pt-table-checksum server1 server2 ... serverN
329
If the servers are being written to, you need some way to make sure they are
330
consistent at the moment you run the checksums. For situations other than
331
master-slave replication, you will have to figure this out yourself. You may be
332
able to use the "--where" option with a date or time column to only checksum
333
data that's not recent.
339
If you are checksumming a master and slaves, you can do a fast parallel
340
checksum and assume the slaves are caught up to the master. In practice, this
341
tends to work well except for tables which are constantly updated. You can
342
use the "--slave-lag" option to see how far behind each slave was when it
343
checksummed a given table. This can help you decide whether to investigate
350
The next most disruptive technique is to lock the table on the master, then take
351
checksums. This should prevent changes from propagating to the slaves. You can
352
just lock on the master (with "--lock"), or you can both lock on the master
353
and wait on the slaves till they reach that point in the master's binlog
354
("--wait"). Which is better depends on your workload; only you know that.
360
If you decide to make the checksums on the slaves wait until they're guaranteed
361
to be caught up to the master, the algorithm looks like this:
371
Slave(s): wait for pos, then checksum
379
What I typically do when I'm not using the "--replicate" option is simply run
380
the tool on all servers with no further options. This runs fast, parallel,
381
non-blocking checksums simultaneously. If there are tables that look different,
382
I re-run with "--wait"=600 on the tables in question. This makes the tool
383
lock on the master as explained above.
391
Output is to STDOUT, one line per server and table, with header lines for each
392
database. I tried to make the output easy to process with awk. For this reason
393
columns are always present. If there's no value, pt-table-checksum prints
396
The default is column-aligned output for human readability, but you can change
397
it to tab-separated if you want. Use the "--tab" option for this.
399
Output is unsorted, though all lines for one table should be output together.
400
For speed, all checksums are done in parallel (as much as possible) and may
401
complete out of the order in which they were started. You might want to run
402
them through another script or command-line utility to make sure they are in the
403
order you want. If you pipe the output through pt-checksum-filter, you
404
can sort the output and/or avoid seeing output about tables that have no
407
The columns in the output are as follows. The database, table, and chunk come
408
first so you can sort by them easily (they are the "primary key").
410
Output from "--replicate-check" and "--checksum" are different.
415
The database the table is in.
427
The chunk (see "--chunk-size"). Zero if you are not doing chunked checksums.
433
The server's hostname.
439
The table's storage engine.
445
The table's row count, unless you specified to skip it. If \ ``OVERSIZE``\ is
446
printed, the chunk was skipped because the actual number of rows was greater
447
than "--chunk-size" times "--chunk-size-limit".
453
The table's checksum, unless you specified to skip it or the table has no rows.
454
some types of checksums will be 0 if there are no rows; others will print NULL.
460
How long it took to checksum the \ ``CHUNK``\ , not including \ ``WAIT``\ time.
461
Total checksum time is \ ``WAIT + TIME``\ .
467
How long the slave waited to catch up to its master before beginning to
468
checksum. \ ``WAIT``\ is always 0 for the master. See "--wait".
474
The return value of MASTER_POS_WAIT(). \ ``STAT``\ is always \ ``NULL``\ for the
481
How far the slave lags the master, as reported by SHOW SLAVE STATUS.
482
\ ``LAG``\ is always \ ``NULL``\ for the master.
487
***************************
488
REPLICATE TABLE MAINTENANCE
489
***************************
492
If you use "--replicate" to store and replicate checksums, you may need to
493
perform maintenance on the replicate table from time to time to remove old
494
checksums. This section describes when checksums in the replicate table are
495
deleted automatically by pt-table-checksum and when you must manually delete
498
Before starting, pt-table-checksum calculates chunks for each table, even
499
if "--chunk-size" is not specified (in that case there is one chunk: "1=1").
500
Then, before checksumming each table, the tool deletes checksum chunks in the
501
replicate table greater than the current number of chunks. For example,
502
if a table is chunked into 100 chunks, 0-99, then pt-table-checksum does:
507
DELETE FROM replicate table WHERE db=? AND tbl=? AND chunk > 99
510
That removes any high-end chunks from previous runs which no longer exist.
511
Currently, this operation cannot be disabled.
513
If you use "--resume", "--resume-replicate", or "--modulo", then
514
you need to be careful that the number of rows in a table does not decrease
515
so much that the number of chunks decreases too, else some checksum chunks may
516
be deleted. The one exception is if only rows at the high end of the range
517
are deleted. In that case, the high-end chunks are deleted and lower chunks
518
remain unchanged. An increasing number of rows or chunks should not cause
521
Changing the "--chunk-size" between runs with "--resume",
522
"--resume-replicate", or "--modulo" can cause odd or invalid checksums.
523
You should not do this. It won't work with the resume options. With
524
"--modulo", the safest thing to do is manually delete all the rows in
525
the replicate table for the table in question and start over.
527
If the replicate table becomes cluttered with old or invalid checksums
528
and the auto-delete operation is not deleting them, then you will need to
529
manually clean up the replicate table. Alternatively, if you specify
530
"--empty-replicate-table", then the tool deletes every row in the
539
An exit status of 0 (sometimes also called a return value or return code)
540
indicates success. If there is an error checksumming any table, the exit status
543
When running "--replicate-check", if any slave has chunks that differ from
544
the master, the exit status is 1.
552
If you are using innotop (see `http://code.google.com/p/innotop <http://code.google.com/p/innotop>`_),
553
mytop, or another tool to watch currently running MySQL queries, you may see
554
the checksum queries. They look similar to this:
559
REPLACE /*test.test_tbl:'2'/'5'*/ INTO test.checksum(db, ...
562
Since pt-table-checksum's queries run for a long time and tend to be
563
textually very long, and thus won't fit on one screen of these monitoring
564
tools, I've been careful to place a comment at the beginning of the query so
565
you can see what it is and what it's doing. The comment contains the name of
566
the table that's being checksummed, the chunk it is currently checksumming,
567
and how many chunks will be checksummed. In the case above, it is
568
checksumming chunk 2 of 5 in table test.test_tbl.
576
"--schema" is restricted to option groups Connection, Filter, Output, Help, Config, Safety.
578
"--empty-replicate-table", "--resume" and "--resume-replicate" are mutually exclusive.
580
This tool accepts additional command-line arguments. Refer to the
581
"SYNOPSIS" and usage information for details.
588
Checksum algorithm (ACCUM|CHECKSUM|BIT_XOR).
590
Specifies which checksum algorithm to use. Valid arguments are CHECKSUM,
591
BIT_XOR and ACCUM. The latter two do cryptographic hash checksums.
592
See also "ALGORITHM SELECTION".
594
CHECKSUM is built into MySQL, but has some disadvantages. BIT_XOR and ACCUM are
595
implemented by SQL queries. They use a cryptographic hash of all columns
596
concatenated together with a separator, followed by a bitmap of each nullable
597
column that is NULL (necessary because CONCAT_WS() skips NULL columns).
599
CHECKSUM is the default. This method uses MySQL's built-in CHECKSUM TABLE
600
command, which is a CRC32 behind the scenes. It cannot be used before MySQL
601
4.1.1, and various options disable it as well. It does not simultaneously count
602
rows; that requires an extra COUNT(\*) query. This is a good option when you are
603
using MyISAM tables with live checksums enabled; in this case both the COUNT(\*)
604
and CHECKSUM queries will run very quickly.
606
The BIT_XOR algorithm is available for MySQL 4.1.1 and newer. It uses
607
BIT_XOR(), which is order-independent, to reduce all the rows to a single
610
ACCUM uses a user variable as an accumulator. It reduces each row to a single
611
checksum, which is concatenated with the accumulator and re-checksummed. This
612
technique is order-dependent. If the table has a primary key, it will be used
613
to order the results for consistency; otherwise it's up to chance.
615
The pathological worst case is where identical rows will cancel each other out
616
in the BIT_XOR. In this case you will not be able to distinguish a table full
617
of one value from a table full of another value. The ACCUM algorithm will
620
However, the ACCUM algorithm is order-dependent, so if you have two tables
621
with identical data but the rows are out of order, you'll get different
622
checksums with ACCUM.
624
If a given algorithm won't work for some reason, pt-table-checksum falls back to
625
another. The least common denominator is ACCUM, which works on MySQL 3.23.2 and
634
The database.table with arguments for each table to checksum.
636
This table may be named anything you wish. It must contain at least the
642
CREATE TABLE checksum_args (
643
db char(64) NOT NULL,
644
tbl char(64) NOT NULL,
645
-- other columns as desired
646
PRIMARY KEY (db, tbl)
650
In addition to the columns shown, it may contain any of the other columns listed
651
here (Note: this list is used by the code, MAGIC_overridable_args):
656
algorithm chunk-column chunk-index chunk-size columns count crc function lock
657
modulo use-index offset optimize-xor chunk-size-limit probability separator
658
save-since single-chunk since since-column sleep sleep-coef trim wait where
661
Each of these columns corresponds to the long form of a command-line option.
662
Each column should be NULL-able. Column names with hyphens should be enclosed
663
in backticks (e.g. \`chunk-size\`) when the table is created. The data type does
664
not matter, but it's suggested you use a sensible data type to prevent garbage
667
When \ ``pt-table-checksum``\ checksums a table, it will look for a matching entry
668
in this table. Any column that has a defined value will override the
669
corresponding command-line argument for the table being currently processed.
670
In this way it is possible to specify custom command-line arguments for any
673
If you add columns to the table that aren't in the above list of allowable
674
columns, it's an error. The exceptions are \ ``db``\ , \ ``tbl``\ , and \ ``ts``\ . The \ ``ts``\
675
column can be used as a timestamp for easy visibility into the last time the
676
\ ``since``\ column was updated with "--save-since".
678
This table is assumed to be located on the first server given on the
687
Prompt for a password when connecting to MySQL.
693
type: time; group: Throttle; default: 1s
695
How often to check for slave lag if "--check-slave-lag" is given.
699
--[no]check-replication-filters
701
default: yes; group: Safety
703
Do not "--replicate" if any replication filters are set. When
704
--replicate is specified, pt-table-checksum tries to detect slaves and look
705
for options that filter replication, such as binlog_ignore_db and
706
replicate_do_db. If it finds any such filters, it aborts with an error.
707
Replication filtering makes it impossible to be sure that the checksum
708
queries won't break replication or simply fail to replicate. If you are sure
709
that it's OK to run the checksum queries, you can negate this option to
710
disable the checks. See also "--replicate-database".
716
type: DSN; group: Throttle
718
Pause checksumming until the specified slave's lag is less than "--max-lag".
720
If this option is specified and "--throttle-method" is set to \ ``slavelag``\
721
then "--throttle-method" only checks this slave.
729
Print checksums and table names in the style of md5sum (disables
732
Makes the output behave more like the output of \ ``md5sum``\ . The checksum is
733
first on the line, followed by the host, database, table, and chunk number,
734
concatenated with dots.
742
Prefer this column for dividing tables into chunks. By default,
743
pt-table-checksum chooses the first suitable column for each table, preferring
744
to use the primary key. This option lets you specify a preferred column, which
745
pt-table-checksum uses if it exists in the table and is chunkable. If not, then
746
pt-table-checksum will revert to its default behavior. Be careful when using
747
this option; a poor choice could cause bad performance. This is probably best
748
to use when you are checksumming only a single table, not an entire server. See
749
also "--chunk-index".
757
Prefer this index for chunking tables. By default, pt-table-checksum chooses an
758
appropriate index for the "--chunk-column" (even if it chooses the chunk
759
column automatically). This option lets you specify the index you prefer. If
760
the index doesn't exist, then pt-table-checksum will fall back to its default
761
behavior. pt-table-checksum adds the index to the checksum SQL statements in a
762
\ ``FORCE INDEX``\ clause. Be careful when using this option; a poor choice of
763
index could cause bad performance. This is probably best to use when you are
764
checksumming only a single table, not an entire server.
770
type: string; default: open
772
Set which ends of the chunk range are open or closed. Possible values are
773
one of MAGIC_chunk_range:
779
========== ======================
780
open Both ends are open
781
openclosed Low end open, high end closed
784
By default pt-table-checksum uses an open range of chunks like:
790
`id` >= '10' AND < '20'
794
That range is open because the last chunk selects any row with id greater than
795
(or equal to) 20. An open range can be a problem in cases where a lot of new
796
rows are inserted with IDs greater than 20 while pt-table-checksumming is
797
running because the final open-ended chunk will select all the newly inserted
798
rows. (The less common case of inserting rows with IDs less than 10 would
799
require a \ ``closedopen``\ range but that is not currently implemented.)
800
Specifying \ ``openclosed``\ will cause the final chunk to be closed like:
805
`id` >= '20' AND `id` <= N
808
N is the \ ``MAX(\`id\`)``\ that pt-table-checksum used when it first chunked
809
the rows. Therefore, it will only chunk the range of rows that existed when
810
the tool started and not any newly inserted rows (unless those rows happen
811
to be inserted with IDs less than N).
813
See also "--chunk-size-limit".
821
Approximate number of rows or size of data to checksum at a time. Allowable
822
suffixes are k, M, G. Disallows \ ``--algorithm CHECKSUM``\ .
824
If you specify a chunk size, pt-table-checksum will try to find an index that
825
will let it split the table into ranges of approximately "--chunk-size"
826
rows, based on the table's index statistics. Currently only numeric and date
827
types can be chunked.
829
If the table is chunkable, pt-table-checksum will checksum each range separately
830
with parameters in the checksum query's WHERE clause. If pt-table-checksum
831
cannot find a suitable index, it will do the entire table in one chunk as though
832
you had not specified "--chunk-size" at all. Each table is handled
833
individually, so some tables may be chunked and others not.
835
The chunks will be approximately sized, and depending on the distribution of
836
values in the indexed column, some chunks may be larger than the value you
839
If you specify a suffix (one of k, M or G), the parameter is treated as a data
840
size rather than a number of rows. The output of SHOW TABLE STATUS is then used
841
to estimate the amount of data the table contains, and convert that to a number
848
type: float; default: 2.0; group: Safety
850
Do not checksum chunks with this many times more rows than "--chunk-size".
852
When "--chunk-size" is given it specifies an ideal size for each chunk
853
of a chunkable table (in rows; size values are converted to rows). Before
854
checksumming each chunk, pt-table-checksum checks how many rows are in the
855
chunk with EXPLAIN. If the number of rows reported by EXPLAIN is this many
856
times greater than "--chunk-size", then the chunk is skipped and \ ``OVERSIZE``\
857
is printed for the \ ``COUNT``\ column of the "OUTPUT".
859
For example, if you specify "--chunk-size" 100 and a chunk has 150 rows,
860
then it is checksummed with the default "--chunk-size-limit" value 2.0
861
because 150 is less than 100 \* 2.0. But if the chunk has 205 rows, then it
862
is not checksummed because 205 is greater than 100 \* 2.0.
864
The minimum value for this option is 1 which means that no chunk can be any
865
larger than "--chunk-size". You probably don't want to specify 1 because
866
rows reported by EXPLAIN are estimates which can be greater than or less than
867
the real number of rows in the chunk. If too many chunks are skipped because
868
they are oversize, you might want to specify a value larger than 2.
870
You can disable oversize chunk checking by specifying "--chunk-size-limit" 0.
872
See also "--unchunkable-tables".
878
short form: -c; type: array; group: Filter
880
Checksum only this comma-separated list of columns.
886
type: Array; group: Config
888
Read this comma-separated list of config files; if specified, this must be the
889
first option on the command line.
895
Count rows in tables. This is built into ACCUM and BIT_XOR, but requires an
896
extra query for CHECKSUM.
898
This is disabled by default to avoid an extra COUNT(\*) query when
899
"--algorithm" is CHECKSUM. If you have only MyISAM tables and live checksums
900
are enabled, both CHECKSUM and COUNT will be very fast, but otherwise you may
901
want to use one of the other algorithms.
909
Do a CRC (checksum) of tables.
911
Take the checksum of the rows as well as their count. This is enabled by
912
default. If you disable it, you'll just get COUNT(\*) queries.
916
--create-replicate-table
918
Create the replicate table given by "--replicate" if it does not exist.
920
Normally, if the replicate table given by "--replicate" does not exist,
921
\ ``pt-table-checksum``\ will die. With this option, however, \ ``pt-table-checksum``\
922
will create the replicate table for you, using the database.table name given to
925
The structure of the replicate table is the same as the suggested table
926
mentioned in "--replicate". Note that since ENGINE is not specified, the
927
replicate table will use the server's default storage engine. If you want to
928
use a different engine, you need to create the table yourself.
934
short form: -d; type: hash; group: Filter
936
Only checksum this comma-separated list of databases.
944
Only checksum databases whose names match this Perl regex.
950
short form: -F; type: string; group: Connection
952
Only read mysql options from the given file. You must give an absolute
957
--empty-replicate-table
959
DELETE all rows in the "--replicate" table before starting.
961
Issues a DELETE against the table given by "--replicate" before beginning
962
work. Ignored if "--replicate" is not specified. This can be useful to
963
remove entries related to tables that no longer exist, or just to clean out the
964
results of a previous run.
966
If you want to delete entries for specific databases or tables you must
973
short form: -e; type: hash; group: Filter
975
Do only this comma-separated list of storage engines.
983
Show, but do not execute, checksum queries (disables "--empty-replicate-table").
991
Print connection information and exit.
993
Print out a list of hosts to which pt-table-checksum will connect, with all
994
the various connection options, and exit. See "SPECIFYING HOSTS".
1002
Precision for \ ``FLOAT``\ and \ ``DOUBLE``\ number-to-string conversion. Causes FLOAT
1003
and DOUBLE values to be rounded to the specified number of digits after the
1004
decimal point, with the ROUND() function in MySQL. This can help avoid
1005
checksum mismatches due to different floating-point representations of the same
1006
values on different MySQL versions and hardware. The default is no rounding;
1007
the values are converted to strings by the CONCAT() function, and MySQL chooses
1008
the string representation. If you specify a value of 2, for example, then the
1009
values 1.008 and 1.009 will be rounded to 1.01, and will checksum as equal.
1017
Hash function for checksums (FNV1A_64, MURMUR_HASH, SHA1, MD5, CRC32, etc).
1019
You can use this option to choose the cryptographic hash function used for
1020
"--algorithm"=ACCUM or "--algorithm"=BIT_XOR. The default is to use
1021
\ ``CRC32``\ , but \ ``MD5``\ and \ ``SHA1``\ also work, and you can use your own function,
1022
such as a compiled UDF, if you wish. Whatever function you specify is run in
1023
SQL, not in Perl, so it must be available to MySQL.
1025
The \ ``FNV1A_64``\ UDF mentioned in the benchmarks is much faster than \ ``MD5``\ . The
1026
C++ source code is distributed with Maatkit. It is very simple to compile and
1027
install; look at the header in the source code for instructions. If it is
1028
installed, it is preferred over \ ``MD5``\ . You can also use the MURMUR_HASH
1029
function if you compile and install that as a UDF; the source is also
1030
distributed with Maatkit, and it is faster and has better distribution
1045
type: Hash; group: Filter
1047
Ignore this comma-separated list of columns when calculating the checksum.
1049
This option only affects the checksum when using the ACCUM or BIT_XOR
1056
type: Hash; group: Filter
1058
Ignore this comma-separated list of databases.
1062
--ignore-databases-regex
1066
Ignore databases whose names match this Perl regex.
1072
type: Hash; default: FEDERATED,MRG_MyISAM; group: Filter
1074
Ignore this comma-separated list of storage engines.
1080
type: Hash; group: Filter
1082
Ignore this comma-separated list of tables.
1084
Table names may be qualified with the database name.
1088
--ignore-tables-regex
1092
Ignore tables whose names match the Perl regex.
1098
Lock on master until done on slaves (implies "--slave-lag").
1100
This option can help you to get a consistent read on a master and many slaves.
1101
If you specify this option, pt-table-checksum will lock the table on the
1102
first server on the command line, which it assumes to be the master. It will
1103
keep this lock until the checksums complete on the other servers.
1105
This option isn't very useful by itself, so you probably want to use "--wait"
1108
Note: if you're checksumming a slave against its master, you should use
1109
"--replicate". In that case, there's no need for locking, waiting, or any of
1116
type: time; group: Throttle; default: 1s
1118
Suspend checksumming if the slave given by "--check-slave-lag" lags.
1120
This option causes pt-table-checksum to look at the slave every time it's about
1121
to checksum a chunk. If the slave's lag is greater than the option's value, or
1122
if the slave isn't running (so its lag is NULL), pt-table-checksum sleeps for
1123
"--check-interval" seconds and then looks at the lag again. It repeats until
1124
the slave is caught up, then proceeds to checksum the chunk.
1126
This option is useful to let you checksum data as fast as the slaves can handle
1127
it, assuming the slave you directed pt-table-checksum to monitor is
1128
representative of all the slaves that may be replicating from this server. It
1129
should eliminate the need for "--sleep" or "--sleep-coef".
1137
Do only every Nth chunk on chunked tables.
1139
This option lets you checksum only some chunks of the table. This is a useful
1140
alternative to "--probability" when you want to be sure you get full coverage
1141
in some specified number of runs; for example, you can do only every 7th chunk,
1142
and then use "--offset" to rotate the modulo every day of the week.
1144
Just like with "--probability", a table that cannot be chunked is done every
1151
type: string; default: 0
1153
Modulo offset expression for use with "--modulo".
1155
The argument may be an SQL expression, such as \ ``WEEKDAY(NOW())``\ (which returns
1156
a number from 0 through 6). The argument is evaluated by MySQL. The result is
1157
used as follows: if chunk_num % "--modulo" == "--offset", the chunk will
1166
Optimize BIT_XOR with user variables.
1168
This option specifies to use user variables to reduce the number of times each
1169
row must be passed through the cryptographic hash function when you are using
1170
the BIT_XOR algorithm.
1172
With the optimization, the queries look like this in pseudo-code:
1175
.. code-block:: perl
1178
BIT_XOR(SLICE_OF(@user_variable)),
1179
BIT_XOR(SLICE_OF(@user_variable)),
1181
BIT_XOR(SLICE_OF(@user_variable := HASH(col1, col2... colN))));
1184
The exact positioning of user variables and calls to the hash function is
1185
determined dynamically, and will vary between MySQL versions. Without the
1186
optimization, it looks like this:
1189
.. code-block:: perl
1192
BIT_XOR(SLICE_OF(MD5(col1, col2... colN))),
1193
BIT_XOR(SLICE_OF(MD5(col1, col2... colN))),
1195
BIT_XOR(SLICE_OF(MD5(col1, col2... colN))));
1198
The difference is the number of times all the columns must be mashed together
1199
and fed through the hash function. If you are checksumming really large
1200
columns, such as BLOB or TEXT columns, this might make a big difference.
1206
short form: -p; type: string; group: Connection
1208
Password to use when connecting.
1216
Create the given PID file. The file contains the process ID of the script.
1217
The PID file is removed when the script exits. Before starting, the script
1218
checks if the PID file already exists. If it does not, then the script creates
1219
and writes its own PID to it. If it does, then the script checks the following:
1220
if the file contains a PID and a process is running with that PID, then
1221
the script dies; or, if there is no process running with that PID, then the
1222
script overwrites the file with its own PID and starts; else, if the file
1223
contains no PID, then the script dies.
1229
short form: -P; type: int; group: Connection
1231
Port number to use for connection.
1237
type: int; default: 100
1239
Checksums will be run with this percent probability.
1241
This is an integer between 1 and 100. If 100, every chunk of every table will
1242
certainly be checksummed. If less than that, there is a chance that some chunks
1243
of some tables will be skipped. This is useful for routine jobs designed to
1244
randomly sample bits of tables without checksumming the whole server. By
1245
default, if a table is not chunkable, it will be checksummed every time even
1246
when the probability is less than 100. You can override this with
1249
See also "--modulo".
1255
type: array; default: time,30
1257
Print progress reports to STDERR. Currently, this feature is only for when
1258
"--throttle-method" waits for slaves to catch up.
1260
The value is a comma-separated list with two parts. The first part can be
1261
percentage, time, or iterations; the second part specifies how often an update
1262
should be printed, in percentage, seconds, or number of iterations.
1268
short form: -q; group: Output
1270
Do not print checksum results.
1276
Re-checksum chunks that "--replicate-check" found to be different.
1282
type: int; group: Throttle
1284
Number of levels to recurse in the hierarchy when discovering slaves.
1285
Default is infinite.
1287
See "--recursion-method".
1295
Preferred recursion method for discovering slaves.
1297
Possible methods are:
1300
.. code-block:: perl
1303
=========== ================
1304
processlist SHOW PROCESSLIST
1305
hosts SHOW SLAVE HOSTS
1308
The processlist method is preferred because SHOW SLAVE HOSTS is not reliable.
1309
However, the hosts method is required if the server uses a non-standard
1310
port (not 3306). Usually pt-table-checksum does the right thing and finds
1311
the slaves, but you may give a preferred method and it will be used first.
1312
If it doesn't find any slaves, the other methods will be tried.
1320
Replicate checksums to slaves (disallows --algorithm CHECKSUM).
1322
This option enables a completely different checksum strategy for a consistent,
1323
lock-free checksum across a master and its slaves. Instead of running the
1324
checksum queries on each server, you run them only on the master. You specify a
1325
table, fully qualified in db.table format, to insert the results into. The
1326
checksum queries will insert directly into the table, so they will be replicated
1327
through the binlog to the slaves.
1329
When the queries are finished replicating, you can run a simple query on each
1330
slave to see which tables have differences from the master. With the
1331
"--replicate-check" option, pt-table-checksum can run the query for you to
1332
make it even easier. See "CONSISTENT CHECKSUMS" for details.
1334
If you find tables that have differences, you can use the chunk boundaries in a
1335
WHERE clause with pt-table-sync to help repair them more efficiently. See
1336
pt-table-sync for details.
1338
The table must have at least these columns: db, tbl, chunk, boundaries,
1339
this_crc, master_crc, this_cnt, master_cnt. The table may be named anything you
1340
wish. Here is a suggested table structure, which is automatically used for
1341
"--create-replicate-table" (MAGIC_create_replicate):
1344
.. code-block:: perl
1346
CREATE TABLE checksum (
1347
db char(64) NOT NULL,
1348
tbl char(64) NOT NULL,
1350
boundaries char(100) NOT NULL,
1351
this_crc char(40) NOT NULL,
1352
this_cnt int NOT NULL,
1353
master_crc char(40) NULL,
1354
master_cnt int NULL,
1355
ts timestamp NOT NULL,
1356
PRIMARY KEY (db, tbl, chunk)
1360
Be sure to choose an appropriate storage engine for the checksum table. If you
1361
are checksumming InnoDB tables, for instance, a deadlock will break replication
1362
if the checksum table is non-transactional, because the transaction will still
1363
be written to the binlog. It will then replay without a deadlock on the
1364
slave and break replication with "different error on master and slave." This
1365
is not a problem with pt-table-checksum, it's a problem with MySQL
1366
replication, and you can read more about it in the MySQL manual.
1368
This works only with statement-based replication (pt-table-checksum will switch
1369
the binlog format to STATEMENT for the duration of the session if your server
1370
uses row-based replication).
1372
In contrast to running the tool against multiple servers at once, using this
1373
option eliminates the complexities of synchronizing checksum queries across
1374
multiple servers, which normally requires locking and unlocking, waiting for
1375
master binlog positions, and so on. Thus, it disables "--lock", "--wait",
1376
and "--slave-lag" (but not "--check-slave-lag", which is a way to throttle
1377
the execution speed).
1379
The checksum queries actually do a REPLACE into this table, so existing rows
1380
need not be removed before running. However, you may wish to do this anyway to
1381
remove rows related to tables that don't exist anymore. The
1382
"--empty-replicate-table" option does this for you.
1384
Since the table must be qualified with a database (e.g. \ ``db.checksums``\ ),
1385
pt-table-checksum will only USE this database. This may be important if any
1386
replication options are set because it could affect whether or not changes
1387
to the table are replicated.
1389
If the slaves have any --replicate-do-X or --replicate-ignore-X options, you
1390
should be careful not to checksum any databases or tables that exist on the
1391
master and not the slaves. Changes to such tables may not normally be executed
1392
on the slaves because of the --replicate options, but the checksum queries
1393
modify the contents of the table that stores the checksums, not the tables whose
1394
data you are checksumming. Therefore, these queries will be executed on the
1395
slave, and if the table or database you're checksumming does not exist, the
1396
queries will cause replication to fail. For more information on replication
1397
rules, see `http://dev.mysql.com/doc/en/replication-rules.html <http://dev.mysql.com/doc/en/replication-rules.html>`_.
1399
The table specified by "--replicate" will never be checksummed itself.
1407
Check results in "--replicate" table, to the specified depth. You must use
1408
this after you run the tool normally; it skips the checksum step and only checks
1411
It recursively finds differences recorded in the table given by
1412
"--replicate". It recurses to the depth you specify: 0 is no recursion
1413
(check only the server you specify), 1 is check the server and its slaves, 2 is
1414
check the slaves of its slaves, and so on.
1416
It finds differences by running the query shown in "CONSISTENT CHECKSUMS",
1417
and prints results, then exits after printing. This is just a convenient way of
1418
running the query so you don't have to do it manually.
1420
The output is one informational line per slave host, followed by the results
1421
of the query, if any. If "--quiet" is specified, there is no output. If
1422
there are no differences between the master and any slave, there is no output.
1423
If any slave has chunks that differ from the master, pt-table-checksum's
1424
exit status is 1; otherwise it is 0.
1426
This option makes \ ``pt-table-checksum``\ look for slaves by running \ ``SHOW
1427
PROCESSLIST``\ . If it finds connections that appear to be from slaves, it derives
1428
connection information for each slave with the same default-and-override method
1429
described in "SPECIFYING HOSTS".
1431
If \ ``SHOW PROCESSLIST``\ doesn't return any rows, \ ``pt-table-checksum``\ looks at
1432
\ ``SHOW SLAVE HOSTS``\ instead. The host and port, and user and password if
1433
available, from \ ``SHOW SLAVE HOSTS``\ are combined into a DSN and used as the
1434
argument. This requires slaves to be configured with \ ``report-host``\ ,
1435
\ ``report-port``\ and so on.
1437
This requires the @@SERVER_ID system variable, so it works only on MySQL
1442
--replicate-database
1446
\ ``USE``\ only this database with "--replicate". By default, pt-table-checksum
1447
executes USE to set its default database to the database that contains the table
1448
it's currently working on. It changes its default database as it works on
1449
different tables. This is is a best effort to avoid problems with replication
1450
filters such as binlog_ignore_db and replicate_ignore_db. However, replication
1451
filters can create a situation where there simply is no one right way to do
1452
things. Some statements might not be replicated, and others might cause
1453
replication to fail on the slaves. In such cases, it is up to the user to
1454
specify a safe default database. This option specifies a default database that
1455
pt-table-checksum selects with USE, and never changes afterwards. See also
1456
<L"--[no]check-replication-filters">.
1464
Resume checksum using given output file from a previously interrupted run.
1466
The given output file should be the literal output from a previous run of
1467
\ ``pt-table-checksum``\ . For example:
1470
.. code-block:: perl
1472
pt-table-checksum host1 host2 -C 100 > checksum_results.txt
1473
pt-table-checksum host1 host2 -C 100 --resume checksum_results.txt
1476
The command line options given to the first run and the resumed run must
1477
be identical (except, of course, for --resume). If they are not, the result
1478
will be unpredictable and probably wrong.
1480
"--resume" does not work with "--replicate"; for that, use
1481
"--resume-replicate".
1487
Resume "--replicate".
1489
This option resumes a previous checksum operation using "--replicate".
1490
It is like "--resume" but does not require an output file. Instead,
1491
it uses the checksum table given to "--replicate" to determine where to
1492
resume the checksum operation.
1498
When "--arg-table" and "--since" are given, save the current "--since"
1499
value into that table's \ ``since``\ column after checksumming. In this way you can
1500
incrementally checksum tables by starting where the last one finished.
1502
The value to be saved could be the current timestamp, or it could be the maximum
1503
existing value of the column given by "--since-column". It depends on what
1504
options are in effect. See the description of "--since" to see how
1505
timestamps are different from ordinary values.
1511
Checksum \ ``SHOW CREATE TABLE``\ instead of table data.
1517
type: string; default: #
1519
The separator character used for CONCAT_WS().
1521
This character is used to join the values of columns when checksumming with
1522
"--algorithm" of BIT_XOR or ACCUM.
1528
type: string; default: wait_timeout=10000; group: Connection
1530
Set these MySQL variables. Immediately after connecting to MySQL, this
1531
string will be appended to SET and executed.
1539
Checksum only data newer than this value.
1541
If the table is chunk-able or nibble-able, this value will apply to the first
1542
column of the chunked or nibbled index.
1544
This is not too different to "--where", but instead of universally applying a
1545
WHERE clause to every table, it selectively finds the right column to use and
1546
applies it only if such a column is found. See also "--since-column".
1548
The argument may be an expression, which is evaluated by MySQL. For example,
1549
you can specify \ ``CURRENT_DATE - INTERVAL 7 DAY``\ to get the date of one week
1552
A special bit of extra magic: if the value is temporal (looks like a date or
1553
datetime), then the table is checksummed only if the create time (or last
1554
modified time, for tables that report the last modified time, such as MyISAM
1555
tables) is newer than the value. In this sense it's not applied as a WHERE
1564
The column name to be used for "--since".
1566
The default is for the tool to choose the best one automatically. If you
1567
specify a value, that will be used if possible; otherwise the best
1568
auto-determined one; otherwise none. If the column doesn't exist in the table,
1575
Permit skipping with "--probability" if there is only one chunk.
1577
Normally, if a table isn't split into many chunks, it will always be
1578
checksummed regardless of "--probability". This setting lets the
1579
probabilistic behavior apply to tables that aren't divided into chunks.
1587
Report replication delay on the slaves.
1589
If this option is enabled, the output will show how many seconds behind the
1590
master each slave is. This can be useful when you want a fast, parallel,
1591
non-blocking checksum, and you know your slaves might be delayed relative to the
1592
master. You can inspect the results and make an educated guess whether any
1593
discrepancies on the slave are due to replication delay instead of corrupt data.
1595
If you're using "--replicate", a slave that is delayed relative to the master
1596
does not invalidate the correctness of the results, so this option is disabled.
1602
type: int; group: Throttle
1604
Sleep time between checksums.
1606
If this option is specified, pt-table-checksum will sleep the specified
1607
number of seconds between checksums. That is, it will sleep between every
1608
table, and if you specify "--chunk-size", it will also sleep between chunks.
1610
This is a very crude way to throttle checksumming; see "--sleep-coef" and
1611
"--check-slave-lag" for techniques that permit greater control.
1617
type: float; group: Throttle
1619
Calculate "--sleep" as a multiple of the last checksum time.
1621
If this option is specified, pt-table-checksum will sleep the amount of
1622
time elapsed during the previous checksum, multiplied by the specified
1623
coefficient. This option is ignored if "--sleep" is specified.
1625
This is a slightly more sophisticated way to throttle checksum speed: sleep a
1626
varying amount of time between chunks, depending on how long the chunks are
1627
taking. Even better is to use "--check-slave-lag" if you're checksumming
1628
master/slave replication.
1634
short form: -S; type: string; group: Connection
1636
Socket file to use for connection.
1644
Print tab-separated output, not column-aligned output.
1650
short form: -t; type: hash; group: Filter
1652
Do only this comma-separated list of tables.
1654
Table names may be qualified with the database name.
1662
Only checksum tables whose names match this Perl regex.
1668
type: string; default: none; group: Throttle
1670
Throttle checksumming when doing "--replicate".
1672
At present there is only one method: \ ``slavelag``\ . When "--replicate" is
1673
used, pt-table-checksum automatically sets "--throttle-method" to
1674
\ ``slavelag``\ and discovers every slave and throttles checksumming if any slave
1675
lags more than "--max-lag". Specify \ ``-throttle-method none``\ to disable
1676
this behavior completely, or specify "--check-slave-lag" and
1677
pt-table-checksum will only check that slave.
1679
See also "--recurse" and "--recursion-method".
1685
Trim \ ``VARCHAR``\ columns (helps when comparing 4.1 to >= 5.0).
1687
This option adds a \ ``TRIM()``\ to \ ``VARCHAR``\ columns in \ ``BIT_XOR``\ and \ ``ACCUM``\
1690
This is useful when you don't care about the trailing space differences between
1691
MySQL versions which vary in their handling of trailing spaces. MySQL 5.0 and
1692
later all retain trailing spaces in \ ``VARCHAR``\ , while previous versions would
1697
--unchunkable-tables
1701
Checksum tables that cannot be chunked when "--chunk-size" is specified.
1703
By default pt-table-checksum will not checksum a table that cannot be chunked
1704
when "--chunk-size" is specified because this might result in a huge,
1705
non-chunkable table being checksummed in one huge, memory-intensive chunk.
1707
Specifying this option allows checksumming tables that cannot be chunked.
1708
Be careful when using this option! Make sure any non-chunkable tables
1709
are not so large that they will cause the tool to consume too much memory
1712
See also "--chunk-size-limit".
1720
Add FORCE INDEX hints to SQL statements.
1722
By default \ ``pt-table-checksum``\ adds an index hint (\ ``FORCE INDEX``\ for MySQL
1723
v4.0.9 and newer, \ ``USE INDEX``\ for older MySQL versions) to each SQL statement
1724
to coerce MySQL into using the "--chunk-index" (whether the index is
1725
specified by the option or auto-detected). Specifying \ ``--no-use-index``\ causes
1726
\ ``pt-table-checksum``\ to omit index hints.
1732
short form: -u; type: string; group: Connection
1734
User for login if not current user.
1742
Verify checksum compatibility across servers.
1744
This option runs a trivial checksum on all servers to ensure they have
1745
compatible CONCAT_WS() and cryptographic hash functions.
1747
Versions of MySQL before 4.0.14 will skip empty strings and NULLs in
1748
CONCAT_WS, and others will only skip NULLs. The two kinds of behavior will
1749
produce different results if you have any columns containing the empty string
1750
in your table. If you know you don't (for instance, all columns are
1751
integers), you can safely disable this check and you will get a reliable
1752
checksum even on servers with different behavior.
1760
Show version and exit.
1766
short form: -w; type: time
1768
Wait this long for slaves to catch up to their master (implies "--lock"
1771
Note: the best way to verify that a slave is in sync with its master is to use
1772
"--replicate" instead. The "--wait" option is really only useful if
1773
you're trying to compare masters and slaves without using "--replicate",
1774
which is possible but complex and less efficient in some ways.
1776
This option helps you get a consistent checksum across a master server and its
1777
slaves. It combines locking and waiting to accomplish this. First it locks the
1778
table on the master (the first server on the command line). Then it finds the
1779
master's binlog position. Checksums on slaves will be deferred until they reach
1780
the same binlog position.
1782
The argument to the option is the number of seconds to wait for the slaves to
1783
catch up to the master. It is actually the argument to MASTER_POS_WAIT(). If
1784
the slaves don't catch up to the master within this time, they will unblock
1785
and go ahead with the checksum. You can tell whether this happened by
1786
examining the STAT column in the output, which is the return value of
1795
Do only rows matching this \ ``WHERE``\ clause (disallows "--algorithm" CHECKSUM).
1797
You can use this option to limit the checksum to only part of the table. This
1798
is particularly useful if you have append-only tables and don't want to
1799
constantly re-check all rows; you could run a daily job to just check
1800
yesterday's rows, for instance.
1802
This option is much like the -w option to mysqldump. Do not specify the WHERE
1803
keyword. You may need to quote the value. Here is an example:
1806
.. code-block:: perl
1808
pt-table-checksum --where "foo=bar"
1817
Add a chunk for rows with zero or zero-equivalent values. The only has an
1818
effect when "--chunk-size" is specified. The purpose of the zero chunk
1819
is to capture a potentially large number of zero values that would imbalance
1820
the size of the first chunk. For example, if a lot of negative numbers were
1821
inserted into an unsigned integer column causing them to be stored as zeros,
1822
then these zero values are captured by the zero chunk instead of the first
1823
chunk and all its non-zero values.
1833
These DSN options are used to create a DSN. Each option is given like
1834
\ ``option=value``\ . The options are case-sensitive, so P and p are not the
1835
same option. There cannot be whitespace before or after the \ ``=``\ and
1836
if the value contains whitespace it must be quoted. DSN options are
1837
comma-separated. See the percona-toolkit manpage for full details.
1842
dsn: charset; copy: yes
1844
Default character set.
1850
dsn: database; copy: yes
1858
dsn: mysql_read_default_file; copy: yes
1860
Only read default options from the given file
1866
dsn: host; copy: yes
1874
dsn: password; copy: yes
1876
Password to use when connecting.
1882
dsn: port; copy: yes
1884
Port number to use for connection.
1890
dsn: mysql_socket; copy: yes
1892
Socket file to use for connection.
1898
dsn: user; copy: yes
1900
User for login if not current user.
1910
Visit `http://www.percona.com/software/ <http://www.percona.com/software/>`_ to download the latest release of
1911
Percona Toolkit. Or, to get the latest release from the command line:
1914
.. code-block:: perl
1916
wget percona.com/latest/percona-toolkit/PKG
1919
Replace \ ``PKG``\ with \ ``tar``\ , \ ``rpm``\ , or \ ``deb``\ to download the package in that
1920
format. You can also get individual tools from the latest release:
1923
.. code-block:: perl
1925
wget percona.com/latest/percona-toolkit/TOOL
1928
Replace \ ``TOOL``\ with the name of any tool.
1936
The environment variable \ ``PTDEBUG``\ enables verbose debugging output to STDERR.
1937
To enable debugging and capture all output to a file, run the tool like:
1940
.. code-block:: perl
1942
PTDEBUG=1 pt-table-checksum ... > FILE 2>&1
1945
Be careful: debugging output is voluminous and can generate several megabytes
1954
You need Perl, DBI, DBD::mysql, and some core packages that ought to be
1955
installed in any reasonably new version of Perl.
1963
For a list of known bugs, see `http://www.percona.com/bugs/pt-table-checksum <http://www.percona.com/bugs/pt-table-checksum>`_.
1965
Please report bugs at `https://bugs.launchpad.net/percona-toolkit <https://bugs.launchpad.net/percona-toolkit>`_.
1966
Include the following information in your bug report:
1969
\* Complete command-line used to run the tool
1977
\* MySQL version of all servers involved
1981
\* Output from the tool including STDERR
1985
\* Input files (log/dump/config files, etc.)
1989
If possible, include debugging output by running the tool with \ ``PTDEBUG``\ ;
2006
Claus Jeppesen, Francois Saint-Jacques, Giuseppe Maxia, Heikki Tuuri,
2007
James Briggs, Martin Friebe, and Sergey Zhuravlev
2010
*********************
2011
ABOUT PERCONA TOOLKIT
2012
*********************
2015
This tool is part of Percona Toolkit, a collection of advanced command-line
2016
tools developed by Percona for MySQL support and consulting. Percona Toolkit
2017
was forked from two projects in June, 2011: Maatkit and Aspersa. Those
2018
projects were created by Baron Schwartz and developed primarily by him and
2019
Daniel Nichter, both of whom are employed by Percona. Visit
2020
`http://www.percona.com/software/ <http://www.percona.com/software/>`_ for more software developed by Percona.
2023
********************************
2024
COPYRIGHT, LICENSE, AND WARRANTY
2025
********************************
2028
This program is copyright 2007-2011 Baron Schwartz, 2011 Percona Inc.
2029
Feedback and improvements are welcome.
2031
THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
2032
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
2033
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2035
This program is free software; you can redistribute it and/or modify it under
2036
the terms of the GNU General Public License as published by the Free Software
2037
Foundation, version 2; OR the Perl Artistic License. On UNIX and similar
2038
systems, you can issue \`man perlgpl' or \`man perlartistic' to read these
2041
You should have received a copy of the GNU General Public License along with
2042
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
2043
Place, Suite 330, Boston, MA 02111-1307 USA.
2051
Percona Toolkit v1.0.0 released 2011-08-01