Merge branch '3.0' into fix-3.0.4

This commit is contained in:
Carlos Salguero
2017-07-12 14:03:10 -03:00
8 changed files with 59 additions and 13 deletions

View File

@@ -12281,7 +12281,7 @@ The default is C<CRC32>. Other good choices include C<MD5> and C<SHA1>. If you
have installed the C<FNV_64> user-defined function, C<pt-table-sync> 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<pt-table-checksum> for more
these are distributed with Percona Server. See L<pt-table-checksum> for more
information and benchmarks.
=item --help

View File

@@ -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

View File

@@ -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

View File

@@ -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
==========================

View File

@@ -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.

View File

@@ -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}}

View File

@@ -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);

View File

@@ -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";