Commit Graph

108 Commits

Author SHA1 Message Date
Daniel Nichter
b2f92391a7 Fatal error if slave dies. Make Cxn::connect() if dbh id dead. Sort slave lag properly and use Cxn instead of dbh in ReplicaLagWaiter. Check master cxn before keepalive. Sleep N+0.25 waiting for chunks. 2011-10-10 10:56:08 -06:00
Daniel Nichter
eae742ee78 Timestamp all output. 2011-10-07 11:58:41 -06:00
Daniel Nichter
e89def56b8 Catch and handle 'Data truncated for column' warning. 2011-10-07 11:29:10 -06:00
Daniel Nichter
290e931c57 Unify SET stuff for new cxn. Add --lock-wait-timeout and set innodb_lock_wait_time. 2011-10-07 10:38:36 -06:00
Daniel Nichter
59ff1c6907 Catch and retry certain errors. 2011-10-06 13:05:43 -06:00
Daniel Nichter
bd900c5ab8 Implement --quiet. 2011-10-04 10:50:20 -06:00
Daniel Nichter
830f855c05 Fix race condition between replicate and replicate-check. 2011-09-30 09:58:33 -06:00
Daniel Nichter
b3cfd659b1 First basic tests. Reset global var. Add post_pipeline to PercoaTest::no_diff(). 2011-09-29 17:54:38 -06:00
Daniel Nichter
78b4f36d71 Don't require DSN. Begin rewriting docs. 2011-09-29 13:02:14 -06:00
Daniel Nichter
ed68f3ef5c Exit 1 if diffs. 2011-09-29 12:21:32 -06:00
Daniel Nichter
c794f5e119 Implement --replicate and --replicate-check at same time. Pass where arg to find_replication_differences(). 2011-09-29 12:16:35 -06:00
Daniel Nichter
c4092295a5 Re-implement --replicate-check. Add --quiet. Update find_replication_differences(). 2011-09-29 10:46:22 -06:00
Daniel Nichter
206ac93214 Working --resume. 2011-09-29 09:17:36 -06:00
Daniel Nichter
929000cfdd Partial --resume implementation (work in progress). 2011-09-28 11:33:12 -06:00
Daniel Nichter
d4b5409492 Implement --[no]empty-replicate-table (default: yes). 2011-09-27 12:05:42 -06:00
Daniel Nichter
af17abb7ed EXPLAIN next ub sql. Catch Ctrl-C between nibbles. Use NibbleIterator member functions instead of args. 2011-09-27 10:40:11 -06:00
Daniel Nichter
c9e8444166 Handle one-chunk tables. Chunk tables w/o indexes if they're small enough. Check index for every chunk. Check chunk size if ub and next_lb are equal. 2011-09-26 11:38:35 -06:00
Daniel Nichter
4e8b00b4cc Update NibbleIterator in pt-table-checksum. 2011-09-23 17:41:49 -06:00
Daniel Nichter
9f3e05691c Detect infinite loops. Use best non-unique index. Disable chunk size limit if chunk index is unique. 2011-09-23 17:33:23 -06:00
Daniel Nichter
07cb6010a2 More repl table columns: chunk_time, chunk_index, lower_boundary, and upper_boundary (those two replace boundaries). 2011-09-23 10:13:57 -06:00
Daniel Nichter
b783470aaa Implement table progress. Adj rate and chunk size only if nibbled > 0 rows. Always use --chunk-size if --chunk-time=0. 2011-09-23 08:54:58 -06:00
Daniel Nichter
1d47fe29b8 Use CleanupTask to close all dbh nicely. Don't do after_nibble stuff if chunk was skipped. Don't pass %common_modules. 2011-09-22 12:11:33 -06:00
Daniel Nichter
60c28c0b30 Remove --[no]optimize-xor; it's always on now. Add prefix TS with day and month. 2011-09-22 10:47:54 -06:00
Daniel Nichter
380cf4b0bd Init talbe 2+ chunk size based on total server rate. 2011-09-22 10:13:44 -06:00
Daniel Nichter
bbae1ba9cf Add TS to output. Don't require initial n and t. 2011-09-22 09:04:11 -06:00
Daniel Nichter
43ecc8546d Replace ReplicaLagLimiter with ReplicaLagWaiter and WeightedAvgRate. Don't inherit rate from prev tables. Store nibble_time and chunk_size in $tbl. 2011-09-21 11:31:36 -06:00
Daniel Nichter
f6fb8b44bd Decompose ReplicaLagLimiter into ReplicaLagWaiter and WeightedAvgRate. Don't use OptionParser in NibbleIterator; use chunk_size arg instead. 2011-09-21 11:19:49 -06:00
Daniel Nichter
31d6171355 Restore --max-lag and friends. 2011-09-21 10:39:55 -06:00
Daniel Nichter
d979821efe Rewrite ReplicaLagLimiter::wait(). 2011-09-21 10:30:33 -06:00
Daniel Nichter
6784bf30c3 Make error message prettier. 2011-09-20 12:00:42 -06:00
Daniel Nichter
bfb5b7ae6a Implement ReplicaLagLimiter. Add --chunk-time. 2011-09-20 11:52:35 -06:00
Daniel Nichter
006b93ddf9 Create ReplicaLagLimiter. Replace --max-lag, --check-interval, and --check-slave-lag with --replica-lag and --replica-lag-dsn. Use TableParser::get_table_status() in NibbleItertor. Eval SHOW TABLE STATUS. Auto-add "n" (name) part to parsed DSNs. 2011-09-16 17:35:40 -06:00
Daniel Nichter
32ade00663 Eval entire checksum op for each tbl. Use "percona" as default db for checksums table. 2011-09-15 11:46:57 -06:00
Daniel Nichter
bc2401ebf5 Remove MySQLDump from pt-table-checksum. Use "$tp" instead of "$du" in SchemaIterator. 2011-09-15 09:41:47 -06:00
Daniel Nichter
d5eb621333 Set AutoCommit=1. 2011-09-14 10:57:06 -06:00
Daniel Nichter
2f2644caf1 Update RowChecksum and OptionParser in pt-table-checksum. 2011-09-14 10:41:37 -06:00
Daniel Nichter
d881fa0b35 Change --chunk-size to type size. Make TIME column %.3f. Make OptionParser report invalid sizes. 2011-09-14 10:40:42 -06:00
Daniel Nichter
676a7aa20f Fix cols, sep, trim, and float precision. Re-add --columns. 2011-09-14 10:16:43 -06:00
Daniel Nichter
c7ff1cfd6a Fix --replicate-check. 2011-09-13 11:33:39 -06:00
Daniel Nichter
8daf767af5 Implement slave lag throttling, --recursion-method dsn=DSN, and --replicate-check. Change columns in output; add DIFFS column. Remove removed options from POD. 2011-09-13 11:26:56 -06:00
Daniel Nichter
5f2cdad299 Implement MasterSlave::get_slaves() to get cxns from a DSN table. Add comments explaining use_repl_db(). 2011-09-13 09:27:59 -06:00
Daniel Nichter
0fb3770635 Count and print total rows and time. 2011-09-12 11:21:24 -06:00
Daniel Nichter
82ace1a9b9 Fix debug statement causing error. 2011-09-12 11:07:24 -06:00
Daniel Nichter
155cd48259 Fix updating master_crc and master_cnt. Implement print_checksum_results(). 2011-09-12 11:05:28 -06:00
Daniel Nichter
5e7cb7597d Get CRC function once, not per-table. 2011-09-12 10:35:20 -06:00
Daniel Nichter
5281c76aaf Don't re-use same db in use_repl_db(). 2011-09-12 10:30:40 -06:00
Daniel Nichter
f0e87228dd Fix sakila.film_actor error. 2011-09-12 08:25:01 -06:00
Daniel Nichter
5eb857b7d3 Warn about oversize chunks. Use while() instead of for() to iter works. Fix typo in warning message. 2011-09-11 13:06:12 -06:00
Daniel Nichter
06b4928093 First working but unfinished pt-table-checksum 2.0. 2011-09-11 12:36:27 -06:00
Daniel Nichter
43aebffad1 Build percona-toolkit-1.0.1 2011-09-01 10:00:38 -06:00