Skip to content

Instantly share code, notes, and snippets.

Created January 20, 2016 17:49
What would you like to do?
Finding Tables for Checksum
mysql -e "TRUNCATE TABLE percona.checksums"
pt-table-checksum --no-check-binlog-format --no-check-replication-filters --engines ndbcluster --tables $below
# Get all NDB tables
# mysql information_schema -BNe "SELECT CONCAT(table_schema,'.',table_name) FROM tables
# WHERE table_schema NOT IN ('mysql',' ndbinfo','percona','information_schema')
# AND engine = 'ndbcluster'" >/root/ndb_tables.txt
# Remove filtered tables
# for i in `grep replicate_ignore_table /etc/mysql/my.cnf | awk '{print $3}'`; do sed -i "/$i/d" ndb_tables.txt; done
# Concat to 1 line, comma-separated
# cat ndb_tables_to_checksum.txt | while read line; do echo -n "${line},"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment