Commit Graph

885 Commits

Author SHA1 Message Date
Brian Fraser
a7a0da3bc9 Refactor _parse_varvals.
Now it takes two arguments: A regexp and a string to match against.
_parse_varvals itself was split in three:  _preprocess_varvals,
_parse_varvals, and _process_val.

This also modifies the three places that call _parse_varvals; For
two, no real changes were needed, but parse_mysqld() required a fix
to deal with the two final lines of mysqld --help --verbose:

   To see what values a running MySQL server is using, type
   'mysqladmin variables' instead of 'mysqld --verbose --help'.
2012-12-04 05:02:56 -03:00
Brian Fraser
76a010abee Fix for 917770: Use of uninitialized value in substitution (s///) at pt-config-diff line 1996
This turned out to be two bugs mangled into one.

First, _parse_varvals can deal with (var, undef), but not with (undef).
This is a problem because two of the trhee spots that call
_parse_varvals can return undef because of this:

      map  { $_ =~ m/^([^=]+)(?:=(.*))?$/ }
      grep { $_ !~ m/^\s*#/ }  # no # comment lines
      split("\n", $mysqld_section)

The problem is twofold. First, we are not skipping empty or
whitespace-only lines. That means that the map will fail,
and pass an undef to _parse_varvals. So this ended up in
a triple fix: Make _parse_varvals deal with a sole undef,
skip empty/whitespace lines, and change that map to

	map  { $_ =~ m/^([^=]+)(?:=(.*))?$/ ? ($1, $2) : () }

so even if the regex fails in the future, no sole undef
will be passed down the chain.
2012-11-30 16:17:45 -03:00
Daniel Nichter
9d1004ddbb Check and update tool versions, release notes, user docs, etc. before build. 2012-11-19 18:47:13 +00:00
Daniel Nichter
92e1242d00 Update Percona::Toolkit::VERSION and Changelog. 2012-11-19 18:41:34 +00:00
Daniel Nichter
2c85a47a45 Alphabetize the opts and fix 2 typos. 2012-11-19 11:19:33 -07:00
Daniel Nichter
38b9230d8c Finish PXC section of ptc docs. 2012-11-19 11:09:14 -07:00
Daniel Nichter
e0f0ea0cdb Rewrite and enhance lib/Percona/XtraDB/Cluster.pm and t/pt-table-checksum/pxc.t. Change how ptc handles various cluster issues. Change lib/Sandbox.pm subs like start_sandbox() and start_cluster(). PXC docs in ptc are a work in progress. 2012-11-18 22:05:30 -07:00
Daniel Nichter
07bee85a00 Don't check binlog_format on cluster nodes. 2012-11-17 12:55:18 -07:00
Brian Fraser
55a17166c6 Merged fix-1041391-rowchecker-wrong-debug-statement 2012-11-16 11:36:59 -03:00
Brian Fraser
26e1e3bc19 Build percona-toolkit-2.1.6 2012-11-13 12:22:01 -03:00
Brian Fraser
c811d60ae1 Pushed the lib/Percona/Toolkit.pm version, and added extra tests to t/lib/Percona/Toolkit.t 2012-11-13 12:10:25 -03:00
Daniel Nichter
0670d27eb0 Merge pt-osc-default-engine 2012-11-10 10:18:02 -07:00
Brian Fraser
57740c4101 Missing /g in a Quoter regex 2012-11-10 09:54:39 -03:00
Brian Fraser
cafb2b3fb5 Merged fix-1062563-1063912-ptc-pxc-bugs 2012-11-09 18:41:32 -03:00
Brian Fraser
511a402911 Merged fix-1047335-crashed-tables 2012-11-09 13:48:17 -03:00
Brian Fraser
d827c7228d Merged OptionParser-remove-optional_value & updated modules 2012-11-09 13:31:13 -03:00
Daniel Nichter
240e7481f0 Remove duplicate code block I created by merge bits and pieces of branches, thereby confusing bzr. 2012-11-09 08:45:23 -07:00
Daniel Nichter
66c4c8b98b Merge fix-1045317-pt-osc-statistics 2012-11-09 08:44:09 -07:00
Daniel Nichter
1ec018fd82 Simplify and reword --statistics code, tests, and docs. 2012-11-08 18:05:02 -07:00
Daniel Nichter
da50daf0f7 Merge pt-osc-data-loss-bug-1068562 2012-11-08 16:38:07 -07:00
Brian Fraser
7beb0b518e Reverted a few unnecessary changes 2012-11-08 17:47:00 -03:00
Brian Fraser
42a9cf4b6e Merged fix-1062563-1063912-ptc-pxc-bugs and resolved conflicts, added the missing Percona::XtraDB::Cluster file 2012-11-08 17:38:04 -03:00
Brian Fraser
57b3706f1a Fixed a bug in Quoter->split_unquote, added several tests for find_renamed_cols 2012-11-08 06:13:43 -03:00
Daniel Nichter
091d9cf66d Print/save fk errors only if there is one. Fix example --dest table (bug 1075775). 2012-11-07 11:38:09 -07:00
Daniel Nichter
959c2ecf48 Simplify handling old/new cols by making @common_cols have {old=>col,new=>col} mappings. Manually merge bug 1062324 fix. Fix err/warn messages. 2012-11-07 10:26:57 -07:00
Daniel Nichter
530b8bbceb Rename _find_renamed_cols() to find_renamed_cols() and add unit tests in find_renamed_cols.t. Tweak dry-run and error message re --check-alter. 2012-11-07 09:30:23 -07:00
Brian Fraser
58b32bb5ef Merged fix-1073532-Mo-Scalar-Util-PP 2012-11-07 04:12:37 -03:00
Brian Fraser
aa79c9df57 Moved the PXC-dealing parts of Cxn.pm into Percona::XtraDB::Cluster 2012-11-07 04:06:50 -03:00
Brian Fraser
74cd9233c3 Tweaked the report format, which now includes the number of INSERTs 2012-11-06 14:22:56 -03:00
Brian Fraser
a61fd63dc3 Comment about not parsing the --alter no longer applies 2012-11-06 12:14:47 -03:00
Brian Fraser
ab9bfa2667 Changes per Daniel's review: Preserve the column names in table order 2012-11-06 12:05:31 -03:00
Brian Fraser
d3c7a059e7 Fixes per Daniel's review 2012-11-06 11:35:49 -03:00
Daniel Nichter
ddda26fb7f Merged fix-i26211-1058285-821722-implicit-ansi_quotes 2012-11-05 10:57:11 -07:00
Daniel Nichter
a0cd575c95 Merge fix-1009510-1039569-ptc-check-table-on-replicas 2012-11-05 10:54:21 -07:00
Daniel Nichter
0cffac95de Simplify how ptc checks slave tables. Move that code from TableParser to pt_table_checksum::check_slave_tables. Change --[no]check-replicate-table-columns to --[no]check-slave-tables. Move tests to error_handling.t. 2012-11-02 15:22:47 -06:00
Brian Fraser
fe74dc7e32 bin/pt-table-checksum: Missing word in an error message 2012-11-02 04:00:20 -03:00
Brian Fraser
e778a0900c Removed leftover junk from a different branch 2012-11-02 03:08:57 -03:00
Brian Fraser
6720831fd1 Merged fix-1059732-ptc-hash-functions 2012-11-02 01:23:59 -03:00
Brian Fraser
78da81fea5 Fixed a typo and added some regression tests 2012-11-01 17:04:00 -03:00
Brian Fraser
7f557759a7 Updates per Daniel's review 2012-11-01 16:51:58 -03:00
Daniel Nichter
8d82a80b5e Update TableParser in all tools. 2012-11-01 11:33:47 -06:00
Daniel Nichter
949cf31037 Set sql_mode='' before SHOW CREATE TABLE--don't bother with replacing certain values. Move and rewrite tests to ansi_quotes.t. 2012-11-01 11:31:31 -06:00
Brian Fraser
a5a23665fe Simplified split_grants() and added a test for mixed table & column grants on the same table 2012-11-01 06:15:54 -03:00
Brian Fraser
ab0e418fff Fix for 1041391: Debug statement for Chosen hash func prints undef 2012-11-01 04:38:18 -03:00
Daniel Nichter
0fd9239500 Implement split_grants() instead of split(',', $grants) to handle spliting grants with column-level privs. 2012-10-31 14:20:43 -06:00
Daniel Nichter
0453d7dd82 Failing test case. 2012-10-31 13:16:25 -06:00
Daniel Nichter
9b6f10480c Merge fix-938660-ptc-chunk-size-limit-0 2012-10-31 12:20:54 -06:00
Daniel Nichter
7c23608603 Always report slaves with tables too large, regardless of --chunk-size-limit. 2012-10-31 12:17:02 -06:00
Daniel Nichter
b5c48f07d1 Remove unused $limit. Make $chunk_size_limit || 1 because it's the one used for #-of-rows check on slaves. Reverse the new test because we don't want to disable the #-of-rows check. 2012-10-31 12:12:51 -06:00
Daniel Nichter
ce3c80ea45 Remove --chunk-size-limit on index check. If nibbling, the indexes must match, so --chunk-size-limit isn't a factor here. 2012-10-31 10:31:59 -06:00