使用PTDEBUG方式输出日志,提示要比对的库为系统库,被忽略了,请教是什么原因
[node1-/tmp]pt-table-checksum --version 版本
pt-table-checksum 2.2.20
输出日志:
# SchemaIterator:7405 22397 Filter databases value: yetestnew
# SchemaIterator:7401 22397 Filter ignore-tables value: yetestnew checksums
# SchemaIterator:7405 22397 Filter ignore-engines value: mrg_myisam
# SchemaIterator:7405 22397 Filter ignore-engines value: federated
# SchemaIterator:7425 22397 Schema object filters: $VAR1 = {
# databases => {
# yetestnew => 1
# },
# 'ignore-engines' => {
# federated => 1,
# mrg_myisam => 1
# },
# 'ignore-tables' => {
# yetestnew => {
# checksums => 1
# }
# }
# };
#
# SchemaIterator:7536 22397 Getting next schema object from dbh DBI::db=HASH(0xffef500)
# SchemaIterator:7540 22397 SHOW DATABASES
# SchemaIterator:7618 22397 Database information_schema is a system database, ignoring
# SchemaIterator:7635 22397 Database mysql is not in --databases list, ignoring
# SchemaIterator:7618 22397 Database performance_schema is a system database, ignoring
# SchemaIterator:7618 22397 Database test is a system database, ignoring
# SchemaIterator:7635 22397 Database ye is not in --databases list, ignoring
# SchemaIterator:7618 22397 Database yetest is a system database, ignoring
# SchemaIterator:7618 22397 Database yetestnew is a system database, ignoring
# SchemaIterator:7546 22397 Found 0 databases
# SchemaIterator:7605 22397 No more databases
# pt_table_checksum:10602 22397 Exit status 0 oktorun 1 have time 1
# Cxn:3740 22397 Destroying cxn
# Cxn:3749 22397 DBI::db=HASH(0x100004f0) Disconnecting dbh on node2 h=node2,P=3306
# Cxn:3740 22397 Destroying cxn
# Cxn:3749 22397 DBI::db=HASH(0xffef500) Disconnecting dbh on node1 h=127.0.0.1,P=3306
2 个解决方案
#1
# 'ignore-tables' => {
# yetestnew => {
# checksums => 1
# }
# }
这个配置忽略了yetestnew
# yetestnew => {
# checksums => 1
# }
# }
这个配置忽略了yetestnew
#2
执行的语句如下,没有指定ignore-database参数
pt-table-checksum --nocheck-replication-filters --replicate=test.checksums --databases=yetestnew h=node1,u=root,p=mysql,P=3306
以下是pt-table-checksum --help中默认ignore* 部分参数信息
--ignore-columns
--ignore-databases
--ignore-databases-regex (No value)
--ignore-engines FEDERATED,MRG_MyISAM
--ignore-tables percona.checksums
--ignore-tables-regex (No value)
不太清楚为什么会过滤yetestnew库
#1
# 'ignore-tables' => {
# yetestnew => {
# checksums => 1
# }
# }
这个配置忽略了yetestnew
# yetestnew => {
# checksums => 1
# }
# }
这个配置忽略了yetestnew
#2
执行的语句如下,没有指定ignore-database参数
pt-table-checksum --nocheck-replication-filters --replicate=test.checksums --databases=yetestnew h=node1,u=root,p=mysql,P=3306
以下是pt-table-checksum --help中默认ignore* 部分参数信息
--ignore-columns
--ignore-databases
--ignore-databases-regex (No value)
--ignore-engines FEDERATED,MRG_MyISAM
--ignore-tables percona.checksums
--ignore-tables-regex (No value)
不太清楚为什么会过滤yetestnew库