Commit Graph

235 Commits

Author SHA1 Message Date
Daniel Nichter
1ec666de0e Add Bash libs tmpdir and log_warn_die. Docu parse_options. Don't use TMPDIR in test-bash-functions; add ok() to test-bash-functions. 2011-10-27 11:56:58 -06:00
Daniel Nichter
1ae8661271 First Bash parse_options lib with tests. 2011-10-26 10:50:55 -06:00
Daniel Nichter
ac9373bbff Add --max-load. Reset instead of recreating Progress objects. 2011-10-19 21:08:46 -06:00
Daniel Nichter
79beac6eb7 Add MySQLStatusWaiter.pm. 2011-10-19 20:07:02 -06:00
Daniel Nichter
c4db7c0633 Test and fix very small --chunk-time. Report immediately when a slave is stopped. Add short form -q for --quiet. Report very slow checksums once for each table. Use Cxn::name() instead of Cxn::dsn()->{n}; remove n from DSNParser; make cxn's name @@hostname by default, else stringified DSN parts. 2011-10-19 11:27:19 -06:00
Daniel Nichter
8d2259e5b3 Fix --ignore-columns in NibbleIterator. Increase test coverage to 93%. 2011-10-18 09:32:48 -06:00
Daniel Nichter
e08719ac4a Fix timestamp. Make DSNs inherit from master DSN. 2011-10-17 11:41:02 -06:00
Daniel Nichter
07420ff78e Don't crash on empty tables with --chunk-size-limit=0. Don't crash trying to print MySQL warning. Finish updating (all the important) tests. 2011-10-15 17:47:56 -06:00
Daniel Nichter
23e9b91d78 Update replication_filters.t and resume.t. 2011-10-15 15:03:25 -06:00
Daniel Nichter
4ad88ddd93 Update progress.t, option_sanity.t, and standard_options.t. Make test env always have slave2 (12347, slave of 12346). Add PerconaTest::count_checksum_results(). Add util/wait-to-exec. 2011-10-14 11:45:11 -06:00
Daniel Nichter
48fb4baa7c Use 'h=localhost' if no DSN or DSN options given. Remove unused DSN parts (D and t) and don't copy some parts. Move issue_947.t tests into standard_options.t and remove issue_947.t. 2011-10-14 07:59:43 -06:00
Daniel Nichter
964bb094a0 Get row estimate from NibbleIterator. Use user's index over MySQL's index when --where is given. 2011-10-13 09:23:53 -06:00
Daniel Nichter
28fa7d62c2 Support --where in NibbleIterator. If --where, prefer index that MySQL wants to use. Keep SHOW TABLE STATUS from SchemaIterator and re-use it in NibbleIterator (avoids double execution). 2011-10-13 08:49:32 -06:00
Daniel Nichter
083fb1b8ca Make --explain cummulative. Update char_chunking.t. Reword checksum query comments. 2011-10-12 11:22:13 -06:00
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
31256a9e49 Add set callback to Cxn, docu module, and only ask for pass once. 2011-10-07 10:35:28 -06:00
Daniel Nichter
e2e40488c5 Add Cxn.pm. Make MasterSlave, NibbleIterator, and ReplicaLagWaiter use Cxn. Rewrite, simplify Retry. 2011-10-06 12:47:35 -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
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
e2739d8a25 Add NibbleIterator::set_boundary(). 2011-09-29 09:11:50 -06:00
Daniel Nichter
258ed361c8 test 2011-09-29 08:36:18 -06:00
Daniel Nichter
929000cfdd Partial --resume implementation (work in progress). 2011-09-28 11:33:12 -06:00
Daniel Nichter
25882d49e7 Resume for SchemaIterator. Use only next_lb; don't need first_lb in NibbleIterator. 2011-09-27 13:06:24 -06:00
Daniel Nichter
04eca15150 Add next_boundaries callback. 2011-09-27 10:23:09 -06:00
Daniel Nichter
83bbe45187 Simplify NibbleIterator callbacks. Pass args to init callback so caller can check ub_sth. 2011-09-27 08:21:34 -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
10e31c1b63 Fix NibbleIterator::_can_nibble_once(). Add boundaries() and one_nibble(), remove unused _check_index_usage(). 2011-09-26 10:23:42 -06:00
Daniel Nichter
eff835ffe7 Detect infinite loops using only lower boundaries. 2011-09-26 08:53:22 -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
361c958a66 Auto-skip mysql.slow|general_log tables. 2011-09-23 08:07:03 -06:00
Daniel Nichter
acef6450ff Add CleanupTask. 2011-09-22 11:45:44 -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
bbae1ba9cf Add TS to output. Don't require initial n and t. 2011-09-22 09:04:11 -06:00
Daniel Nichter
9a3899d9d0 Fix typo. 2011-09-21 11:22:43 -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
d979821efe Rewrite ReplicaLagLimiter::wait(). 2011-09-21 10:30:33 -06:00
Daniel Nichter
30dc37e3a5 Debug-print initial chunk size. 2011-09-20 11:51:40 -06:00
Daniel Nichter
412e9e4e18 Allow initial values to be zero for ReplicaLagLimiter::new(). Return 1/0/death from ReplicaLagLimiter::wait(). 2011-09-20 11:28:00 -06:00
Daniel Nichter
be9337a202 Pass NibbleIterator obj to callbacks. 2011-09-20 10:05:37 -06:00
Daniel Nichter
a19dd0b16c Simplify ReplicaLagLimiter::update(). 2011-09-20 08:59:33 -06:00
Daniel Nichter
26b99b20ad Use weighted exp avg instead of moving avg for ReplicaLagLimiter::update(). Use "LIMIT ?, 2" for ub_sql/sth in NibbleIterator. 2011-09-19 11:41:41 -06:00
Daniel Nichter
b1e01be2c2 Finish, test, and docu ReplicaLagLimiter. 2011-09-19 09:06:30 -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
bc2401ebf5 Remove MySQLDump from pt-table-checksum. Use "$tp" instead of "$du" in SchemaIterator. 2011-09-15 09:41:47 -06:00
Daniel Nichter
756142c1d1 Remove MySQLDump; move get_create_table() and get_table_status() to TableParser and remove saving results in each function. 2011-09-15 09:39:32 -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
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