Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Fixed
-
3.0.13
-
None
-
1
Description
DIFF_ROWS is never greater than zero, it seems. I would expect it to show an estimation of the max amount of rows that could have differences, but I couldn't make it have a value >0 even when deleting all rows in one of the slaves.
The relevant pieces of code seem to be:
$tbl->{checksum_results}->{max_rows_cnt_diff} || 0,
my $max_cnt_diff=0; for my $diff (@$diffs) { if ( $diff->{cnt_diff} > $max_cnt_diff ) { $tbl->{checksum_results}->{max_rows_cnt_diff} = $diff->{cnt_diff}; } }
How to reproduce:
1- set up replication sandbox
2- create table with data
3- delete all rows from the table in one of the slaves
4- run pt-table-checksum
Example output:
shell> pt-table-checksum --no-check-binlog-format --tables=joinit h=127.0.0.1,P=26350,u=root,p=msandbox TS ERRORS DIFFS ROWS DIFF_ROWS CHUNKS SKIPPED TIME TABLE 09-15T16:56:09 0 10 1048576 0 12 0 4.691 test.joinit
From the problematic slave:
mysql> SELECT db, tbl, SUM(this_cnt) AS total_rows, COUNT(*) AS chunks -> FROM percona.checksums -> WHERE ( -> master_cnt <> this_cnt -> OR master_crc <> this_crc -> OR ISNULL(master_crc) <> ISNULL(this_crc)) -> GROUP BY db, tbl; +-------+-------------+------------+--------+ | db | tbl | total_rows | chunks | +-------+-------------+------------+--------+ ... | test | joinit | 0 | 10 | +-------+-------------+------------+--------+ 4 rows in set (0.00 sec)
Attachments
Issue Links
- is FF-depended by
-
PT-1765 Documentation for ``DIFF_ROWS`` doesn't exist.
-
- Done
-