pt-table-checksum ignore databases
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I found pt-table-checksum ignore many system databases from checksuming by default. As per code:
7609 sub database_is_allowed {
7610 my ( $self, $db ) = @_;
7611 die "I need a db argument" unless $db;
7612
7613 $db = lc $db;
7614
7615 my $filter = $self->{filters};
7616
7617 if ( $db =~ m/information_
7618 PTDEBUG && _d('Database', $db, 'is a system database, ignoring');
7619 return 0;
7620 }
[root@centos3 ~]# ./pt-table-checksum
Diffs cannot be detected because no slaves were found. Please read the --recursion-method documentation for information.
TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE
04-07T05:01:08 0 0 3 1 0 0.008 irfan.irfan
04-07T05:01:09 0 0 0 1 0 0.007 mysql.columns_priv
04-07T05:01:09 0 0 2 1 0 0.011 mysql.db
04-07T05:01:09 0 0 0 1 0 0.005 mysql.event
04-07T05:01:09 0 0 0 1 0 0.005 mysql.func
04-07T05:01:09 0 0 40 1 0 0.013 mysql.help_category
04-07T05:01:09 0 0 485 1 0 0.016 mysql.help_keyword
04-07T05:01:09 0 0 1090 1 0 0.013 mysql.help_relation
04-07T05:01:09 0 0 533 1 0 0.014 mysql.help_topic
04-07T05:01:09 0 0 0 1 0 0.005 mysql.ndb_
04-07T05:01:09 0 0 0 1 0 0.006 mysql.procs_priv
04-07T05:01:09 0 0 2 1 0 0.006 mysql.proxies_priv
04-07T05:01:09 0 0 0 1 0 0.005 mysql.servers
04-07T05:01:09 0 0 0 1 0 0.005 mysql.tables_priv
04-07T05:01:09 0 0 0 1 0 0.005 mysql.time_zone
04-07T05:01:09 0 0 0 1 0 0.006 mysql.time_
04-07T05:01:09 0 0 0 1 0 0.005 mysql.time_
04-07T05:01:09 0 0 0 1 0 0.005 mysql.time_
04-07T05:01:09 0 0 0 1 0 0.005 mysql.time_
04-07T05:01:09 0 0 6 1 0 0.020 mysql.user
[root@centos3 ~]# ./pt-table-checksum --databases test,irfan
Diffs cannot be detected because no slaves were found. Please read the --recursion-method documentation for information.
TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE
04-07T05:02:36 0 0 3 1 0 0.008 irfan.irfan
Even test database is not checksum after adding it explicitly with --databases option.
I believe it's atleast documentation bug.
Changed in percona-toolkit: | |
status: | New → Confirmed |
tags: | added: i181529 |
tags: | added: pt119 |
I would suggest the "test" database (at least) is set as the default value for the --ignore-databases option so that it can be overridden if necessary, rather than having the databases hardcoded in the tool.