def main(user, password, db, tbl, slave,
vertical, debug, version, color):
"""twindb_table_compare reads percona.checksums from the master and slave
and shows records that differ if there are any inconsistencies."""
if version:
print(__version__)
exit(0)
setup_logging(LOG, debug=debug, color=color)
try:
for database, table in get_inconsistent_tables(slave,
user,
password,
ch_db=db,
ch_tbl=tbl):
get_inconsistencies(database, table, slave, user, password,
ch_db=db, ch_tbl=tbl,
vertical=vertical, color=color)
except MySQLdb.Error as err: # pylint: disable=no-member
LOG.error(err)
exit(1)
评论列表
文章目录