Not the answer you need?
Register and ask your own question!

Why pt-table-check only checks 2 databases while my server has 10 databases?

leafonswordleafonsword ContributorInactive User Role Beginner
I have 10 databases in my server:
[root@TENCENT64 /data/home/fernguo/percona-toolkit-2.2.20/bin]# mysql -upercona -ppercona -h xxxx
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13372
Server version: 5.7.17-log Source distribution

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| binlog             |
| dba                |
| mysql              |
| percona            |
| performance_schema |
| sbtest             |
| sys                |
| tmp                |
| tmpdir             |
+--------------------+
10 rows in set (0.00 sec)



but pt-table-checksum only checks 2 database,other databases are ignored,why?
[root@TENCENT64 /data/home/fernguo/percona-toolkit-2.2.20/bin]# ./pt-table-checksum  h=xxxx,u=percona,p=percona,P=3306 --no-check-binlog-format --no-check-replication-filters    
            TS ERRORS  DIFFS     ROWS  CHUNKS SKIPPED    TIME TABLE
02-24T17:37:05      0      0        1       1       0   0.011 dba.delay_monitor
02-24T17:37:05      0      0        0       1       0   0.011 mysql.columns_priv
02-24T17:37:05      0      0        4       1       0   0.012 mysql.db
02-24T17:37:05      0      0        2       1       0   0.011 mysql.engine_cost
02-24T17:37:05      0      0        0       1       0   0.012 mysql.event
02-24T17:37:05      0      0        0       1       0   0.011 mysql.func
02-24T17:37:05      0      0        1       1       0   0.011 mysql.gtid_executed
02-24T17:37:05      0      0       40       1       0   0.011 mysql.help_category
02-24T17:37:05      0      0      682       1       0   0.012 mysql.help_keyword
02-24T17:37:05      0      0     1340       1       0   0.012 mysql.help_relation
02-24T17:37:05      0      0      637       1       0   0.015 mysql.help_topic
02-24T17:37:05      0      0        0       1       0   0.011 mysql.ndb_binlog_index
02-24T17:37:05      0      0        0       1       0   0.011 mysql.procs_priv
02-24T17:37:05      0      0        1       1       0   0.011 mysql.proxies_priv
02-24T17:37:05      0      0        6       1       0   0.011 mysql.server_cost
02-24T17:37:05      0      0        0       1       0   0.011 mysql.servers
02-24T17:37:05      0      1        1       1       0   0.011 mysql.tables_priv
02-24T17:37:05      0      0        0       1       0   0.011 mysql.time_zone
02-24T17:37:05      0      0        0       1       0   0.011 mysql.time_zone_leap_second
02-24T17:37:05      0      0        0       1       0   0.011 mysql.time_zone_name
02-24T17:37:05      0      0        0       1       0   0.011 mysql.time_zone_transition
02-24T17:37:05      0      0        0       1       0   0.011 mysql.time_zone_transition_type
02-24T17:37:05      0      0       30       1       0   0.014 mysql.user


Comments

  • carlos.salguerocarlos.salguero Percona Toolkit Developer Percona Staff Role
    Hi,

    According to the code, I can tell you this:

    information_schema -> skipped (1)
    binlog
    dba
    mysql
    percona -> skipped (1)
    performance_schema -> skipped (1)
    sbtest -> skipped (1)
    sys -> skipped (2)
    tmp
    tmpdir

    (1) https://github.com/percona/percona-toolkit/blob/2.2/lib/SchemaIterator.pm#L408
    if ( $db =~ m/information_schema|performance_schema|lost\+found|percona|percona_schema|test/ ) {
          PTDEBUG && _d('Database', $db, 'is a system database, ignoring');
          return 0;
       }
    
    (2) https://github.com/percona/percona-toolkit/blob/2.2/lib/SchemaIterator.pm#L464-L466
    return 0 if $db eq 'sys' && $tbl =~ m/^(?:
           sys_config
       )$/x;
    

    Also databases using these engines are being ignored:

    FEDERATED,MRG_MyISAM.

    Please notice that in the latest version (3.0.1) the regex for (1) has been updated to:
    if ( $db =~ m/^(information_schema|performance_schema|lost\+found|percona_schema)$/ ) {
    
    so, percona, sbtest and test databases won't be ignored anymore.

    Could you check the engines for the binlog, tmp and tmpdir databases or provide the program's output when running it having PTDEBUG=1 environment variable set?

    Regards
  • leafonswordleafonsword Contributor Inactive User Role Beginner
    Hi,

    According to the code, I can tell you this:

    information_schema -> skipped (1)
    binlog
    dba
    mysql
    percona -> skipped (1)
    performance_schema -> skipped (1)
    sbtest -> skipped (1)
    sys -> skipped (2)
    tmp
    tmpdir

    (1) https://github.com/percona/percona-toolkit/blob/2.2/lib/SchemaIterator.pm#L408
    if ( $db =~ m/information_schema|performance_schema|lost\+found|percona|percona_schema|test/ ) {
    PTDEBUG && _d('Database', $db, 'is a system database, ignoring');
    return 0;
    }
    
    (2) https://github.com/percona/percona-toolkit/blob/2.2/lib/SchemaIterator.pm#L464-L466
    return 0 if $db eq 'sys' && $tbl =~ m/^(?:
    sys_config
    )$/x;
    

    Also databases using these engines are being ignored:

    FEDERATED,MRG_MyISAM.

    Please notice that in the latest version (3.0.1) the regex for (1) has been updated to:
    if ( $db =~ m/^(information_schema|performance_schema|lost\+found|percona_schema)$/ ) {
    
    so, percona, sbtest and test databases won't be ignored anymore.

    Could you check the engines for the binlog, tmp and tmpdir databases or provide the program's output when running it having PTDEBUG=1 environment variable set?

    Regards

    Thx,I was using 2.2,after upgrading to 3.0.1,sbtest could be checked~
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.