mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-03 02:55:57 +00:00
Compare commits
9 Commits
PT-1959_up
...
pmm-2.26.0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
391c57819b | ||
![]() |
cfaa2087cb | ||
![]() |
678cd3472a | ||
![]() |
7d76913185 | ||
![]() |
33a2108822 | ||
![]() |
9d6508da5f | ||
![]() |
d91ba9cadd | ||
![]() |
b19654fa48 | ||
![]() |
297bf58e32 |
44
Changelog
44
Changelog
@@ -1,9 +1,31 @@
|
||||
Changelog for Percona Toolkit
|
||||
|
||||
* Improvement PT-1974: Support fingerprinting for --print in pt-kill (Thanks Iwo Panowicz)
|
||||
* Fixed bug PT-1966: Fixed test (Thanks @yoku0825)
|
||||
v3.3.2 WIP release date not set yet
|
||||
|
||||
* Improvement PT-1417: Inconsistent creation of toolkit tables
|
||||
* Fixed bug PT-1627: pt-mysql-summary doesn't verify which version of jemalloc is in use
|
||||
* Fixed bug PT-1747: pt-online-schema-change: metadata lock can break database for rebuild_constraints
|
||||
* Improvement PT-1800: PTDEBUG=1 exposes passwords
|
||||
* Fixed bug PT-1900: pt-query-digest not hiding parameter properly sometimes when parameter=binary
|
||||
* Improvement PT-1940: ptsoc dropswap with mysql8: revise rejection (Thanks duxthefux)
|
||||
* Fixed bug PT-1953: pt-summary typo: Memory mamagement.
|
||||
* Fixed bug PT-1959: go part of the toolkit still has the version 3.3.0
|
||||
* Fixed bug PT-1965: pt-stalk --mysql-only doesn't collect mysqladmin outputs (Thanks Sergey Kuzmichev)
|
||||
* Fixed bug PT-1966: Test no_drop_no_swap for the pt-online-schema-change is broken (Thanks Tsubasa Tanaka)
|
||||
* Fixed bug PT-1974: Support fingerprinting for --print in pt-kill
|
||||
* Fixed bug PT-1983: pt-summary missing one DIMM
|
||||
* Admin task PT-2009: Update Go Lang dependencies
|
||||
* Admin task PT-2011: Make build reproducible
|
||||
|
||||
v3.3.1 release 2021-04-28
|
||||
|
||||
* Fixed bug PT-716 : pt-summary reports wrong memory size
|
||||
* Fixed bug PT-1914: Column data lost when 'Generated' is in the column comment
|
||||
* Fixed bug PT-1919: pt-online-schema change drop_swap can lose triggers. (Thanks Bob)
|
||||
* Fixed bug PT-1943: BEFORE triggers are dropped after pt-online-schema-change run
|
||||
|
||||
v3.3.0 release 2021-01-14
|
||||
|
||||
* Improvement PT-1940: Added mysql version check for bug fix introduced in 8.0.14 (Thanks duxthefux)
|
||||
* Fixed bug PT-1919: pt-online-schema change drop_swap can lose triggers. (Thanks Bob)
|
||||
* Fixed bug PT-1914: Column data lost when 'Generated' is in the column comment
|
||||
@@ -12,17 +34,17 @@ Changelog for Percona Toolkit
|
||||
|
||||
v3.3.0 release 2021-01-14
|
||||
|
||||
* Fixed bug PT-1857: pt-heartbeat cannot reconnect.
|
||||
* Fixed bug PT-169 : pt-online-schema-change FKs error handling.
|
||||
* Fixed bug PT-1892: pt-summary says sshd not running
|
||||
* Fixed bug PT-1881: pt-upgrade fails when query including format strings and SQL errors is given (Thanks Nayuta Yanagisawa)
|
||||
* Fixed bug PT-1859: pt-pg-summary fails for Postgres12 (Thanks Sergey Kuzmichev)
|
||||
* Improvement PT-1853: Added --no-check-foreing-keys to pt-osc
|
||||
* Improvement PT-1851: Backslashes missing from documentation
|
||||
* Improvement PT-1836: Review and consider lintian reported issues
|
||||
* Fixed bug PT-1829: pt-heartbeat doesn't reconnect for check-read-only
|
||||
* Fixed bug PT-1822: pt-mongodb-summary fails on standalone mongodb instances
|
||||
* Fixed bug PT-1518: pt-table-checksum gives error CRC32. (Thanks @ovidiustanila)
|
||||
* Fixed bug PT-1822: pt-mongodb-summary fails on standalone mongodb instances
|
||||
* Fixed bug PT-1829: pt-heartbeat doesn't reconnect for check-read-only
|
||||
* Improvement PT-1836: Review and consider lintian reported issues
|
||||
* Improvement PT-1851: Backslashes missing from documentation
|
||||
* Improvement PT-1853: Added --no-check-foreing-keys to pt-osc
|
||||
* Fixed bug PT-1857: pt-heartbeat cannot reconnect.
|
||||
* Fixed bug PT-1859: pt-pg-summary fails for Postgres12 (Thanks Sergey Kuzmichev)
|
||||
* Fixed bug PT-1881: pt-upgrade fails when query including format strings and SQL errors is given (Thanks Nayuta Yanagisawa)
|
||||
* Fixed bug PT-1892: pt-summary says sshd not running
|
||||
|
||||
v3.2.0 release 2020-04-23
|
||||
|
||||
|
@@ -1364,6 +1364,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-align 3.3.1
|
||||
pt-align 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -45,7 +45,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -8661,6 +8661,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-archiver 3.3.1
|
||||
pt-archiver 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -43,7 +43,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -5917,6 +5917,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-config-diff 3.3.1
|
||||
pt-config-diff 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -42,7 +42,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -5710,6 +5710,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-deadlock-logger 3.3.1
|
||||
pt-deadlock-logger 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -38,7 +38,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -5682,6 +5682,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-diskstats 3.3.1
|
||||
pt-diskstats 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -39,7 +39,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -5771,6 +5771,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-duplicate-key-checker 3.3.1
|
||||
pt-duplicate-key-checker 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -1653,6 +1653,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-fifo-split 3.3.1
|
||||
pt-fifo-split 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -35,7 +35,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -5132,6 +5132,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-find 3.3.1
|
||||
pt-find 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -1565,8 +1565,8 @@ $bal = qr/
|
||||
|
||||
my $olc_re = qr/(?:--|#)[^'"\r\n]*(?=[\r\n]|\Z)/; # One-line comments
|
||||
my $mlc_re = qr#/\*[^!].*?\*/#sm; # But not /*!version */
|
||||
my $vlc_re = qr#/\*.*?[0-9+].*?\*/#sm; # For SHOW + /*!version */
|
||||
my $vlc_rf = qr#^(SHOW).*?/\*![0-9+].*?\*/#sm; # Variation for SHOW
|
||||
my $vlc_re = qr#/\*.*?[0-9]+.*?\*/#sm; # For SHOW + /*!version */
|
||||
my $vlc_rf = qr#^(?:SHOW).*?/\*![0-9]+(.*?)\*/#sm; # Variation for SHOW
|
||||
|
||||
|
||||
sub new {
|
||||
@@ -1581,7 +1581,8 @@ sub strip_comments {
|
||||
$query =~ s/$mlc_re//go;
|
||||
$query =~ s/$olc_re//go;
|
||||
if ( $query =~ m/$vlc_rf/i ) { # contains show + version
|
||||
$query =~ s/$vlc_re//go;
|
||||
my $qualifier = $1 || '';
|
||||
$query =~ s/$vlc_re/$qualifier/go;
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
@@ -1652,9 +1653,15 @@ sub fingerprint {
|
||||
$query =~ s/\Ause \S+\Z/use ?/i # Abstract the DB in USE
|
||||
&& return $query;
|
||||
|
||||
$query =~ s/\\["']//g; # quoted strings
|
||||
$query =~ s/".*?"/?/sg; # quoted strings
|
||||
$query =~ s/'.*?'/?/sg; # quoted strings
|
||||
$query =~ s/([^\\])(\\')/$1/sg;
|
||||
$query =~ s/([^\\])(\\")/$1/sg;
|
||||
$query =~ s/\\\\//sg;
|
||||
$query =~ s/\\'//sg;
|
||||
$query =~ s/\\"//sg;
|
||||
$query =~ s/([^\\])(".*?[^\\]?")/$1?/sg;
|
||||
$query =~ s/([^\\])('.*?[^\\]?')/$1?/sg;
|
||||
|
||||
$query =~ s/\bfalse\b|\btrue\b/?/isg; # boolean values
|
||||
|
||||
if ( $self->{match_md5_checksums} ) {
|
||||
$query =~ s/([._-])[a-f0-9]{32}/$1?/g;
|
||||
@@ -1704,6 +1711,13 @@ sub distill_verbs {
|
||||
$query =~ m/\A\s*UNLOCK TABLES/i && return "UNLOCK";
|
||||
$query =~ m/\A\s*xa\s+(\S+)/i && return "XA_$1";
|
||||
|
||||
if ( $query =~ m/\A\s*LOAD/i ) {
|
||||
my ($tbl) = $query =~ m/INTO TABLE\s+(\S+)/i;
|
||||
$tbl ||= '';
|
||||
$tbl =~ s/`//g;
|
||||
return "LOAD DATA $tbl";
|
||||
}
|
||||
|
||||
if ( $query =~ m/\Aadministrator command:/ ) {
|
||||
$query =~ s/administrator command:/ADMIN/;
|
||||
$query = uc $query;
|
||||
@@ -1716,7 +1730,7 @@ sub distill_verbs {
|
||||
PTDEBUG && _d($query);
|
||||
|
||||
$query = uc $query;
|
||||
$query =~ s/\s+(?:GLOBAL|SESSION|FULL|STORAGE|ENGINE)\b/ /g;
|
||||
$query =~ s/\s+(?:SESSION|FULL|STORAGE|ENGINE)\b/ /g;
|
||||
$query =~ s/\s+COUNT[^)]+\)//g;
|
||||
|
||||
$query =~ s/\s+(?:FOR|FROM|LIKE|WHERE|LIMIT|IN)\b.+//ms;
|
||||
@@ -1731,6 +1745,7 @@ sub distill_verbs {
|
||||
eval $QueryParser::tbl_ident;
|
||||
my ( $dds ) = $query =~ /^\s*($QueryParser::data_def_stmts)\b/i;
|
||||
if ( $dds) {
|
||||
$query =~ s/\s+IF(?:\s+NOT)?\s+EXISTS/ /i;
|
||||
my ( $obj ) = $query =~ m/$dds.+(DATABASE|TABLE)\b/i;
|
||||
$obj = uc $obj if $obj;
|
||||
PTDEBUG && _d('Data def statment:', $dds, 'obj:', $obj);
|
||||
@@ -1797,6 +1812,9 @@ sub distill {
|
||||
map { $verbs =~ s/$_/$alias_for{$_}/ } keys %alias_for;
|
||||
$query = $verbs;
|
||||
}
|
||||
elsif ( $verbs && $verbs =~ m/^LOAD DATA/ ) {
|
||||
return $verbs;
|
||||
}
|
||||
else {
|
||||
my @tables = $self->__distill_tables($query, $table, %args);
|
||||
$query = join(q{ }, $verbs, @tables);
|
||||
@@ -2244,6 +2262,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-fingerprint 3.3.1
|
||||
pt-fingerprint 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -37,7 +37,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -4693,6 +4693,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-fk-error-logger 3.3.1
|
||||
pt-fk-error-logger 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -44,7 +44,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -7394,6 +7394,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-heartbeat 3.3.1
|
||||
pt-heartbeat 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -45,7 +45,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -2520,9 +2520,13 @@ sub fingerprint {
|
||||
$query =~ s/\Ause \S+\Z/use ?/i # Abstract the DB in USE
|
||||
&& return $query;
|
||||
|
||||
$query =~ s/\\["']//g; # quoted strings
|
||||
$query =~ s/".*?"/?/sg; # quoted strings
|
||||
$query =~ s/'.*?'/?/sg; # quoted strings
|
||||
$query =~ s/([^\\])(\\')/$1/sg;
|
||||
$query =~ s/([^\\])(\\")/$1/sg;
|
||||
$query =~ s/\\\\//sg;
|
||||
$query =~ s/\\'//sg;
|
||||
$query =~ s/\\"//sg;
|
||||
$query =~ s/([^\\])(".*?[^\\]?")/$1?/sg;
|
||||
$query =~ s/([^\\])('.*?[^\\]?')/$1?/sg;
|
||||
|
||||
$query =~ s/\bfalse\b|\btrue\b/?/isg; # boolean values
|
||||
|
||||
@@ -7701,6 +7705,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-index-usage 3.3.1
|
||||
pt-index-usage 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -1132,7 +1132,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-ioprofile 3.3.1
|
||||
pt-ioprofile 3.3.2
|
||||
|
||||
=cut
|
||||
|
||||
|
14
bin/pt-kill
14
bin/pt-kill
@@ -47,7 +47,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -4911,9 +4911,13 @@ sub fingerprint {
|
||||
$query =~ s/\Ause \S+\Z/use ?/i # Abstract the DB in USE
|
||||
&& return $query;
|
||||
|
||||
$query =~ s/\\["']//g; # quoted strings
|
||||
$query =~ s/".*?"/?/sg; # quoted strings
|
||||
$query =~ s/'.*?'/?/sg; # quoted strings
|
||||
$query =~ s/([^\\])(\\')/$1/sg;
|
||||
$query =~ s/([^\\])(\\")/$1/sg;
|
||||
$query =~ s/\\\\//sg;
|
||||
$query =~ s/\\'//sg;
|
||||
$query =~ s/\\"//sg;
|
||||
$query =~ s/([^\\])(".*?[^\\]?")/$1?/sg;
|
||||
$query =~ s/([^\\])('.*?[^\\]?')/$1?/sg;
|
||||
|
||||
$query =~ s/\bfalse\b|\btrue\b/?/isg; # boolean values
|
||||
|
||||
@@ -8572,6 +8576,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-kill 3.3.1
|
||||
pt-kill 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -809,7 +809,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-mext 3.3.1
|
||||
pt-mext 3.3.2
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -3294,7 +3294,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-mysql-summary 3.3.1
|
||||
pt-mysql-summary 3.3.2
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -56,7 +56,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -13469,6 +13469,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-online-schema-change 3.3.1
|
||||
pt-online-schema-change 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -901,7 +901,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-pmp 3.3.1
|
||||
pt-pmp 3.3.2
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -64,7 +64,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -2945,9 +2945,13 @@ sub fingerprint {
|
||||
$query =~ s/\Ause \S+\Z/use ?/i # Abstract the DB in USE
|
||||
&& return $query;
|
||||
|
||||
$query =~ s/\\["']//g; # quoted strings
|
||||
$query =~ s/".*?"/?/sg; # quoted strings
|
||||
$query =~ s/'.*?'/?/sg; # quoted strings
|
||||
$query =~ s/([^\\])(\\')/$1/sg;
|
||||
$query =~ s/([^\\])(\\")/$1/sg;
|
||||
$query =~ s/\\\\//sg;
|
||||
$query =~ s/\\'//sg;
|
||||
$query =~ s/\\"//sg;
|
||||
$query =~ s/([^\\])(".*?[^\\]?")/$1?/sg;
|
||||
$query =~ s/([^\\])('.*?[^\\]?')/$1?/sg;
|
||||
|
||||
$query =~ s/\bfalse\b|\btrue\b/?/isg; # boolean values
|
||||
|
||||
@@ -16973,6 +16977,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-query-digest 3.3.1
|
||||
pt-query-digest 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -2618,6 +2618,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-show-grants 3.3.1
|
||||
pt-show-grants 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -1250,7 +1250,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-sift 3.3.1
|
||||
pt-sift 3.3.2
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -40,7 +40,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -4993,6 +4993,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-slave-delay 3.3.1
|
||||
pt-slave-delay 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -4528,6 +4528,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-slave-find 3.3.1
|
||||
pt-slave-find 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -41,7 +41,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -6164,6 +6164,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-slave-restart 3.3.1
|
||||
pt-slave-restart 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -2425,7 +2425,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-stalk 3.3.1
|
||||
pt-stalk 3.3.2
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -2729,7 +2729,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-summary 3.3.1
|
||||
pt-summary 3.3.2
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -58,7 +58,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -14188,6 +14188,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-table-checksum 3.3.1
|
||||
pt-table-checksum 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -55,7 +55,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -13089,6 +13089,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-table-sync 3.3.1
|
||||
pt-table-sync 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -2946,9 +2946,13 @@ sub fingerprint {
|
||||
$query =~ s/\Ause \S+\Z/use ?/i # Abstract the DB in USE
|
||||
&& return $query;
|
||||
|
||||
$query =~ s/\\["']//g; # quoted strings
|
||||
$query =~ s/".*?"/?/sg; # quoted strings
|
||||
$query =~ s/'.*?'/?/sg; # quoted strings
|
||||
$query =~ s/([^\\])(\\')/$1/sg;
|
||||
$query =~ s/([^\\])(\\")/$1/sg;
|
||||
$query =~ s/\\\\//sg;
|
||||
$query =~ s/\\'//sg;
|
||||
$query =~ s/\\"//sg;
|
||||
$query =~ s/([^\\])(".*?[^\\]?")/$1?/sg;
|
||||
$query =~ s/([^\\])('.*?[^\\]?')/$1?/sg;
|
||||
|
||||
$query =~ s/\bfalse\b|\btrue\b/?/isg; # boolean values
|
||||
|
||||
@@ -8515,6 +8519,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-table-usage 3.3.1
|
||||
pt-table-usage 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -61,7 +61,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -4818,9 +4818,13 @@ sub fingerprint {
|
||||
$query =~ s/\Ause \S+\Z/use ?/i # Abstract the DB in USE
|
||||
&& return $query;
|
||||
|
||||
$query =~ s/\\["']//g; # quoted strings
|
||||
$query =~ s/".*?"/?/sg; # quoted strings
|
||||
$query =~ s/'.*?'/?/sg; # quoted strings
|
||||
$query =~ s/([^\\])(\\')/$1/sg;
|
||||
$query =~ s/([^\\])(\\")/$1/sg;
|
||||
$query =~ s/\\\\//sg;
|
||||
$query =~ s/\\'//sg;
|
||||
$query =~ s/\\"//sg;
|
||||
$query =~ s/([^\\])(".*?[^\\]?")/$1?/sg;
|
||||
$query =~ s/([^\\])('.*?[^\\]?')/$1?/sg;
|
||||
|
||||
$query =~ s/\bfalse\b|\btrue\b/?/isg; # boolean values
|
||||
|
||||
@@ -11449,6 +11453,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-upgrade 3.3.1
|
||||
pt-upgrade 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -44,7 +44,7 @@ BEGIN {
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
@@ -6262,6 +6262,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-variable-advisor 3.3.1
|
||||
pt-variable-advisor 3.3.2
|
||||
|
||||
=cut
|
||||
|
@@ -3308,6 +3308,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-visual-explain 3.3.1
|
||||
pt-visual-explain 3.3.2
|
||||
|
||||
=cut
|
||||
|
23
go.mod
23
go.mod
@@ -28,11 +28,34 @@ require (
|
||||
|
||||
require (
|
||||
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
|
||||
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/go-ole/go-ole v1.2.4 // indirect
|
||||
github.com/go-stack/stack v1.8.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.1 // indirect
|
||||
github.com/golang/snappy v0.0.2-0.20190904063534-ff6b7dc882cf // indirect
|
||||
github.com/google/gofuzz v1.1.0 // indirect
|
||||
github.com/json-iterator/go v1.1.10 // indirect
|
||||
github.com/klauspost/compress v1.10.10 // indirect
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
|
||||
github.com/xdg-go/scram v1.0.2 // indirect
|
||||
github.com/xdg-go/stringprep v1.0.2 // indirect
|
||||
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da // indirect
|
||||
golang.org/x/text v0.3.6 // indirect
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.62.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.3.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
|
||||
k8s.io/apimachinery v0.18.6 // indirect
|
||||
k8s.io/klog v1.0.0 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0 // indirect
|
||||
)
|
||||
|
@@ -18,7 +18,7 @@
|
||||
# ###########################################################################
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.1';
|
||||
our $VERSION = '3.3.2';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
|
@@ -173,9 +173,17 @@ sub fingerprint {
|
||||
$query =~ s/\Ause \S+\Z/use ?/i # Abstract the DB in USE
|
||||
&& return $query;
|
||||
|
||||
$query =~ s/\\["']//g; # quoted strings
|
||||
$query =~ s/".*?"/?/sg; # quoted strings
|
||||
$query =~ s/'.*?'/?/sg; # quoted strings
|
||||
# -----------------------------------------------------------
|
||||
# Remove quoted strings
|
||||
# -----------------------------------------------------------
|
||||
$query =~ s/([^\\])(\\')/$1/sg;
|
||||
$query =~ s/([^\\])(\\")/$1/sg;
|
||||
$query =~ s/\\\\//sg;
|
||||
$query =~ s/\\'//sg;
|
||||
$query =~ s/\\"//sg;
|
||||
$query =~ s/([^\\])(".*?[^\\]?")/$1?/sg;
|
||||
$query =~ s/([^\\])('.*?[^\\]?')/$1?/sg;
|
||||
# -----------------------------------------------------------
|
||||
|
||||
$query =~ s/\bfalse\b|\btrue\b/?/isg; # boolean values
|
||||
|
||||
@@ -218,8 +226,8 @@ sub fingerprint {
|
||||
$query =~ s/\blimit \?(?:, ?\?| offset \?)?/limit ?/; # LIMIT
|
||||
# The following are disabled because of speed issues. Should we try to
|
||||
# normalize whitespace between and around operators? My gut feeling is no.
|
||||
# $query =~ s/ , | ,|, /,/g; # Normalize commas
|
||||
# $query =~ s/ = | =|= /=/g; # Normalize equals
|
||||
# $query =~ s/ , | ,|, /,/g; # Normalize commas
|
||||
# $query =~ s/ = | =|= /=/g; # Normalize equals
|
||||
# $query =~ s# [,=+*/-] ?|[,=+*/-] #+#g; # Normalize operators
|
||||
|
||||
# Remove ASC keywords from ORDER BY clause so these queries fingerprint
|
||||
|
@@ -3,10 +3,17 @@ help: ## Display this help message.
|
||||
@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | \
|
||||
awk -F ':.*?## ' 'NF==2 {printf " %-26s%s\n", $$1, $$2}'
|
||||
|
||||
DATE_FMT = +%FT%T%z
|
||||
ifdef SOURCE_DATE_EPOCH
|
||||
BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)")
|
||||
else
|
||||
BUILD_DATE ?= $(shell date "$(DATE_FMT)")
|
||||
endif
|
||||
|
||||
GO := go
|
||||
pkgs = $(shell find . -type d -name "pt-*" -exec basename {} \;)
|
||||
VERSION=$(shell git describe --abbrev=0 --tags)
|
||||
BUILD=$(shell date +%FT%T%z)
|
||||
BUILD=$(BUILD_DATE)
|
||||
GOVERSION=$(shell go version | cut --delimiter=" " -f3)
|
||||
COMMIT=$(shell git rev-list -1 HEAD)
|
||||
GOUTILSDIR ?= $(GOPATH)/bin
|
||||
|
@@ -40,7 +40,7 @@ const (
|
||||
var (
|
||||
Build string = "2020-04-23" //nolint
|
||||
GoVersion string = "1.14.1" //nolint
|
||||
Version string = "3.3.1" //nolint
|
||||
Version string = "3.3.2" //nolint
|
||||
Commit string //nolint
|
||||
)
|
||||
|
||||
|
@@ -56,7 +56,7 @@ const (
|
||||
var (
|
||||
Build string = "2020-04-23"
|
||||
GoVersion string = "1.14.1"
|
||||
Version string = "3.3.1"
|
||||
Version string = "3.3.2"
|
||||
Commit string
|
||||
|
||||
defaultConnectionTimeout = 3 * time.Second
|
||||
|
@@ -162,7 +162,7 @@ is(
|
||||
# This is a known deficiency, fixes seem to be expensive though.
|
||||
is(
|
||||
$qr->fingerprint("select '\\\\' from foo"),
|
||||
"select '\\ from foo",
|
||||
"select ? from foo",
|
||||
"Does not handle all quoted strings",
|
||||
);
|
||||
|
||||
@@ -1478,6 +1478,19 @@ is(
|
||||
"Fingerprint db.tbl<number>name (preserve number)"
|
||||
);
|
||||
|
||||
is(
|
||||
$qr->fingerprint(
|
||||
"SELECT i FROM d.t WHERE i=\"3\""
|
||||
),
|
||||
"select i from d.t where i=?",
|
||||
"Fingerprint db.tbl<number>name (preserve number)"
|
||||
);
|
||||
|
||||
is(
|
||||
$qr->fingerprint("CALL foo(1, 2, 3)"),
|
||||
"call foo",
|
||||
'Fingerprints stored procedure calls specially',
|
||||
);
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
|
@@ -259,7 +259,7 @@ SELECT `SCHEMA_NAME` FROM `INFORMATION_SCHEMA`.`SCHEMATA`, (SELECT DB_first_leve
|
||||
# EXPLAIN /*!50100 PARTITIONS*/
|
||||
SELECT USER()\G
|
||||
|
||||
# Query 12: 0 QPS, 0x concurrency, ID 0x75A885FE43F31908754B91A2F3BD1E20 at byte 1082
|
||||
# Query 12: 0 QPS, 0x concurrency, ID 0x15BF4DCE0B364CE831C14D6853A472B7 at byte 1082
|
||||
# This item is included in the report because it matches --limit.
|
||||
# Scores: V/M = 0.00
|
||||
# Time range: all events occurred at 2016-06-07T19:07:02.565999Z
|
||||
@@ -303,4 +303,4 @@ SELECT 1 FROM (SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`COLUM
|
||||
# 9 0xDDABDE67AC3044CAED549F59FFFA541B 0.0000 0.0% 1 0.0000 0.00 SELECT phpmyadmin.pma__navigationhiding
|
||||
# 10 0x35CCC630581DCD5AA46100310F18DEB9 0.0000 0.0% 1 0.0000 0.00 SELECT INFORMATION_SCHEMA.SCHEMATA
|
||||
# 11 0x7B48FAA9C951DD8A389FF9DA2DF3DF62 0.0000 0.0% 1 0.0000 0.00 SELECT
|
||||
# 12 0x75A885FE43F31908754B91A2F3BD1E20 0.0000 0.0% 1 0.0000 0.00 SELECT UNION INFORMATION_SCHEMA.COLUMN_PRIVILEGES INFORMATION_SCHEMA.TABLE_PRIVILEGES INFORMATION_SCHEMA.SCHEMA_PRIVILEGES INFORMATION_SCHEMA.USER_PRIVILEGES
|
||||
# 12 0x15BF4DCE0B364CE831C14D6853A472B7 0.0000 0.0% 1 0.0000 0.00 SELECT UNION INFORMATION_SCHEMA.COLUMN_PRIVILEGES INFORMATION_SCHEMA.TABLE_PRIVILEGES INFORMATION_SCHEMA.SCHEMA_PRIVILEGES INFORMATION_SCHEMA.USER_PRIVILEGES
|
||||
|
@@ -1 +1 @@
|
||||
# Exec time 100 10s 1s 3s 2s 3s 896ms 2s
|
||||
# Exec time 100 9s 2s 4s 3s 4s 786ms 3s
|
Reference in New Issue
Block a user