pt-table-checksum ignore databases

Bug #1680799 reported by Muhammad Irfan
10
This bug affects 2 people
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_schema|performance_schema|lost\+found|percona|percona_schema|test/ ) {
 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_binlog_index
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_zone_leap_second
04-07T05:01:09 0 0 0 1 0 0.005 mysql.time_zone_name
04-07T05:01:09 0 0 0 1 0 0.005 mysql.time_zone_transition
04-07T05:01:09 0 0 0 1 0 0.005 mysql.time_zone_transition_type
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.

Tags: i181529 pt119
Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Brian Bird (brian-bird) wrote :

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.

tags: added: i181529
tags: added: pt119
Revision history for this message
Muhammad Irfan (muhammad-irfan) wrote :

In my opinion, --databases option should allow checksum of database for test database so by default it ignore but If --databases option explicitly specify "test" database then it should go for the checksum process.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1421

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.