diff --git a/bin/pt-table-sync b/bin/pt-table-sync index 06f871f1..2a3af9e8 100755 --- a/bin/pt-table-sync +++ b/bin/pt-table-sync @@ -12281,7 +12281,7 @@ The default is C. Other good choices include C and C. If you have installed the C user-defined function, C will detect it and prefer to use it, because it is much faster than the built-ins. You can also use MURMUR_HASH if you've installed that user-defined function. Both of -these are distributed with Maatkit. See L for more +these are distributed with Percona Server. See L for more information and benchmarks. =item --help diff --git a/config/sphinx-build/Makefile b/config/sphinx-build/Makefile index 8148d1eb..ca588868 100644 --- a/config/sphinx-build/Makefile +++ b/config/sphinx-build/Makefile @@ -39,10 +39,11 @@ clean: html: @echo "Downloading percona-theme ..." - @wget -O percona-theme.tar.gz http://percona.com/docs/theme/percona-toolkit/2.2 + @wget -O percona-theme.tar.gz https://www.percona.com/docs/theme-1-4/percona-toolkit/2.2 @rm -rf percona-theme @echo "Extracting theme." @tar -zxf percona-theme.tar.gz + @mv percona-theme-1-4 percona-theme @rm percona-theme.tar.gz @echo "Building html doc" $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html diff --git a/config/sphinx-build/conf.py b/config/sphinx-build/conf.py index 920cbe1d..f4b30b8b 100644 --- a/config/sphinx-build/conf.py +++ b/config/sphinx-build/conf.py @@ -189,6 +189,7 @@ latex_logo = 'percona-logo.jpg' # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False +latex_toplevel_sectioning = 'part' # If true, show page references after internal links. #latex_show_pagerefs = False diff --git a/docs/release_notes.rst b/docs/release_notes.rst index a839c8c5..0540c14a 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -1,6 +1,35 @@ Release Notes ************* +v3.0.3 released 2017-05-18 +========================== + +Percona Toolkit 3.0.3 includes the following changes: + +New Features + +* Added the ``--skip-check-slave-lag`` option for ``pt-table-checksum``, ``pt-online-schema-change``, and ``pt-archiver``. + + This option can be used to specify list of servers where to skip checking for slave lag. + +* 1642754: Added support for collecting replication slave information in ``pt-stalk``. + +* PT-111: Added support for collecting information about variables from Performance Schema in ``pt-stalk``. For more information, see 1642753. + +* PT-116: Added the ``--[no]use-insert-ignore`` option for ``pt-online-schema-change`` to force or prevent using ``IGNORE`` on ``INSERT`` statements. For more information, see 1545129. + +Bug Fixes + +* PT-115: Fixed ``OptionParser`` to accept repeatable DSNs. + +* PT-126: Fixed ``pt-online-schema-change`` to correctly parse comments. For more information, see 1592072. + +* PT-128: Fixed ``pt-stalk`` to include memory usage information. For more information, see 1510809. + +* PT-130: Fixed ``pt-mext`` to work with non-empty RSA public key. For more information, see 1587404. + +* PT-132: Fixed ``pt-online-schema-change`` to enable ``--no-drop-new-table`` when ``--no-swap-tables`` and ``--no-drop-triggers`` are used. + v3.0.2 released 2017-03-27 ========================== diff --git a/t/lib/JSONReportFormatter.t b/t/lib/JSONReportFormatter.t index fae98352..2e3ad3bf 100644 --- a/t/lib/JSONReportFormatter.t +++ b/t/lib/JSONReportFormatter.t @@ -12,6 +12,8 @@ use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); use Test::More; +use JSON; +use File::Slurp; use Data::Dumper; $Data::Dumper::Indent = 1; @@ -155,14 +157,27 @@ $result = $j->query_report( groupby => 'fingerprint', ); -ok( - no_diff( - $result, - "t/lib/samples/JSONReportFormatter/report001.json", - cmd_output => 1, - ), - 'Basic output' -) or diag($test_diff); +my $sample_file = "t/lib/samples/JSONReportFormatter/report001.json"; +my $want_text = read_file($sample_file); +my $want = decode_json $want_text; +my $got = decode_json $result; + + +# I've change the original test because it was comparing JSONs as strings +# but it is hard (or impossible) to ensure in all environments the output +# will have a particular order. +# I prefer to decode_json($result) and compare it against the struct I am +# expecting as a result for 2 reasons: +# 1) using decode_json ensures that the json syntax is valid, but comparing +# strings cannot ensure that since the sample json may contain syntax errors. +# 2) Using structs (hashes) and is_deeply makes this test to work regarding +# of the sort order during the encoding process. + +is_deeply( + $got, + $want, + 'Basic output', +); # ############################################################################# # Done. diff --git a/t/lib/samples/JSONReportFormatter/report001.json b/t/lib/samples/JSONReportFormatter/report001.json index 03b771a4..465c2de9 100644 --- a/t/lib/samples/JSONReportFormatter/report001.json +++ b/t/lib/samples/JSONReportFormatter/report001.json @@ -1 +1 @@ -{"classes":[{"attribute":"fingerprint","checksum":"82860EDA9A88FCC5","distillate":"SELECT users","example":{"Query_time":"8.000652","query":"SELECT id FROM users WHERE name='foo'","ts":"2007-10-15 21:43:52"},"fingerprint":"select id from users where name=?","histograms":{"Query_time":[0,0,0,0,0,0,2,0]},"metrics":{"Lock_time":{"avg":"0.000155","max":"0.000201","median":"0.000155","min":"0.000109","pct":"0.666667","pct_95":"0.000201","stddev":"0.000065","sum":"0.000310"},"Query_time":{"avg":"4.500667","max":"8.000652","median":"4.500667","min":"1.000682","pct":"0.666667","pct_95":"8.000652","stddev":"4.949726","sum":"9.001334"},"Rows_examined":{"avg":"1","max":"2","median":"1","min":"1","pct":"0","pct_95":"2","stddev":"0","sum":"3"},"Rows_sent":{"avg":"1","max":"1","median":"1","min":"1","pct":"0","pct_95":"1","stddev":"0","sum":"2"},"db":{"value":"test3"},"user":{"value":"root"}},"query_count":null,"tables":[{"create":"SHOW CREATE TABLE `test3`.`users`\\G","status":"SHOW TABLE STATUS FROM `test3` LIKE 'users'\\G"}],"ts_max":"2007-10-15 21:43:53","ts_min":"2007-10-15 21:43:52"},{"attribute":"fingerprint","checksum":"1087A32FED3B7EBB","distillate":"INSERT articles","example":{"Query_time":"1.001943","query":"INSERT IGNORE INTO articles (id, body,)VALUES(3558268,'sample text')","ts":"2007-10-15 21:43:52"},"fingerprint":"insert ignore into articles (id, body,)values(?+)","histograms":{"Query_time":[0,0,0,0,0,0,1,0]},"metrics":{"Lock_time":{"avg":"0.000145","max":"0.000145","median":"0.000145","min":"0.000145","pct":"0.333333","pct_95":"0.000145","stddev":"0.000000","sum":"0.000145"},"Query_time":{"avg":"1.001943","max":"1.001943","median":"1.001943","min":"1.001943","pct":"0.333333","pct_95":"1.001943","stddev":"0.000000","sum":"1.001943"},"Rows_examined":{"avg":"0","max":"0","median":"0","min":"0","pct":"0","pct_95":"0","stddev":"0","sum":"0"},"Rows_sent":{"avg":"0","max":"0","median":"0","min":"0","pct":"0","pct_95":"0","stddev":"0","sum":"0"},"db":{"value":"test1"},"user":{"value":"root"}},"query_count":null,"tables":[{"create":"SHOW CREATE TABLE `test1`.`articles`\\G","status":"SHOW TABLE STATUS FROM `test1` LIKE 'articles'\\G"}],"ts_max":"2007-10-15 21:43:52","ts_min":"2007-10-15 21:43:52"}],"global":{"files":null,"metrics":{"Lock_time":{"avg":"0.000152","max":"0.000201","median":"0.000145","min":"0.000109","pct_95":"0.000194","stddev":"0.000035","sum":"0.000455"},"Query_time":{"avg":"3.334426","max":"8.000652","median":"0.992137","min":"1.000682","pct_95":"7.700558","stddev":"3.162380","sum":"10.003277"},"Rows_examined":{"avg":"1","max":"2","median":"0","min":"0","pct_95":"1","stddev":"0","sum":"3"},"Rows_sent":{"avg":"0","max":"1","median":"0","min":"0","pct_95":"0","stddev":"0","sum":"2"}},"query_count":3,"unique_query_count":2}} +{"classes":[{"ts_max":"2007-10-15 21:43:53","checksum":"82860EDA9A88FCC5","distillate":"SELECT users","ts_min":"2007-10-15 21:43:52","example":{"ts":"2007-10-15 21:43:52","query":"SELECT id FROM users WHERE name='foo'","Query_time":"8.000652"},"query_count":null,"attribute":"fingerprint","metrics":{"Lock_time":{"avg":"0.000155","sum":"0.000310","median":"0.000155","pct":"0.666667","max":"0.000201","pct_95":"0.000201","min":"0.000109","stddev":"0.000065"},"Rows_examined":{"min":"1","stddev":"0","pct_95":"2","max":"2","median":"1","pct":"0","avg":"1","sum":"3"},"user":{"value":"root"},"Query_time":{"median":"4.500667","pct":"0.666667","avg":"4.500667","sum":"9.001334","min":"1.000682","stddev":"4.949726","pct_95":"8.000652","max":"8.000652"},"Rows_sent":{"pct_95":"1","max":"1","min":"1","stddev":"0","sum":"2","avg":"1","pct":"0","median":"1"},"db":{"value":"test3"}},"tables":[{"create":"SHOW CREATE TABLE `test3`.`users`\\G","status":"SHOW TABLE STATUS FROM `test3` LIKE 'users'\\G"}],"fingerprint":"select id from users where name=?","histograms":{"Query_time":[0,0,0,0,0,0,2,0]}},{"ts_max":"2007-10-15 21:43:52","checksum":"1087A32FED3B7EBB","distillate":"INSERT articles","ts_min":"2007-10-15 21:43:52","example":{"ts":"2007-10-15 21:43:52","query":"INSERT IGNORE INTO articles (id, body,)VALUES(3558268,'sample text')","Query_time":"1.001943"},"query_count":null,"attribute":"fingerprint","metrics":{"db":{"value":"test1"},"Rows_sent":{"min":"0","stddev":"0","pct_95":"0","max":"0","median":"0","pct":"0","avg":"0","sum":"0"},"Query_time":{"min":"1.001943","stddev":"0.000000","pct_95":"1.001943","max":"1.001943","pct":"0.333333","median":"1.001943","sum":"1.001943","avg":"1.001943"},"user":{"value":"root"},"Rows_examined":{"median":"0","pct":"0","avg":"0","sum":"0","min":"0","stddev":"0","pct_95":"0","max":"0"},"Lock_time":{"pct":"0.333333","median":"0.000145","sum":"0.000145","avg":"0.000145","min":"0.000145","stddev":"0.000000","pct_95":"0.000145","max":"0.000145"}},"tables":[{"status":"SHOW TABLE STATUS FROM `test1` LIKE 'articles'\\G","create":"SHOW CREATE TABLE `test1`.`articles`\\G"}],"fingerprint":"insert ignore into articles (id, body,)values(?+)","histograms":{"Query_time":[0,0,0,0,0,0,1,0]}}],"global":{"files":null,"query_count":3,"metrics":{"Query_time":{"min":"1.000682","median":"0.992137","stddev":"3.162380","max":"8.000652","pct_95":"7.700558","sum":"10.003277","avg":"3.334426"},"Rows_sent":{"stddev":"0","median":"0","min":"0","sum":"2","max":"1","pct_95":"0","avg":"0"},"Rows_examined":{"avg":"1","pct_95":"1","max":"2","sum":"3","median":"0","min":"0","stddev":"0"},"Lock_time":{"stddev":"0.000035","min":"0.000109","median":"0.000145","avg":"0.000152","sum":"0.000455","pct_95":"0.000194","max":"0.000201"}},"unique_query_count":2}} diff --git a/t/pt-archiver/basics.t b/t/pt-archiver/basics.t index ebcca2b8..a76ee820 100644 --- a/t/pt-archiver/basics.t +++ b/t/pt-archiver/basics.t @@ -161,7 +161,7 @@ $output = output( my $t = time - $t0; ok( - $t >= 2 && $t <= ($ENV{PERCONA_SLOW_BOX} ? 8 : 3), + $t >= 2 && $t <= ($ENV{PERCONA_SLOW_BOX} ? 8 : 4), "--sleep between SELECT (bug 979092)" ) or diag($output, "t=", $t); diff --git a/util/check-dev-env b/util/check-dev-env index 81a6c22b..9bdf9ee8 100755 --- a/util/check-dev-env +++ b/util/check-dev-env @@ -41,7 +41,7 @@ my $exit_status = 0; my $fmt = "%-23s %8s\n"; # Not a module but we want to know the Perl version. -printf $fmt, "Perl", `perl -v | perl -ne '/v([\\d\\.]+)/ && print \$1'`, ""; +printf $fmt, "Perl", `perl -v | perl -ne '/v([\\d\\.]+)/ && print \$1'`; foreach my $module (@required_modules) { my $version = "NA";