Finding Tables for Checksum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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