mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-02 10:36:28 +00:00
Compare commits
25 Commits
PMM-8125_m
...
2.1.10
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d2075acd0f | ||
![]() |
a383e28516 | ||
![]() |
bc9d9c4727 | ||
![]() |
2f12ba1ba6 | ||
![]() |
62cbcb3915 | ||
![]() |
b216edff34 | ||
![]() |
a7622e4070 | ||
![]() |
f16d5cf1d3 | ||
![]() |
2ef73f6e50 | ||
![]() |
1ada42ed7a | ||
![]() |
5be6a562f2 | ||
![]() |
deeb191573 | ||
![]() |
a67a78abf8 | ||
![]() |
11a6db752d | ||
![]() |
1a3783a2ed | ||
![]() |
b223a83f8c | ||
![]() |
2726899c6a | ||
![]() |
8d933fd696 | ||
![]() |
fae1c06a44 | ||
![]() |
adc2e8ca80 | ||
![]() |
678f283a5d | ||
![]() |
2ca4dde44f | ||
![]() |
10bd381ede | ||
![]() |
c149109b32 | ||
![]() |
f263cd0706 |
24
Changelog
24
Changelog
@@ -1,5 +1,29 @@
|
||||
Changelog for Percona Toolkit
|
||||
|
||||
v2.1.10 released 2013-07-18
|
||||
|
||||
* Fixed bug 947893: Some tools use @@hostname without /*!50038*/
|
||||
* Fixed bug 1195034: pt-deadlock-logger error: Use of uninitialized value $ts in pattern match (m//)
|
||||
* Fixed bug 1163372: pt-heartbeat --utc --check always returns 0
|
||||
* Fixed bug 1137556: pt-heartbeat docs don't account for --utc
|
||||
* Fixed bug 1146324: pt-query-digest 2.1 typo in docs
|
||||
* Fixed bug 1171968: pt-query-digest docs don't mention --type=rawlog
|
||||
* Fixed bug 1199591: pt-table-checksum doesn't use non-unique index with highest cardinality
|
||||
* Fixed bug 1136559: pt-table-checksum: Deep recursion on subroutine "SchemaIterator::_iterate_dbh"
|
||||
|
||||
v2.1.9 released 2013-02-14
|
||||
|
||||
* Fixed bug 1103221: pt-heartbeat 2.1.8 doesn't use precision/sub-second timestamps
|
||||
* Fixed bug 1099665: pt-heartbeat 2.1.8 reports big time drift with UTC_TIMESTAMP
|
||||
* Fixed bug 1099836: pt-online-schema-change fails with "Duplicate entry" on MariaDB
|
||||
* Fixed bug 1103672: pt-online-schema-change makes bad DELETE trigger if PK is re-created with new columns
|
||||
* Fixed bug 1115333: pt-pmp doesn't list the origin lib for each function
|
||||
* Fixed bug 823411: pt-query-digest shouldn't print "Error: none" for tcpdump
|
||||
* Fixed bug 1103045: pt-query-digest fails to parse non-SQL errors
|
||||
* Fixed bug 1105077: pt-table-checksum: Confusing error message with binlog_format ROW or MIXED on slave
|
||||
* Fixed bug 918056: pt-table-sync false-positive error "Cannot nibble table because MySQL chose no index instead of the PRIMARY index"
|
||||
* Fixed bug 1099933: pt-stalk is too verbose, fills up log
|
||||
|
||||
v2.1.8 released 2012-12-21
|
||||
|
||||
* Beta support for MySQL 5.6
|
||||
|
@@ -2,7 +2,7 @@ use ExtUtils::MakeMaker;
|
||||
|
||||
WriteMakefile(
|
||||
NAME => 'percona-toolkit',
|
||||
VERSION => '2.1.8',
|
||||
VERSION => '2.1.10',
|
||||
EXE_FILES => [ <bin/*> ],
|
||||
MAN1PODS => {
|
||||
'docs/percona-toolkit.pod' => 'blib/man1/percona-toolkit.1p',
|
||||
|
@@ -218,6 +218,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-align 2.1.8
|
||||
pt-align 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -39,7 +39,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -1744,7 +1744,7 @@ sub check_table {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my ($dbh, $db, $tbl) = @args{@required_args};
|
||||
my $q = $self->{Quoter};
|
||||
my $q = $self->{Quoter} || 'Quoter';
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
@@ -7574,6 +7574,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-archiver 2.1.8
|
||||
pt-archiver 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -38,7 +38,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -1536,9 +1536,9 @@ sub set_dbh {
|
||||
|
||||
$dbh->{FetchHashKeyName} = 'NAME_lc' if $self->{NAME_lc};
|
||||
|
||||
my $sql = 'SELECT @@hostname, @@server_id';
|
||||
my $sql = 'SELECT @@server_id /*!50038 , @@hostname*/';
|
||||
PTDEBUG && _d($dbh, $sql);
|
||||
my ($hostname, $server_id) = $dbh->selectrow_array($sql);
|
||||
my ($server_id, $hostname) = $dbh->selectrow_array($sql);
|
||||
PTDEBUG && _d($dbh, 'hostname:', $hostname, $server_id);
|
||||
if ( $hostname ) {
|
||||
$self->{hostname} = $hostname;
|
||||
@@ -4871,6 +4871,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-config-diff 2.1.8
|
||||
pt-config-diff 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -36,7 +36,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -4140,6 +4140,11 @@ sub parse_deadlocks {
|
||||
|
||||
# Extract some miscellaneous data from the deadlock.
|
||||
my ( $ts ) = $dl_text =~ m/^$s$/m;
|
||||
if ( !$ts ) {
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1195034
|
||||
# 130624 17:39:24TOO DEEP OR LONG SEARCH IN THE LOCK TABLE ...
|
||||
($ts) = $dl_text =~ m/^${s}TOO DEEP/m;
|
||||
}
|
||||
my ( $year, $mon, $day, $hour, $min, $sec ) = $ts =~ m/^((?:\d\d)?\d\d)-?(\d\d)-?(\d\d) +(\d+):(\d+):(\d+)$/;
|
||||
if ( length($year) == 2 ) {
|
||||
$year += 2000;
|
||||
@@ -4785,6 +4790,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-deadlock-logger 2.1.8
|
||||
pt-deadlock-logger 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -38,7 +38,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -5570,6 +5570,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-diskstats 2.1.8
|
||||
pt-diskstats 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -39,7 +39,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -394,7 +394,7 @@ sub check_table {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my ($dbh, $db, $tbl) = @args{@required_args};
|
||||
my $q = $self->{Quoter};
|
||||
my $q = $self->{Quoter} || 'Quoter';
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
@@ -3142,58 +3142,63 @@ sub _iterate_dbh {
|
||||
$self->{dbs} = \@dbs;
|
||||
}
|
||||
|
||||
if ( !$self->{db} ) {
|
||||
$self->{db} = shift @{$self->{dbs}};
|
||||
PTDEBUG && _d('Next database:', $self->{db});
|
||||
return unless $self->{db};
|
||||
}
|
||||
|
||||
if ( !defined $self->{tbls} ) {
|
||||
my $sql = 'SHOW /*!50002 FULL*/ TABLES FROM ' . $q->quote($self->{db});
|
||||
PTDEBUG && _d($sql);
|
||||
my @tbls = map {
|
||||
$_->[0]; # (tbl, type)
|
||||
DATABASE:
|
||||
while ( $self->{db} || defined(my $db = shift @{$self->{dbs}}) ) {
|
||||
if ( !$self->{db} ) {
|
||||
PTDEBUG && _d('Next database:', $db);
|
||||
$self->{db} = $db;
|
||||
}
|
||||
grep {
|
||||
my ($tbl, $type) = @$_;
|
||||
(!$type || ($type ne 'VIEW'))
|
||||
&& $self->_resume_from_table($tbl)
|
||||
&& $self->table_is_allowed($self->{db}, $tbl);
|
||||
}
|
||||
@{$dbh->selectall_arrayref($sql)};
|
||||
PTDEBUG && _d('Found', scalar @tbls, 'tables in database', $self->{db});
|
||||
$self->{tbls} = \@tbls;
|
||||
}
|
||||
|
||||
while ( my $tbl = shift @{$self->{tbls}} ) {
|
||||
my $ddl = eval { $tp->get_create_table($dbh, $self->{db}, $tbl) };
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
my $table_name = "$self->{db}.$tbl";
|
||||
if ( $e =~ /\QTable '$table_name' doesn't exist/ ) {
|
||||
PTDEBUG && _d("Skipping $table_name because it no longer exists");
|
||||
if ( !$self->{tbls} ) {
|
||||
my $sql = 'SHOW /*!50002 FULL*/ TABLES FROM ' . $q->quote($self->{db});
|
||||
PTDEBUG && _d($sql);
|
||||
my @tbls = map {
|
||||
$_->[0]; # (tbl, type)
|
||||
}
|
||||
else {
|
||||
warn "Skipping $table_name because SHOW CREATE TABLE failed: $e";
|
||||
grep {
|
||||
my ($tbl, $type) = @$_;
|
||||
(!$type || ($type ne 'VIEW'))
|
||||
&& $self->_resume_from_table($tbl)
|
||||
&& $self->table_is_allowed($self->{db}, $tbl);
|
||||
}
|
||||
next;
|
||||
@{$dbh->selectall_arrayref($sql)};
|
||||
PTDEBUG && _d('Found', scalar @tbls, 'tables in database',$self->{db});
|
||||
$self->{tbls} = \@tbls;
|
||||
}
|
||||
my $tbl_struct = $tp->parse($ddl);
|
||||
if ( $self->engine_is_allowed($tbl_struct->{engine}) ) {
|
||||
return {
|
||||
db => $self->{db},
|
||||
tbl => $tbl,
|
||||
name => $q->quote($self->{db}, $tbl),
|
||||
ddl => $ddl,
|
||||
tbl_struct => $tbl_struct,
|
||||
};
|
||||
|
||||
TABLE:
|
||||
while ( my $tbl = shift @{$self->{tbls}} ) {
|
||||
my $ddl = eval { $tp->get_create_table($dbh, $self->{db}, $tbl) };
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
my $table_name = "$self->{db}.$tbl";
|
||||
if ( $e =~ /\QTable '$table_name' doesn't exist/ ) {
|
||||
PTDEBUG && _d("$table_name no longer exists");
|
||||
}
|
||||
else {
|
||||
warn "Skipping $table_name because SHOW CREATE TABLE failed: $e";
|
||||
}
|
||||
next TABLE;
|
||||
}
|
||||
|
||||
my $tbl_struct = $tp->parse($ddl);
|
||||
if ( $self->engine_is_allowed($tbl_struct->{engine}) ) {
|
||||
return {
|
||||
db => $self->{db},
|
||||
tbl => $tbl,
|
||||
name => $q->quote($self->{db}, $tbl),
|
||||
ddl => $ddl,
|
||||
tbl_struct => $tbl_struct,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PTDEBUG && _d('No more tables in database', $self->{db});
|
||||
$self->{db} = undef;
|
||||
$self->{tbls} = undef;
|
||||
PTDEBUG && _d('No more tables in database', $self->{db});
|
||||
$self->{db} = undef;
|
||||
$self->{tbls} = undef;
|
||||
} # DATABASE
|
||||
|
||||
return $self->_iterate_dbh();
|
||||
PTDEBUG && _d('No more databases');
|
||||
return;
|
||||
}
|
||||
|
||||
sub database_is_allowed {
|
||||
@@ -5435,6 +5440,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-duplicate-key-checker 2.1.8
|
||||
pt-duplicate-key-checker 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -1568,6 +1568,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-fifo-split 2.1.8
|
||||
pt-fifo-split 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -35,7 +35,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -1792,7 +1792,7 @@ sub check_table {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my ($dbh, $db, $tbl) = @args{@required_args};
|
||||
my $q = $self->{Quoter};
|
||||
my $q = $self->{Quoter} || 'Quoter';
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
@@ -4898,6 +4898,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-find 2.1.8
|
||||
pt-find 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -2129,7 +2129,7 @@ L<http://www.percona.com/software/> for more software developed by Percona.
|
||||
|
||||
=head1 COPYRIGHT, LICENSE, AND WARRANTY
|
||||
|
||||
This program is copyright 2011-2012 Percona Ireland Ltd.
|
||||
This program is copyright 2011-2013 Percona Ireland Ltd.
|
||||
|
||||
THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
@@ -2147,6 +2147,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-fingerprint 2.1.8
|
||||
pt-fingerprint 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -35,7 +35,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -4011,7 +4011,7 @@ L<http://www.percona.com/software/> for more software developed by Percona.
|
||||
|
||||
=head1 COPYRIGHT, LICENSE, AND WARRANTY
|
||||
|
||||
This program is copyright 2011-2012 Percona Ireland Ltd.
|
||||
This program is copyright 2011-2013 Percona Ireland Ltd.
|
||||
|
||||
THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
@@ -4029,6 +4029,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-fk-error-logger 2.1.8
|
||||
pt-fk-error-logger 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -38,7 +38,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -2731,7 +2731,7 @@ sub check_table {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my ($dbh, $db, $tbl) = @args{@required_args};
|
||||
my $q = $self->{Quoter};
|
||||
my $q = $self->{Quoter} || 'Quoter';
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
@@ -5071,6 +5071,14 @@ sub main {
|
||||
$sth->finish();
|
||||
return ($delay, $hostname, $pk_val);
|
||||
};
|
||||
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1163372
|
||||
# "pt-heartbeat --utc --check always returns 0"
|
||||
if ( $utc ) {
|
||||
my $sql = "SET time_zone='+0:00'";
|
||||
PTDEBUG && _d($sql);
|
||||
$dbh->do($sql);
|
||||
}
|
||||
}
|
||||
|
||||
# Do a little check just to make sure the table is there, so there's one last
|
||||
@@ -5568,6 +5576,10 @@ be created with the following MAGIC_create_heartbeat table definition:
|
||||
The heartbeat table requires at least one row. If you manually create the
|
||||
heartbeat table, then you must insert a row by doing:
|
||||
|
||||
INSERT INTO heartbeat (ts, server_id) VALUES (NOW(), N);
|
||||
|
||||
or if using L<"--utc">:
|
||||
|
||||
INSERT INTO heartbeat (ts, server_id) VALUES (UTC_TIMESTAMP(), N);
|
||||
|
||||
where C<N> is the server's ID; do not use @@server_id because it will replicate
|
||||
@@ -5586,6 +5598,10 @@ Legacy tables do not support L<"--update"> instances on each slave
|
||||
of a multi-slave hierarchy like "master -> slave1 -> slave2".
|
||||
To manually insert the one required row into a legacy table:
|
||||
|
||||
INSERT INTO heartbeat (id, ts) VALUES (1, NOW());
|
||||
|
||||
or if using L<"--utc">:
|
||||
|
||||
INSERT INTO heartbeat (id, ts) VALUES (1, UTC_TIMESTAMP());
|
||||
|
||||
The tool automatically detects if the heartbeat table is legacy.
|
||||
@@ -5871,9 +5887,14 @@ Ignore system time zones and use only UTC. By default pt-heartbeat does
|
||||
not check or adjust for different system or MySQL time zones which can
|
||||
cause the tool to compute the lag incorrectly. Specifying this option is
|
||||
a good idea because it ensures that the tool works correctly regardless of
|
||||
time zones, but it also makes the tool backwards-incompatible with
|
||||
pt-heartbeat 2.1.7 and older (unless the older version of pt-heartbeat
|
||||
is running on a system that uses UTC).
|
||||
time zones.
|
||||
|
||||
If used, this option must be used for all pt-heartbeat instances:
|
||||
L<"--update">, L<"--monitor">, L<"--check">, etc. You should probably
|
||||
set the option in a L<"--config"> file. Mixing this option with pt-heartbeat
|
||||
instances not using this option will cause false-positive lag readings
|
||||
due to different time zones (unless all your systems are set to use UTC,
|
||||
in which case this option isn't required).
|
||||
|
||||
=item --version
|
||||
|
||||
@@ -6059,6 +6080,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-heartbeat 2.1.8
|
||||
pt-heartbeat 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -45,7 +45,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -3001,7 +3001,7 @@ sub check_table {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my ($dbh, $db, $tbl) = @args{@required_args};
|
||||
my $q = $self->{Quoter};
|
||||
my $q = $self->{Quoter} || 'Quoter';
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
@@ -3974,58 +3974,63 @@ sub _iterate_dbh {
|
||||
$self->{dbs} = \@dbs;
|
||||
}
|
||||
|
||||
if ( !$self->{db} ) {
|
||||
$self->{db} = shift @{$self->{dbs}};
|
||||
PTDEBUG && _d('Next database:', $self->{db});
|
||||
return unless $self->{db};
|
||||
}
|
||||
|
||||
if ( !defined $self->{tbls} ) {
|
||||
my $sql = 'SHOW /*!50002 FULL*/ TABLES FROM ' . $q->quote($self->{db});
|
||||
PTDEBUG && _d($sql);
|
||||
my @tbls = map {
|
||||
$_->[0]; # (tbl, type)
|
||||
DATABASE:
|
||||
while ( $self->{db} || defined(my $db = shift @{$self->{dbs}}) ) {
|
||||
if ( !$self->{db} ) {
|
||||
PTDEBUG && _d('Next database:', $db);
|
||||
$self->{db} = $db;
|
||||
}
|
||||
grep {
|
||||
my ($tbl, $type) = @$_;
|
||||
(!$type || ($type ne 'VIEW'))
|
||||
&& $self->_resume_from_table($tbl)
|
||||
&& $self->table_is_allowed($self->{db}, $tbl);
|
||||
}
|
||||
@{$dbh->selectall_arrayref($sql)};
|
||||
PTDEBUG && _d('Found', scalar @tbls, 'tables in database', $self->{db});
|
||||
$self->{tbls} = \@tbls;
|
||||
}
|
||||
|
||||
while ( my $tbl = shift @{$self->{tbls}} ) {
|
||||
my $ddl = eval { $tp->get_create_table($dbh, $self->{db}, $tbl) };
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
my $table_name = "$self->{db}.$tbl";
|
||||
if ( $e =~ /\QTable '$table_name' doesn't exist/ ) {
|
||||
PTDEBUG && _d("Skipping $table_name because it no longer exists");
|
||||
if ( !$self->{tbls} ) {
|
||||
my $sql = 'SHOW /*!50002 FULL*/ TABLES FROM ' . $q->quote($self->{db});
|
||||
PTDEBUG && _d($sql);
|
||||
my @tbls = map {
|
||||
$_->[0]; # (tbl, type)
|
||||
}
|
||||
else {
|
||||
warn "Skipping $table_name because SHOW CREATE TABLE failed: $e";
|
||||
grep {
|
||||
my ($tbl, $type) = @$_;
|
||||
(!$type || ($type ne 'VIEW'))
|
||||
&& $self->_resume_from_table($tbl)
|
||||
&& $self->table_is_allowed($self->{db}, $tbl);
|
||||
}
|
||||
next;
|
||||
@{$dbh->selectall_arrayref($sql)};
|
||||
PTDEBUG && _d('Found', scalar @tbls, 'tables in database',$self->{db});
|
||||
$self->{tbls} = \@tbls;
|
||||
}
|
||||
my $tbl_struct = $tp->parse($ddl);
|
||||
if ( $self->engine_is_allowed($tbl_struct->{engine}) ) {
|
||||
return {
|
||||
db => $self->{db},
|
||||
tbl => $tbl,
|
||||
name => $q->quote($self->{db}, $tbl),
|
||||
ddl => $ddl,
|
||||
tbl_struct => $tbl_struct,
|
||||
};
|
||||
|
||||
TABLE:
|
||||
while ( my $tbl = shift @{$self->{tbls}} ) {
|
||||
my $ddl = eval { $tp->get_create_table($dbh, $self->{db}, $tbl) };
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
my $table_name = "$self->{db}.$tbl";
|
||||
if ( $e =~ /\QTable '$table_name' doesn't exist/ ) {
|
||||
PTDEBUG && _d("$table_name no longer exists");
|
||||
}
|
||||
else {
|
||||
warn "Skipping $table_name because SHOW CREATE TABLE failed: $e";
|
||||
}
|
||||
next TABLE;
|
||||
}
|
||||
|
||||
my $tbl_struct = $tp->parse($ddl);
|
||||
if ( $self->engine_is_allowed($tbl_struct->{engine}) ) {
|
||||
return {
|
||||
db => $self->{db},
|
||||
tbl => $tbl,
|
||||
name => $q->quote($self->{db}, $tbl),
|
||||
ddl => $ddl,
|
||||
tbl_struct => $tbl_struct,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PTDEBUG && _d('No more tables in database', $self->{db});
|
||||
$self->{db} = undef;
|
||||
$self->{tbls} = undef;
|
||||
PTDEBUG && _d('No more tables in database', $self->{db});
|
||||
$self->{db} = undef;
|
||||
$self->{tbls} = undef;
|
||||
} # DATABASE
|
||||
|
||||
return $self->_iterate_dbh();
|
||||
PTDEBUG && _d('No more databases');
|
||||
return;
|
||||
}
|
||||
|
||||
sub database_is_allowed {
|
||||
@@ -7483,6 +7488,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-index-usage 2.1.8
|
||||
pt-index-usage 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -1112,7 +1112,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-ioprofile 2.1.8
|
||||
pt-ioprofile 2.1.10
|
||||
|
||||
=cut
|
||||
|
||||
|
10
bin/pt-kill
10
bin/pt-kill
@@ -43,7 +43,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -2678,7 +2678,7 @@ sub check_table {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my ($dbh, $db, $tbl) = @args{@required_args};
|
||||
my $q = $self->{Quoter};
|
||||
my $q = $self->{Quoter} || 'Quoter';
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
@@ -4792,9 +4792,9 @@ sub set_dbh {
|
||||
|
||||
$dbh->{FetchHashKeyName} = 'NAME_lc' if $self->{NAME_lc};
|
||||
|
||||
my $sql = 'SELECT @@hostname, @@server_id';
|
||||
my $sql = 'SELECT @@server_id /*!50038 , @@hostname*/';
|
||||
PTDEBUG && _d($dbh, $sql);
|
||||
my ($hostname, $server_id) = $dbh->selectrow_array($sql);
|
||||
my ($server_id, $hostname) = $dbh->selectrow_array($sql);
|
||||
PTDEBUG && _d($dbh, 'hostname:', $hostname, $server_id);
|
||||
if ( $hostname ) {
|
||||
$self->{hostname} = $hostname;
|
||||
@@ -7789,6 +7789,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-kill 2.1.8
|
||||
pt-kill 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -3673,6 +3673,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-log-player 2.1.8
|
||||
pt-log-player 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -282,7 +282,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-mext 2.1.8
|
||||
pt-mext 2.1.10
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -3011,7 +3011,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-mysql-summary 2.1.8
|
||||
pt-mysql-summary 2.1.10
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -51,7 +51,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -3774,9 +3774,9 @@ sub set_dbh {
|
||||
|
||||
$dbh->{FetchHashKeyName} = 'NAME_lc' if $self->{NAME_lc};
|
||||
|
||||
my $sql = 'SELECT @@hostname, @@server_id';
|
||||
my $sql = 'SELECT @@server_id /*!50038 , @@hostname*/';
|
||||
PTDEBUG && _d($dbh, $sql);
|
||||
my ($hostname, $server_id) = $dbh->selectrow_array($sql);
|
||||
my ($server_id, $hostname) = $dbh->selectrow_array($sql);
|
||||
PTDEBUG && _d($dbh, 'hostname:', $hostname, $server_id);
|
||||
if ( $hostname ) {
|
||||
$self->{hostname} = $hostname;
|
||||
@@ -5429,7 +5429,7 @@ sub _find_best_index {
|
||||
}
|
||||
@possible_indexes = sort {
|
||||
my $cmp
|
||||
= $indexes->{$b}->{cardinality} <=> $indexes->{$b}->{cardinality};
|
||||
= $indexes->{$b}->{cardinality} <=> $indexes->{$a}->{cardinality};
|
||||
if ( $cmp == 0 ) {
|
||||
$cmp = scalar @{$indexes->{$b}->{cols}}
|
||||
<=> scalar @{$indexes->{$a}->{cols}};
|
||||
@@ -10945,6 +10945,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-online-schema-change 2.1.8
|
||||
pt-online-schema-change 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -404,7 +404,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-pmp 2.1.8
|
||||
pt-pmp 2.1.10
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -46,7 +46,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -5520,7 +5520,7 @@ sub check_table {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my ($dbh, $db, $tbl) = @args{@required_args};
|
||||
my $q = $self->{Quoter};
|
||||
my $q = $self->{Quoter} || 'Quoter';
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
@@ -8727,6 +8727,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-query-advisor 2.1.8
|
||||
pt-query-advisor 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -64,7 +64,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -8351,7 +8351,7 @@ sub check_table {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my ($dbh, $db, $tbl) = @args{@required_args};
|
||||
my $q = $self->{Quoter};
|
||||
my $q = $self->{Quoter} || 'Quoter';
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
@@ -15221,7 +15221,7 @@ pt-query-digest - Analyze query execution logs and generate a query report, filt
|
||||
Usage: pt-query-digest [OPTION...] [FILE]
|
||||
|
||||
pt-query-digest parses and analyzes MySQL log files. With no FILE, or when
|
||||
FILE is -, it read standard input.
|
||||
FILE is -, it reads standard input.
|
||||
|
||||
Analyze, aggregate, and report on a slow query log:
|
||||
|
||||
@@ -17001,6 +17001,23 @@ instead of MySQL packets. For example:
|
||||
|
||||
memcached uses port 11211 by default.
|
||||
|
||||
=item rawlog
|
||||
|
||||
Raw logs are not MySQL logs but simple text files with one SQL statement
|
||||
per line, like:
|
||||
|
||||
SELECT c FROM t WHERE id=1
|
||||
/* Hello, world! */ SELECT * FROM t2 LIMIT 1
|
||||
INSERT INTO t (a, b) VALUES ('foo', 'bar')
|
||||
INSERT INTO t SELECT * FROM monkeys
|
||||
|
||||
Since raw logs do not have any metrics, many options and features of
|
||||
pt-query-digest do not work with them.
|
||||
|
||||
One use case for raw logs is ranking queries by count when the only
|
||||
information available is a list of queries, from polling C<SHOW PROCESSLIST>
|
||||
for example.
|
||||
|
||||
=back
|
||||
|
||||
=item --until
|
||||
@@ -17454,6 +17471,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-query-digest 2.1.8
|
||||
pt-query-digest 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -2304,6 +2304,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-show-grants 2.1.8
|
||||
pt-show-grants 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -781,7 +781,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-sift 2.1.8
|
||||
pt-sift 2.1.10
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -36,7 +36,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -4600,6 +4600,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-slave-delay 2.1.8
|
||||
pt-slave-delay 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -4025,6 +4025,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-slave-find 2.1.8
|
||||
pt-slave-find 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -37,7 +37,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -5519,6 +5519,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-slave-restart 2.1.8
|
||||
pt-slave-restart 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -2023,7 +2023,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-stalk 2.1.8
|
||||
pt-stalk 2.1.10
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -2682,7 +2682,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-summary 2.1.8
|
||||
pt-summary 2.1.10
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -53,7 +53,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -3308,9 +3308,9 @@ sub set_dbh {
|
||||
|
||||
$dbh->{FetchHashKeyName} = 'NAME_lc' if $self->{NAME_lc};
|
||||
|
||||
my $sql = 'SELECT @@hostname, @@server_id';
|
||||
my $sql = 'SELECT @@server_id /*!50038 , @@hostname*/';
|
||||
PTDEBUG && _d($dbh, $sql);
|
||||
my ($hostname, $server_id) = $dbh->selectrow_array($sql);
|
||||
my ($server_id, $hostname) = $dbh->selectrow_array($sql);
|
||||
PTDEBUG && _d($dbh, 'hostname:', $hostname, $server_id);
|
||||
if ( $hostname ) {
|
||||
$self->{hostname} = $hostname;
|
||||
@@ -3984,7 +3984,7 @@ sub check_table {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my ($dbh, $db, $tbl) = @args{@required_args};
|
||||
my $q = $self->{Quoter};
|
||||
my $q = $self->{Quoter} || 'Quoter';
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
@@ -6018,7 +6018,7 @@ sub _find_best_index {
|
||||
}
|
||||
@possible_indexes = sort {
|
||||
my $cmp
|
||||
= $indexes->{$b}->{cardinality} <=> $indexes->{$b}->{cardinality};
|
||||
= $indexes->{$b}->{cardinality} <=> $indexes->{$a}->{cardinality};
|
||||
if ( $cmp == 0 ) {
|
||||
$cmp = scalar @{$indexes->{$b}->{cols}}
|
||||
<=> scalar @{$indexes->{$a}->{cols}};
|
||||
@@ -6883,58 +6883,63 @@ sub _iterate_dbh {
|
||||
$self->{dbs} = \@dbs;
|
||||
}
|
||||
|
||||
if ( !$self->{db} ) {
|
||||
$self->{db} = shift @{$self->{dbs}};
|
||||
PTDEBUG && _d('Next database:', $self->{db});
|
||||
return unless $self->{db};
|
||||
}
|
||||
|
||||
if ( !defined $self->{tbls} ) {
|
||||
my $sql = 'SHOW /*!50002 FULL*/ TABLES FROM ' . $q->quote($self->{db});
|
||||
PTDEBUG && _d($sql);
|
||||
my @tbls = map {
|
||||
$_->[0]; # (tbl, type)
|
||||
DATABASE:
|
||||
while ( $self->{db} || defined(my $db = shift @{$self->{dbs}}) ) {
|
||||
if ( !$self->{db} ) {
|
||||
PTDEBUG && _d('Next database:', $db);
|
||||
$self->{db} = $db;
|
||||
}
|
||||
grep {
|
||||
my ($tbl, $type) = @$_;
|
||||
(!$type || ($type ne 'VIEW'))
|
||||
&& $self->_resume_from_table($tbl)
|
||||
&& $self->table_is_allowed($self->{db}, $tbl);
|
||||
}
|
||||
@{$dbh->selectall_arrayref($sql)};
|
||||
PTDEBUG && _d('Found', scalar @tbls, 'tables in database', $self->{db});
|
||||
$self->{tbls} = \@tbls;
|
||||
}
|
||||
|
||||
while ( my $tbl = shift @{$self->{tbls}} ) {
|
||||
my $ddl = eval { $tp->get_create_table($dbh, $self->{db}, $tbl) };
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
my $table_name = "$self->{db}.$tbl";
|
||||
if ( $e =~ /\QTable '$table_name' doesn't exist/ ) {
|
||||
PTDEBUG && _d("Skipping $table_name because it no longer exists");
|
||||
if ( !$self->{tbls} ) {
|
||||
my $sql = 'SHOW /*!50002 FULL*/ TABLES FROM ' . $q->quote($self->{db});
|
||||
PTDEBUG && _d($sql);
|
||||
my @tbls = map {
|
||||
$_->[0]; # (tbl, type)
|
||||
}
|
||||
else {
|
||||
warn "Skipping $table_name because SHOW CREATE TABLE failed: $e";
|
||||
grep {
|
||||
my ($tbl, $type) = @$_;
|
||||
(!$type || ($type ne 'VIEW'))
|
||||
&& $self->_resume_from_table($tbl)
|
||||
&& $self->table_is_allowed($self->{db}, $tbl);
|
||||
}
|
||||
next;
|
||||
@{$dbh->selectall_arrayref($sql)};
|
||||
PTDEBUG && _d('Found', scalar @tbls, 'tables in database',$self->{db});
|
||||
$self->{tbls} = \@tbls;
|
||||
}
|
||||
my $tbl_struct = $tp->parse($ddl);
|
||||
if ( $self->engine_is_allowed($tbl_struct->{engine}) ) {
|
||||
return {
|
||||
db => $self->{db},
|
||||
tbl => $tbl,
|
||||
name => $q->quote($self->{db}, $tbl),
|
||||
ddl => $ddl,
|
||||
tbl_struct => $tbl_struct,
|
||||
};
|
||||
|
||||
TABLE:
|
||||
while ( my $tbl = shift @{$self->{tbls}} ) {
|
||||
my $ddl = eval { $tp->get_create_table($dbh, $self->{db}, $tbl) };
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
my $table_name = "$self->{db}.$tbl";
|
||||
if ( $e =~ /\QTable '$table_name' doesn't exist/ ) {
|
||||
PTDEBUG && _d("$table_name no longer exists");
|
||||
}
|
||||
else {
|
||||
warn "Skipping $table_name because SHOW CREATE TABLE failed: $e";
|
||||
}
|
||||
next TABLE;
|
||||
}
|
||||
|
||||
my $tbl_struct = $tp->parse($ddl);
|
||||
if ( $self->engine_is_allowed($tbl_struct->{engine}) ) {
|
||||
return {
|
||||
db => $self->{db},
|
||||
tbl => $tbl,
|
||||
name => $q->quote($self->{db}, $tbl),
|
||||
ddl => $ddl,
|
||||
tbl_struct => $tbl_struct,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PTDEBUG && _d('No more tables in database', $self->{db});
|
||||
$self->{db} = undef;
|
||||
$self->{tbls} = undef;
|
||||
PTDEBUG && _d('No more tables in database', $self->{db});
|
||||
$self->{db} = undef;
|
||||
$self->{tbls} = undef;
|
||||
} # DATABASE
|
||||
|
||||
return $self->_iterate_dbh();
|
||||
PTDEBUG && _d('No more databases');
|
||||
return;
|
||||
}
|
||||
|
||||
sub database_is_allowed {
|
||||
@@ -11958,6 +11963,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-table-checksum 2.1.8
|
||||
pt-table-checksum 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -52,7 +52,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -7637,58 +7637,63 @@ sub _iterate_dbh {
|
||||
$self->{dbs} = \@dbs;
|
||||
}
|
||||
|
||||
if ( !$self->{db} ) {
|
||||
$self->{db} = shift @{$self->{dbs}};
|
||||
PTDEBUG && _d('Next database:', $self->{db});
|
||||
return unless $self->{db};
|
||||
}
|
||||
|
||||
if ( !defined $self->{tbls} ) {
|
||||
my $sql = 'SHOW /*!50002 FULL*/ TABLES FROM ' . $q->quote($self->{db});
|
||||
PTDEBUG && _d($sql);
|
||||
my @tbls = map {
|
||||
$_->[0]; # (tbl, type)
|
||||
DATABASE:
|
||||
while ( $self->{db} || defined(my $db = shift @{$self->{dbs}}) ) {
|
||||
if ( !$self->{db} ) {
|
||||
PTDEBUG && _d('Next database:', $db);
|
||||
$self->{db} = $db;
|
||||
}
|
||||
grep {
|
||||
my ($tbl, $type) = @$_;
|
||||
(!$type || ($type ne 'VIEW'))
|
||||
&& $self->_resume_from_table($tbl)
|
||||
&& $self->table_is_allowed($self->{db}, $tbl);
|
||||
}
|
||||
@{$dbh->selectall_arrayref($sql)};
|
||||
PTDEBUG && _d('Found', scalar @tbls, 'tables in database', $self->{db});
|
||||
$self->{tbls} = \@tbls;
|
||||
}
|
||||
|
||||
while ( my $tbl = shift @{$self->{tbls}} ) {
|
||||
my $ddl = eval { $tp->get_create_table($dbh, $self->{db}, $tbl) };
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
my $table_name = "$self->{db}.$tbl";
|
||||
if ( $e =~ /\QTable '$table_name' doesn't exist/ ) {
|
||||
PTDEBUG && _d("Skipping $table_name because it no longer exists");
|
||||
if ( !$self->{tbls} ) {
|
||||
my $sql = 'SHOW /*!50002 FULL*/ TABLES FROM ' . $q->quote($self->{db});
|
||||
PTDEBUG && _d($sql);
|
||||
my @tbls = map {
|
||||
$_->[0]; # (tbl, type)
|
||||
}
|
||||
else {
|
||||
warn "Skipping $table_name because SHOW CREATE TABLE failed: $e";
|
||||
grep {
|
||||
my ($tbl, $type) = @$_;
|
||||
(!$type || ($type ne 'VIEW'))
|
||||
&& $self->_resume_from_table($tbl)
|
||||
&& $self->table_is_allowed($self->{db}, $tbl);
|
||||
}
|
||||
next;
|
||||
@{$dbh->selectall_arrayref($sql)};
|
||||
PTDEBUG && _d('Found', scalar @tbls, 'tables in database',$self->{db});
|
||||
$self->{tbls} = \@tbls;
|
||||
}
|
||||
my $tbl_struct = $tp->parse($ddl);
|
||||
if ( $self->engine_is_allowed($tbl_struct->{engine}) ) {
|
||||
return {
|
||||
db => $self->{db},
|
||||
tbl => $tbl,
|
||||
name => $q->quote($self->{db}, $tbl),
|
||||
ddl => $ddl,
|
||||
tbl_struct => $tbl_struct,
|
||||
};
|
||||
|
||||
TABLE:
|
||||
while ( my $tbl = shift @{$self->{tbls}} ) {
|
||||
my $ddl = eval { $tp->get_create_table($dbh, $self->{db}, $tbl) };
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
my $table_name = "$self->{db}.$tbl";
|
||||
if ( $e =~ /\QTable '$table_name' doesn't exist/ ) {
|
||||
PTDEBUG && _d("$table_name no longer exists");
|
||||
}
|
||||
else {
|
||||
warn "Skipping $table_name because SHOW CREATE TABLE failed: $e";
|
||||
}
|
||||
next TABLE;
|
||||
}
|
||||
|
||||
my $tbl_struct = $tp->parse($ddl);
|
||||
if ( $self->engine_is_allowed($tbl_struct->{engine}) ) {
|
||||
return {
|
||||
db => $self->{db},
|
||||
tbl => $tbl,
|
||||
name => $q->quote($self->{db}, $tbl),
|
||||
ddl => $ddl,
|
||||
tbl_struct => $tbl_struct,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PTDEBUG && _d('No more tables in database', $self->{db});
|
||||
$self->{db} = undef;
|
||||
$self->{tbls} = undef;
|
||||
PTDEBUG && _d('No more tables in database', $self->{db});
|
||||
$self->{db} = undef;
|
||||
$self->{tbls} = undef;
|
||||
} # DATABASE
|
||||
|
||||
return $self->_iterate_dbh();
|
||||
PTDEBUG && _d('No more databases');
|
||||
return;
|
||||
}
|
||||
|
||||
sub database_is_allowed {
|
||||
@@ -12648,6 +12653,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-table-sync 2.1.8
|
||||
pt-table-sync 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -7383,6 +7383,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-table-usage 2.1.8
|
||||
pt-table-usage 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -2532,6 +2532,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-tcp-model 2.1.8
|
||||
pt-tcp-model 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -2233,6 +2233,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-trend 2.1.8
|
||||
pt-trend 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -58,7 +58,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -664,7 +664,7 @@ sub check_table {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my ($dbh, $db, $tbl) = @args{@required_args};
|
||||
my $q = $self->{Quoter};
|
||||
my $q = $self->{Quoter} || 'Quoter';
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
@@ -13171,6 +13171,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-upgrade 2.1.8
|
||||
pt-upgrade 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -40,7 +40,7 @@ BEGIN {
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
@@ -5869,6 +5869,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-variable-advisor 2.1.8
|
||||
pt-variable-advisor 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -3143,6 +3143,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-visual-explain 2.1.8
|
||||
pt-visual-explain 2.1.10
|
||||
|
||||
=cut
|
||||
|
@@ -1,3 +1,31 @@
|
||||
percona-toolkit (2.1.10) unstable; urgency=low
|
||||
|
||||
* Fixed bug 947893: Some tools use @@hostname without /*!50038*/
|
||||
* Fixed bug 1195034: pt-deadlock-logger error: Use of uninitialized value $ts in pattern match (m//)
|
||||
* Fixed bug 1163372: pt-heartbeat --utc --check always returns 0
|
||||
* Fixed bug 1137556: pt-heartbeat docs don't account for --utc
|
||||
* Fixed bug 1146324: pt-query-digest 2.1 typo in docs
|
||||
* Fixed bug 1171968: pt-query-digest docs don't mention --type=rawlog
|
||||
* Fixed bug 1199591: pt-table-checksum doesn't use non-unique index with highest cardinality
|
||||
* Fixed bug 1136559: pt-table-checksum: Deep recursion on subroutine "SchemaIterator::_iterate_dbh"
|
||||
|
||||
-- Percona Toolkit Developers <toolkit-dev@percona.com> Thu, 18 Jul 2013 17:29:48 +0000
|
||||
|
||||
percona-toolkit (2.1.9) unstable; urgency=low
|
||||
|
||||
* Fixed bug 1103221: pt-heartbeat 2.1.8 doesn't use precision/sub-second timestamps
|
||||
* Fixed bug 1099665: pt-heartbeat 2.1.8 reports big time drift with UTC_TIMESTAMP
|
||||
* Fixed bug 1099836: pt-online-schema-change fails with "Duplicate entry" on MariaDB
|
||||
* Fixed bug 1103672: pt-online-schema-change makes bad DELETE trigger if PK is re-created with new columns
|
||||
* Fixed bug 1115333: pt-pmp doesn't list the origin lib for each function
|
||||
* Fixed bug 823411: pt-query-digest shouldn't print "Error: none" for tcpdump
|
||||
* Fixed bug 1103045: pt-query-digest fails to parse non-SQL errors
|
||||
* Fixed bug 1105077: pt-table-checksum: Confusing error message with binlog_format ROW or MIXED on slave
|
||||
* Fixed bug 918056: pt-table-sync false-positive error "Cannot nibble table because MySQL chose no index instead of the PRIMARY index"
|
||||
* Fixed bug 1099933: pt-stalk is too verbose, fills up log
|
||||
|
||||
-- Percona Toolkit Developers <toolkit-dev@percona.com> Thu, 14 Feb 2013 17:25:44 +0000
|
||||
|
||||
percona-toolkit (2.1.8) unstable; urgency=low
|
||||
|
||||
* Beta support for MySQL 5.6
|
||||
|
@@ -23,6 +23,6 @@ Description: Advanced MySQL and system command-line tools
|
||||
They are also fully self-contained, so installation is quick and easy and
|
||||
no libraries are installed.
|
||||
.
|
||||
Percona Toolkit is developed and supported by Percona Inc. For more
|
||||
Percona Toolkit is developed and supported by Percona. For more
|
||||
information and other free, open-source software developed by Percona,
|
||||
visit http://www.percona.com/software/.
|
||||
|
@@ -9,7 +9,7 @@ Upstream Author:
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright 2011 Percona Inc.
|
||||
Copyright 2013 Percona Ireland Ltd.
|
||||
|
||||
License:
|
||||
|
||||
|
@@ -4,7 +4,7 @@ Version: %{version}
|
||||
Release: %{release}
|
||||
Group: Applications/Databases
|
||||
License: GPL
|
||||
Vendor: Percona Inc.
|
||||
Vendor: Percona
|
||||
URL: http://www.percona.com/software/percona-toolkit/
|
||||
Source: percona-toolkit-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
@@ -22,7 +22,7 @@ they are professionally developed, formally tested, and fully documented.
|
||||
They are also fully self-contained, so installation is quick and easy and
|
||||
no libraries are installed.
|
||||
|
||||
Percona Toolkit is developed and supported by Percona Inc. For more
|
||||
Percona Toolkit is developed and supported by Percona. For more
|
||||
information and other free, open-source software developed by Percona,
|
||||
visit http://www.percona.com/software/.
|
||||
|
||||
|
@@ -41,7 +41,7 @@ master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'Percona Toolkit'
|
||||
copyright = u'2011, Percona Inc'
|
||||
copyright = u'2013, Percona Ireland Ltd'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
@@ -50,7 +50,7 @@ copyright = u'2011, Percona Inc'
|
||||
# The short X.Y version.
|
||||
version = '2.1'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '2.1.8'
|
||||
release = '2.1.10'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
@@ -178,8 +178,8 @@ htmlhelp_basename = 'PerconaToolkitdoc'
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'PerconaToolkit.tex', u'Percona Toolkit Documentation',
|
||||
u'Percona Inc', 'manual'),
|
||||
('index', 'PerconaToolkit-2.1.tex', u'Percona Toolkit Documentation',
|
||||
u'Percona Ireland Ltd', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
@@ -212,5 +212,5 @@ latex_documents = [
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', 'perconatoolkit', u'Percona Toolkit Documentation',
|
||||
[u'Percona Inc'], 1)
|
||||
[u'Percona Ireland Ltd'], 1)
|
||||
]
|
||||
|
@@ -289,7 +289,7 @@ If you spotted innacuracies, errors, don't understood it or you think something
|
||||
Call us: 1-888-316-9775 • <a href="/contact">Contact Us</a><br>
|
||||
MySQL and InnoDB are trademarks of Oracle Corp.<br>
|
||||
Proudly running <a href="/software/percona-server/">Percona Server<span id="recentServerVersion"></span></a><br>
|
||||
Copyright © 2006-2011 Percona Inc.<br>
|
||||
Copyright © 2006-2013 Percona Ireland Ltd.<br>
|
||||
<a href="/about-us/policies/">Copyright, Trademark, and Privacy Policy</a> • <a href="/sitemap/">Sitemap</a>
|
||||
<span class="inv"><!--[CDATA[</noindex-->]]></span>
|
||||
</div>
|
||||
|
@@ -14,7 +14,7 @@ no libraries are installed.
|
||||
|
||||
Percona Toolkit is derived from Maatkit and Aspersa, two of the best-known
|
||||
toolkits for MySQL server administration. It is developed and supported by
|
||||
Percona Inc. For more information and other free, open-source software
|
||||
Percona. For more information and other free, open-source software
|
||||
developed by Percona, visit `http://www.percona.com/software/ <http://www.percona.com/software/>`_.
|
||||
|
||||
Getting Percona Toolkit
|
||||
|
@@ -530,6 +530,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
Percona Toolkit v2.1.8 released 2012-12-21
|
||||
Percona Toolkit v2.1.10 released 2013-07-18
|
||||
|
||||
=cut
|
||||
|
@@ -1,6 +1,916 @@
|
||||
Release Notes
|
||||
*************
|
||||
|
||||
v2.1.10 released 2013-07-18
|
||||
===========================
|
||||
|
||||
Release Notes
|
||||
*************
|
||||
|
||||
v2.1.10 released 2013-07-18
|
||||
===========================
|
||||
|
||||
Percona Toolkit 2.1.10 has been released. This release includes eight bug fixes.
|
||||
|
||||
* Fixed bug #1163372: pt-heartbeat --utc --check always returns 0
|
||||
|
||||
Unfortunately, the relatively new --utc option for pt-heart was still
|
||||
broken because "[MySQL] interprets date as a value in the current time zone
|
||||
and converts it to an internal value in UTC." Now the tool works correctly
|
||||
with --utc by specifying "SET time_zone='+0:00'", and older versions of
|
||||
the tool can be made to work by specifying --set-vars "time_zone='+0:00'".
|
||||
|
||||
* Fixed bug #1195034: pt-deadlock-logger error: Use of uninitialized value $ts in pattern match (m//)
|
||||
|
||||
Improved the pattern matching that caused the pt-deadlock-logger error when
|
||||
different timestamp format was used.
|
||||
|
||||
* Fixed bug #1199591: pt-table-checksum doesn't use non-unique index with highest cardinality
|
||||
|
||||
pt-table-checksum was using the first non-unique index instead of the one
|
||||
with the highest cardinality due to a sorting bug.
|
||||
|
||||
Percona Toolkit packages can be downloaded from
|
||||
http://www.percona.com/downloads/percona-toolkit/ or the Percona Software
|
||||
Repositories (http://www.percona.com/software/repositories/).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Fixed bug #1136559: pt-table-checksum: Deep recursion on subroutine "SchemaIterator::_iterate_dbh"
|
||||
* Fixed bug #1195034: pt-deadlock-logger error: Use of uninitialized value $ts in pattern match (m//)
|
||||
* Fixed bug #1163372: pt-heartbeat --utc --check always returns 0
|
||||
* Fixed bug #1199591: pt-table-checksum doesn't use non-unique index with highest cardinality
|
||||
* Fixed bug #947893: Some tools use @@hostname without /*!50038*/
|
||||
* Fixed bug #1137556: pt-heartbeat docs don't account for --utc
|
||||
* Fixed bug #1146324: pt-query-digest 2.1 typo in docs
|
||||
* Fixed bug #1171968: pt-query-digest docs don't mention --type=rawlog
|
||||
|
||||
v2.1.9 released 2013-02-14
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.1.9 has been released. This release primarily aims to
|
||||
restore backwards-compatibility with pt-heartbeat 2.1.7 and older, but it
|
||||
also has important bug fixes for other tools.
|
||||
|
||||
* Fixed bug 1103221: pt-heartbeat 2.1.8 doesn't use precision/sub-second timestamps
|
||||
* Fixed bug 1099665: pt-heartbeat 2.1.8 reports big time drift with UTC_TIMESTAMP
|
||||
|
||||
The previous release switched the time authority from Perl to MySQL, and from
|
||||
local time to UTC. Unfortunately, these changes caused a loss of precision and,
|
||||
if mixing versions of pt-heartbeat, made the tool report a huge amount of
|
||||
replication lag. This release makes the tool compatible with pt-heartbeat
|
||||
2.1.7 and older again, but the UTC behavior introduced in 2.1.8 is now only
|
||||
available by specifying the new --utc option.
|
||||
|
||||
* Fixed bug 918056: pt-table-sync false-positive error "Cannot nibble table because MySQL chose no index instead of the PRIMARY index"
|
||||
|
||||
This is an important bug fix for pt-table-sync: certain chunks from
|
||||
pt-table-checksum resulted in an impossible WHERE, causing the false-positive
|
||||
"Cannot nibble" error, if those chunks had diffs.
|
||||
|
||||
* Fixed bug 1099836: pt-online-schema-change fails with "Duplicate entry" on MariaDB
|
||||
|
||||
MariaDB 5.5.28 (https://kb.askmonty.org/en/mariadb-5528-changelog/) fixed
|
||||
a bug: "Added warnings for duplicate key errors when using INSERT IGNORE".
|
||||
However, standard MySQL does not warn in this case, despite the docs saying
|
||||
that it should. Since pt-online-schema-change has always intended to ignore
|
||||
duplicate entry errors by using "INSERT IGNORE", it now handles the MariaDB
|
||||
case by also ignoring duplicate entry errors in the code.
|
||||
|
||||
* Fixed bug 1103672: pt-online-schema-change makes bad DELETE trigger if PK is re-created with new columns
|
||||
|
||||
pt-online-schema-change 2.1.9 handles another case of changing the primary key.
|
||||
However, since changing the primary key is tricky, the tool stops if --alter
|
||||
contains "DROP PRIMARY KEY", and you have to specify --no-check-alter to
|
||||
acknowledge this case.
|
||||
|
||||
* Fixed bug 1099933: pt-stalk is too verbose, fills up log
|
||||
|
||||
Previously, pt-stalk printed a line for every check. Since the tool is
|
||||
designed to be a long-running daemon, this could result in huge log files
|
||||
with "matched=no" lines. The tool has a new --verbose option which makes it
|
||||
quieter by default.
|
||||
|
||||
All users should upgrade, but in particular, users of versions 2.1.7 and
|
||||
older are strongly recommended to skip 2.1.8 and go directly to 2.1.9.
|
||||
|
||||
Users of pt-heartbeat in 2.1.8 who prefer the UTC behavior should keep in
|
||||
mind that they will have to use the --utc option after upgrading.
|
||||
|
||||
Percona Toolkit packages can be downloaded from
|
||||
http://www.percona.com/downloads/percona-toolkit/ or the Percona Software
|
||||
Repositories (http://www.percona.com/software/repositories/).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Fixed bug 1103221: pt-heartbeat 2.1.8 doesn't use precision/sub-second timestamps
|
||||
* Fixed bug 1099665: pt-heartbeat 2.1.8 reports big time drift with UTC_TIMESTAMP
|
||||
* Fixed bug 1099836: pt-online-schema-change fails with "Duplicate entry" on MariaDB
|
||||
* Fixed bug 1103672: pt-online-schema-change makes bad DELETE trigger if PK is re-created with new columns
|
||||
* Fixed bug 1115333: pt-pmp doesn't list the origin lib for each function
|
||||
* Fixed bug 823411: pt-query-digest shouldn't print "Error: none" for tcpdump
|
||||
* Fixed bug 1103045: pt-query-digest fails to parse non-SQL errors
|
||||
* Fixed bug 1105077: pt-table-checksum: Confusing error message with binlog_format ROW or MIXED on slave
|
||||
* Fixed bug 918056: pt-table-sync false-positive error "Cannot nibble table because MySQL chose no index instead of the PRIMARY index"
|
||||
* Fixed bug 1099933: pt-stalk is too verbose, fills up log
|
||||
|
||||
v2.1.8 released 2012-12-21
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.1.8 has been released. This release includes 28 bug fixes, beta support for MySQL 5.6, and extensive support for Percona XtraDB Cluster (PXC). Users intending on running the tools on Percona XtraDB Cluster or MySQL 5.6 should upgrade. The following tools have been verified to work on PXC versions 5.5.28 and newer:
|
||||
|
||||
* pt-table-chcecksum
|
||||
* pt-online-schema-change
|
||||
* pt-archive
|
||||
* pt-mysql-summary
|
||||
* pt-heartbeat
|
||||
* pt-variable-advisor
|
||||
* pt-config-diff
|
||||
* pt-deadlock-logger
|
||||
|
||||
However, there are limitations when running these tools on PXC; see the Percona XtraDB Cluster section in each tool's documentation for further details. All other tools, with the exception of pt-slave-find, pt-slave-delay and pt-slave-restart, should also work correctly, but in some cases they have not been modified to take advantage of PXC features, so they may behave differently in future releases.
|
||||
|
||||
The bug fixes are widely assorted. The following highlights some of the more interesting and "hot" bugs:
|
||||
|
||||
* Fixed bug 1082599: pt-query-digest fails to parse timestamp with no query
|
||||
|
||||
Slow logs which include timestamps but no query--which can happen if using slow_query_log_timestamp_always in Percona Server--were misparsed, resulting in an erroneous report. Now such no-query events show up in reports as ``/* No query */``.
|
||||
|
||||
* Fixed bug 1078838: pt-query-digest doesn't parse general log with "Connect user as user"
|
||||
|
||||
The "as" was misparsed and the following word would end up reported as the database; pt-query-digest now handles this correctly.
|
||||
|
||||
* Fixed bug 1015590: pt-mysql-summary doesn't handle renamed variables in Percona Server 5.5
|
||||
|
||||
Some renamed variables had caused the Percona Server section to work unreliably.
|
||||
|
||||
* Fixed bug 1074179: pt-table-checksum doesn't ignore tables for --replicate-check-only
|
||||
|
||||
When using --replicate-check-only, filter options like --databases and --tables were not applied.
|
||||
|
||||
* Fixed bug 886059: pt-heartbeat handles timezones inconsistently
|
||||
|
||||
Previously, pt-heartbeat respected the MySQL time zone, but this caused false readings (e.g. very high lag) with slaves running in different time zones. Now pt-heartbeat uses UTC regardless of the server or MySQL time zone.
|
||||
|
||||
* Fixed bug 1079341: pt-online-schema-change checks for foreign keys on MyISAM tables
|
||||
|
||||
Since MyISAM tables can't have foreign keys, and the tool uses the information_schema to find child tables, this could cause unnecessary load on the server.
|
||||
|
||||
2.1.8 continues the trend of solid bug fix releases, and all 2.1 users are encouraged to upgrade.
|
||||
|
||||
Percona Toolkit packages can be downloaded from http://www.percona.com/downloads/percona-toolkit/ or the Percona Software Repositories (http://www.percona.com/software/repositories/).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Beta support for MySQL 5.6
|
||||
* Beta support for Percona XtraDB Cluster
|
||||
* pt-online-schema-change: If ran on Percona XtraDB Cluster, requires PXC 5.5.28 or newer
|
||||
* pt-table-checksum: If ran on Percona XtraDB Cluster, requires PXC 5.5.28 or newer
|
||||
* pt-upgrade: Added --[no]disable-query-cache
|
||||
* Fixed bug 927955: Bad pod2rst transformation
|
||||
* Fixed bug 898665: Bad online docs formatting for --[no]vars
|
||||
* Fixed bug 1022622: pt-config-diff is case-sensitive
|
||||
* Fixed bug 1007938: pt-config-diff doesn't handle end-of-line comments
|
||||
* Fixed bug 917770: pt-config-diff Use of uninitialized value in substitution (s///) at line 1996
|
||||
* Fixed bug 1082104: pt-deadlock-logger doesn't handle usernames with dashes
|
||||
* Fixed bug 886059: pt-heartbeat handles timezones inconsistently
|
||||
* Fixed bug 1086259: pt-kill --log-dsn timestamp is wrong
|
||||
* Fixed bug 1015590: pt-mysql-summary doesn't handle renamed variables in Percona Server 5.5
|
||||
* Fixed bug 1079341: pt-online-schema-change checks for foreign keys on MyISAM tables
|
||||
* Fixed bug 823431: pt-query-advisor hangs on big queries
|
||||
* Fixed bug 996069: pt-query-advisor RES.001 is incorrect
|
||||
* Fixed bug 933465: pt-query-advisor false positive on RES.001
|
||||
* Fixed bug 937234: pt-query-advisor issues wrong RES.001
|
||||
* Fixed bug 1082599: pt-query-digest fails to parse timestamp with no query
|
||||
* Fixed bug 1078838: pt-query-digest doesn't parse general log with "Connect user as user"
|
||||
* Fixed bug 957442: pt-query-digest with custom --group-by throws error
|
||||
* Fixed bug 887638: pt-query-digest prints negative byte offset
|
||||
* Fixed bug 831525: pt-query-digest help output mangled
|
||||
* Fixed bug 932614: pt-slave-restart CHANGE MASTER query causes error
|
||||
* Fixed bug 1046440: pt-stalk purge_samples slows down checks
|
||||
* Fixed bug 986847: pt-stalk does not report NFS iostat
|
||||
* Fixed bug 1074179: pt-table-checksum doesn't ignore tables for --replicate-check-only
|
||||
* Fixed bug 911385: pt-table-checksum v2 fails when --resume + --ignore-database is used
|
||||
* Fixed bug 1041391: pt-table-checksum debug statement for "Chosen hash func" prints undef
|
||||
* Fixed bug 1075638: pt-table-checksum Illegal division by zero at line 7950
|
||||
* Fixed bug 1052475: pt-table-checksum uninitialized value in numeric lt (<) at line 8611
|
||||
* Fixed bug 1078887: Tools let --set-vars clobber the required SQL mode
|
||||
|
||||
v2.1.7 released 2012-11-19
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.1.7 has been released which is a hotfix for two bugs when using pt-table-checksum with Percona XtraDB Cluster:
|
||||
|
||||
* Bug 1080384: pt-table-checksum 2.1.6 crashes using PTDEBUG
|
||||
* Bug 1080385: pt-table-checksum 2.1.6 --check-binlog-format doesn't ignore PXC nodes
|
||||
|
||||
If you're using pt-table-checksum with a Percona XtraDB Cluster, you should upgrade. Otherwise, users can wait until the next full release.
|
||||
|
||||
Percona Toolkit packages can be downloaded from http://www.percona.com/downloads/percona-toolkit/ or the Percona Software Repositories (http://www.percona.com/software/repositories/).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Fixed bug 1080384: pt-table-checksum 2.1.6 crashes using PTDEBUG
|
||||
* Fixed bug 1080385: pt-table-checksum 2.1.6 --check-binlog-format doesn't ignore PXC nodes
|
||||
|
||||
v2.1.6 released 2012-11-13
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.1.6 has been released. This release includes 33 bug fixes and three new features: pt-online-schema-change now handles renaming columns without losing data, removing one of the tool's limitations. pt-online-schema-change also got two new options: --default-engine and --statistics. Finally, pt-stalk now has a plugin hook interface, available through the --plugin option. The bug fixes are widely assorted. The following highlights some of the more interesting and "hot" bugs:
|
||||
|
||||
* Bug 978133: pt-query-digest review table privilege checks don't work
|
||||
|
||||
The same checks were removed from pt-table-checksum on 2.1.3 and pt-table-sync on 2.1.4, so this just follows suit.
|
||||
|
||||
* Bug 938068: pt-table-checksum doesn't warn if binlog_format=row or mixed on slaves
|
||||
|
||||
A particularly important fix, as it may stop pt-table-checksum from breaking replication in these setups.
|
||||
|
||||
* Bug 1043438: pt-table-checksum doesn't honor --run-time while checking replication lag
|
||||
|
||||
If you run multiple instances of pt-table-checksum on a badly lagged server, actually respecting --run-time stops the instances from divebombing the server when the replica catches up.
|
||||
|
||||
* Bug 1062324: pt-online-schema-change DELETE trigger fails when altering primary key
|
||||
|
||||
Fixed by choosing a key on the new table for the DELETE trigger.
|
||||
|
||||
* Bug 1062563: pt-table-checksum 2.1.4 doesn't detect diffs on Percona XtraDB Cluster nodes
|
||||
|
||||
A follow up to the same fix in the previous release, this adds to warnings for cases in which pt-table-checksum may work incorrectly and require some user intervention: One for the case of master -> cluster, and one for cluster1 -> cluster2.
|
||||
|
||||
* Bug 821715: LOAD DATA LOCAL INFILE broken in some platforms
|
||||
|
||||
This bug has hounded the toolkit for quite some time. In some platforms, trying to use LOAD DATA LOCAL INFILE would fail as if the user didn't have enough privileges to perform the operation. This was a misdiagnoses from MySQL; The actual problem was that the libmysqlclient.so provided by some vendors was compiled in a way that disallowed users from using the statement without some extra work. This fix adds an 'L' option to the DSNs the toolkit uses, tells the the tools to explicitly enables LOAD DATA LOCAL INFILE. This affected two pt-archiver and pt-upgrade, so if you are on an effected OS and need to use those, you can simply tag an L=1 to your DSN and everything should start working.
|
||||
|
||||
* Bug 866075: pt-show-grant doesn't support column-level grants
|
||||
|
||||
This was actually the 'hottest' bug in the tracker.
|
||||
|
||||
This is another solid bug fix release, and all 2.1 users are encouraged to upgrade.
|
||||
|
||||
Percona Toolkit packages can be downloaded from http://www.percona.com/downloads/percona-toolkit/ or the Percona Software Repositories (http://www.percona.com/software/repositories/).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* pt-online-schema-change: Columns can now be renamed without data loss
|
||||
* pt-online-schema-change: New --default-engine option
|
||||
* pt-stalk: Plugin hooks available through the --plugin option to extend the tool's functionality
|
||||
* Fixed bug 1069951: --version-check default should be explicitly "off"
|
||||
* Fixed bug 821715: LOAD DATA LOCAL INFILE broken in some platforms
|
||||
* Fixed bug 995896: Useless use of cat in Daemon.pm
|
||||
* Fixed bug 1039074: Tools exit 0 on error parsing options, should exit non-zero
|
||||
* Fixed bug 938068: pt-table-checksum doesn't warn if binlog_format=row or mixed on slaves
|
||||
* Fixed bug 1009510: pt-table-checksum breaks replication if a slave table is missing or different
|
||||
* Fixed bug 1043438: pt-table-checksum doesn't honor --run-time while checking replication lag
|
||||
* Fixed bug 1073532: pt-table-checksum error: Use of uninitialized value in int at line 2778
|
||||
* Fixed bug 1016131: pt-table-checksum can crash with --columns if none match
|
||||
* Fixed bug 1039569: pt-table-checksum dies if creating the --replicate table fails
|
||||
* Fixed bug 1059732: pt-table-checksum doesn't test all hash functions
|
||||
* Fixed bug 1062563: pt-table-checksum 2.1.4 doesn't detect diffs on Percona XtraDB Cluster nodes
|
||||
* Fixed bug 1043528: pt-deadlock-logger can't parse db/tbl/index on partitioned tables
|
||||
* Fixed bug 1062324: pt-online-schema-change DELETE trigger fails when altering primary key
|
||||
* Fixed bug 1058285: pt-online-schema-change fails if sql_mode explicitly or implicitly uses ANSI_QUOTES
|
||||
* Fixed bug 1073996: pt-online-schema-change fails with "I need a max_rows argument"
|
||||
* Fixed bug 1039541: pt-online-schema-change --quiet doesn't disable --progress
|
||||
* Fixed bug 1045317: pt-online-schema-change doesn't report how many warnings it suppressed
|
||||
* Fixed bug 1060774: pt-upgrade fails if select column > 64 chars
|
||||
* Fixed bug 1070916: pt-mysql-summary may report the wrong cnf file
|
||||
* Fixed bug 903229: pt-mysql-summary incorrectly categorizes databases
|
||||
* Fixed bug 866075: pt-show-grant doesn't support column-level grants
|
||||
* Fixed bug 978133: pt-query-digest review table privilege checks don't work
|
||||
* Fixed bug 956981: pt-query-digest docs for event attributes link to defunct Maatkit wiki
|
||||
* Fixed bug 1047335: pt-duplicate-key-checker fails when it encounters a crashed table
|
||||
* Fixed bug 1047701: pt-stalk deletes non-empty files
|
||||
* Fixed bug 1070434: pt-stalk --no-stalk and --iterations 1 don't wait for the collect
|
||||
* Fixed bug 1052722: pt-fifo-split is processing n-1 rows initially
|
||||
* Fixed bug 1013407: pt-find documentation error with mtime and InnoDB
|
||||
* Fixed bug 1059757: pt-trend output has no header
|
||||
* Fixed bug 1063933: pt-visual-explain docs link to missing pdf
|
||||
* Fixed bug 1075773: pt-fk-error-logger crashes if there's no foreign key error
|
||||
* Fixed bug 1075775: pt-fk-error-logger --dest table example doesn't work
|
||||
|
||||
v2.1.5 released 2012-10-08
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.1.5 has been released. This release is less than two weeks after the release of 2.1.4 because we wanted to address these bugs quickly:
|
||||
|
||||
* Bug 1062563: pt-table-checksum 2.1.4 doesn't detect diffs on Percona XtraDB Cluster nodes
|
||||
|
||||
* Bug 1063912: pt-table-checksum 2.1.4 miscategorizes Percona XtraDB Cluster-based slaves as cluster nodes
|
||||
|
||||
* Bug 1064016: pt-table-sync 2.1.4 --version-check may not work with HTTPS/SSL
|
||||
|
||||
The first two bugs fix how pt-table-checksum works with Percona XtraDB Cluster (PXC). Although the 2.1.4 release did introduce support for PXC, these bugs prevented pt-table-checksum from working correctly with a cluster.
|
||||
|
||||
The third bug is also related to a feature new in 2.1.4: --version-check. The feature uses HTTPS/SSL by default, but some modules in pt-table-sync weren't update which could prevent it from working on older systems. Related, the version check web page mentioned in tools' documentation was also created.
|
||||
|
||||
If you're using pt-table-checksum with a Percona XtraDB Cluster, you should definitely upgrade. Otherwise, users can wait until 2.1.6 for another full release.
|
||||
|
||||
Percona Toolkit packages can be downloaded from http://www.percona.com/downloads/percona-toolkit/ or the Percona Software Repositories (http://www.percona.com/software/repositories/).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Fixed bug 1062563: pt-table-checksum 2.1.4 doesn't detect diffs on Percona XtraDB Cluster nodes
|
||||
* Fixed bug 1063912: pt-table-checksum 2.1.4 miscategorizes Percona XtraDB Cluster-based slaves as cluster nodes
|
||||
* Fixed bug 1064016: pt-table-sync 2.1.4 --version-check may not work with HTTPS/SSL
|
||||
* Fixed bug 1060423: Missing version-check page
|
||||
|
||||
v2.1.4 released 2012-09-20
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.1.4 has been released. This release includes 26 bug fixes and three new features: Making pt-table-checksum work with Percona XtraDB Cluster, adding a --run-time option to pt-table-checksum, and implementing the "Version Check" feature, enabled through the --version-check switch. For further information on --version-check, see http://www.mysqlperformanceblog.com/2012/09/10/introducing-the-version-check-feature-in-percona-toolkit/. The bug fixes are widely assorted. The following highlights some of the more interesting and "hot" bugs:
|
||||
|
||||
* Fixed bug 1017626: pt-table-checksum doesn't work with Percona XtraDB Cluster
|
||||
|
||||
Note that this requires Percona XtraDB Cluster 5.5.27-23.6 or newer, as the fix depends on this bug https://bugs.launchpad.net/codership-mysql/+bug/1023911 being resolved.
|
||||
|
||||
* Fixed bug 1034170: pt-table-checksum --defaults-file isn't used for slaves
|
||||
|
||||
Previously, users had no recourse but using --recursion-method in conjunction with a dsn table to sidestep this bug, so this fix is a huge usability gain. This was caused by the toolkit not copying the -F portion of the main dsn.
|
||||
|
||||
* Fixed bug 1039184: pt-upgrade error "I need a right_sth argument"
|
||||
|
||||
Which were stopping pt-upgrade from working on a MySQL 4.1 host.
|
||||
|
||||
* Fixed bug 1036747: pt-table-sync priv checks need to be removed
|
||||
|
||||
The same checks were removed in the previous release from pt-table-checksum, so this continues the trend.
|
||||
|
||||
* Fixed bug 1038995: pt-stalk --notify-by-email fails
|
||||
|
||||
This was a bug in our shell option parsing library, and would potentially affect any option starting with 'no'.
|
||||
|
||||
Like 2.1.3, this is another solid bug fix release, and 2.1 users are encouraged to upgrade.
|
||||
|
||||
Percona Toolkit packages can be downloaded from http://www.percona.com/downloads/percona-toolkit/ or the Percona Software Repositories (http://www.percona.com/software/repositories/).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* pt-table-checksum: Percona XtraDB Cluster support
|
||||
* pt-table-checksum: Implemented the standard --run-time option
|
||||
* Implemented the version-check feature in several tools, enabled with the --version-check option
|
||||
* Fixed bug 856060: Document gdb dependency
|
||||
* Fixed bug 1041394: Unquoted arguments to tr break the bash tools
|
||||
* Fixed bug 1035311: pt-diskstats shows wrong device names
|
||||
* Fixed bug 1036804: pt-duplicate-key-checker error parsing InnoDB table with no PK or unique keys
|
||||
* Fixed bug 1022658: pt-online-schema-change dropping FK limitation isn't documented
|
||||
* Fixed bug 1041372: pt-online-schema-changes fails if db+tbl name exceeds 64 characters
|
||||
* Fixed bug 1029178: pt-query-digest --type tcpdump memory usage keeps increasing
|
||||
* Fixed bug 1037211: pt-query-digest won't distill LOCK TABLES in lowercase
|
||||
* Fixed bug 942114: pt-stalk warns about bad "find" usage
|
||||
* Fixed bug 1035319: pt-stalk df -h throws away needed details
|
||||
* Fixed bug 1038995: pt-stalk --notify-by-email fails
|
||||
* Fixed bug 1038995: pt-stalk does not get all InnoDB lock data
|
||||
* Fixed bug 952722: pt-summary should show information about Fusion-io cards
|
||||
* Fixed bug 899415: pt-table-checksum doesn't work if slaves use RBR
|
||||
* Fixed bug 954588: pt-table-checksum --check-slave-lag docs aren't clear
|
||||
* Fixed bug 1034170: pt-table-checksum --defaults-file isn't used for slaves
|
||||
* Fixed bug 930693: pt-table-sync and text columns with just whitespace
|
||||
* Fixed bug 1028710: pt-table-sync base_count fails on n = 1000, base = 10
|
||||
* Fixed bug 1034717: pt-table-sync division by zero error with varchar primary key
|
||||
* Fixed bug 1036747: pt-table-sync priv checks need to be removed
|
||||
* Fixed bug 1039184: pt-upgrade error "I need a right_sth argument"
|
||||
* Fixed bug 1035260: sh warnings in pt-summary and pt-mysql-summary
|
||||
* Fixed bug 1038276: ChangeHandler doesn't quote varchar columns with hex-looking values
|
||||
* Fixed bug 916925: CentOS 5 yum dependency resolution for perl module is wrong
|
||||
* Fixed bug 1035950: Percona Toolkit RPM should contain a dependency on perl-Time-HiRes
|
||||
|
||||
v2.1.3 released 2012-08-03
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.1.3 has been released. This release includes 31 bug fixes and one new feature: pt-kill --log-dsn to log information about killed queries to a table. The bug fixes are widely assorted. The following highlights some of the more interesting and "hot" bugs:
|
||||
|
||||
* Fixed bug 916168: pt-table-checksum privilege check fails on MySQL 5.5
|
||||
|
||||
pt-table-checksum used to check the user's privileges, but the method was not always reliable, and due to http://bugs.mysql.com/bug.php?id=61846 it became quite unreliable on MySQL 5.5. So the privs check was removed altogether, meaning that the tool may fail later if the user's privileges are insufficient.
|
||||
|
||||
* Fixed bug 950294: pt-table-checksum should always create schema and tables with IF NOT EXISTS
|
||||
|
||||
In certain cases where the master and replicas have different schemas and/or tables, pt-table-checksum could break replication because the checksums table did not exist on a replica.
|
||||
|
||||
* Fixed bug 821703: pt-query-digest --processlist may crash
|
||||
* Fixed bug 883098: pt-query-digest crashes if processlist has extra columns
|
||||
|
||||
Certain distributions of MySQL add extra columns to SHOW PROCESSLIST which caused pt-query-digest --processlist to crash at times.
|
||||
|
||||
* Fixed bug 941469: pt-kill doesn't reconnect if its connection is lost
|
||||
|
||||
pt-kill is meant to be a long-running daemon, so naturally it's important that it stays connected to MySQL.
|
||||
|
||||
* Fixed bug 1004567: pt-heartbeat --update --replace causes duplicate key error
|
||||
|
||||
The combination of these pt-heartbeat options could cause replication to break due to a duplicate key error.
|
||||
|
||||
* Fixed bug 1022628: pt-online-schema-change error: Use of uninitialized value in numeric lt (<) at line 6519
|
||||
|
||||
This bug was related to how --quiet was handled, and it could happen even if --quiet wasn't given on the command line.
|
||||
|
||||
All in all, this is solid bug fix release, and 2.1 users are encouraged to upgrade.
|
||||
|
||||
Percona Toolkit packages can be downloaded from http://www.percona.com/downloads/percona-toolkit/ or the Percona Software Repositories (http://www.percona.com/software/repositories/).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* pt-kill: Implemented --log-dsn to log info about killed queries to a table
|
||||
* Fixed bug 1016127: Install hint for DBD::mysql is wrong
|
||||
* Fixed bug 984915: DSNParser does not check success of --set-vars
|
||||
* Fixed bug 889739: pt-config-diff doesn't diff quoted strings properly
|
||||
* Fixed bug 969669: pt-duplicate-key-checker --key-types=k doesn't work
|
||||
* Fixed bug 1004567: pt-heartbeat --update --replace causes duplicate key error
|
||||
* Fixed bug 1028614: pt-index-usage ignores --database
|
||||
* Fixed bug 940733: pt-ioprofile leaves behind temp directory
|
||||
* Fixed bug 941469: pt-kill doesn't reconnect if its connection is lost
|
||||
* Fixed bug 1016114: pt-online-schema-change docs don't mention default values
|
||||
* Fixed bug 1020997: pt-online-schema-change fails when table is empty
|
||||
* Fixed bug 1022628: pt-online-schema-change error: Use of uninitialized value in numeric lt (<) at line 6519
|
||||
* Fixed bug 937225: pt-query-advisor OUTER JOIN advice in JOI.003 is confusing
|
||||
* Fixed bug 821703: pt-query-digest --processlist may crash
|
||||
* Fixed bug 883098: pt-query-digest crashes if processlist has extra columns
|
||||
* Fixed bug 924950: pt-query-digest --group-by db may crash profile report
|
||||
* Fixed bug 1022851: pt-sift error: PREFIX: unbound variable
|
||||
* Fixed bug 969703: pt-sift defaults to '.' instead of '/var/lib/pt-talk'
|
||||
* Fixed bug 962330: pt-slave-delay incorrectly computes lag if started when slave is already lagging
|
||||
* Fixed bug 954990: pt-stalk --nostalk does not work
|
||||
* Fixed bug 977226: pt-summary doesn't detect LSI RAID control
|
||||
* Fixed bug 1030031: pt-table-checksum reports wrong number of DIFFS
|
||||
* Fixed bug 916168: pt-table-checksum privilege check fails on MySQL 5.5
|
||||
* Fixed bug 950294: pt-table-checksum should always create schema and tables with IF NOT EXISTS
|
||||
* Fixed bug 953141: pt-table-checksum ignores its default and explicit --recursion-method
|
||||
* Fixed bug 1030975: pt-table-sync crashes if sql_mode includes ANSI_QUOTES
|
||||
* Fixed bug 869005: pt-table-sync should always set REPEATABLE READ
|
||||
* Fixed bug 903510: pt-tcp-model crashes in --type=requests mode on empty file
|
||||
* Fixed bug 934310: pt-tcp-model --quantile docs wrong
|
||||
* Fixed bug 980318: pt-upgrade results truncated if hostnames are long
|
||||
* Fixed bug 821696: pt-variable-advisor shows too long of a snippet
|
||||
* Fixed bug 844880: pt-variable-advisor shows binary logging as both enabled and disabled
|
||||
|
||||
v2.1.2 released 2012-06-12
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.1.2 has been released. This is a very important release because it fixes a critical bug in pt-table-sync (bug 1003014) which caused various failures. All users of Percona Toolkit 2.1 should upgrade to this release. There were 47 other bug fixes, several new options, and other changes. The following is a high-level summary of the most important changes.
|
||||
|
||||
In addition to the critical bug fix mentioned above, another important pt-table-sync bug was fixed, bug 1002365: --ignore-* options did not work with --replicate. The --lock-and-rename feature of the tool was also disabled unless running MySQL 5.5 or newer because it did not work reliably in earlier versions of MySQL.
|
||||
|
||||
Several important pt-table-checksum bugs were fixed. First, a bug caused the tool to ignore the primary key. Second, the tool did not wait for the checksum table to replicate, so it could select from a nonexistent table on a replica and crash. Third, it did not check if all checksum queries were safe and chunk index with more than 3 columns could cause MySQL to scan many more rows than expected.
|
||||
|
||||
pt-online-schema-change received many improvements and fixes: it did not retry deadlocks, but now it does; --no-swap-tables caused an error; it did not handle column renames; it did not allow disabling foreign key checks; --dry-run always failed on tables with foreign keys; it used different keys for chunking and triggers; etc. In short: pt-online-schema-change 2.1.2 is superior to 2.1.1.
|
||||
|
||||
Two pt-archiver bugs were fixed: bug 979092, --sleep conflicts with bulk operations; and bug 903379, --file doesn't create a file.
|
||||
|
||||
--recursion-method=none was implemented in pt-heartbeat, pt-online-schema-change, pt-slave-find, pt-slave-restart, pt-table-checksum, and pt-table-sync. This allows these tools to avoid executing SHOW SLAVE STATUS which requires a privilege not available to Amazon RDS users.
|
||||
|
||||
Other bugs were fixed in pt-stalk, pt-variable-advisor, pt-duplicate-key-checker, pt-diskstats, pt-query-digest, pt-sift, pt-kill, pt-summary, and pt-deadlock-logger.
|
||||
|
||||
Percona Toolkit 2.1.2 should be backwards-compatible with 2.1.1, so users are strongly encouraged to upgrade.
|
||||
|
||||
Percona Toolkit packages can be downloaded from http://www.percona.com/downloads/percona-toolkit/ or the Percona Software Repositories (http://www.percona.com/software/repositories/).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* pt-heartbeat: Implemented --recursion-method=none
|
||||
* pt-index-usage: MySQL 5.5 compatibility fixes
|
||||
* pt-log-player: MySQL 5.5 compatibility fixes
|
||||
* pt-online-schema-change: Added --chunk-index-columns
|
||||
* pt-online-schema-change: Added --[no]check-plan
|
||||
* pt-online-schema-change: Added --[no]drop-new-table
|
||||
* pt-online-schema-change: Implemented --recursion-method=none
|
||||
* pt-query-advisor: Added --report-type for JSON output
|
||||
* pt-query-digest: Removed --[no]zero-bool
|
||||
* pt-slave-delay: Added --database
|
||||
* pt-slave-find: Implemented --recursion-method=none
|
||||
* pt-slave-restart: Implemented --recursion-method=none
|
||||
* pt-table-checksum: Added --chunk-index-columns
|
||||
* pt-table-checksum: Added --[no]check-plan
|
||||
* pt-table-checksum: Implemented --recursion-method=none
|
||||
* pt-table-sync: Disabled --lock-and-rename except for MySQL 5.5 and newer
|
||||
* pt-table-sync: Implemented --recursion-method=none
|
||||
* Fixed bug 945079: Shell tools TMPDIR may break
|
||||
* Fixed bug 912902: Some shell tools still use basename
|
||||
* Fixed bug 987694: There is no --recursion-method=none option
|
||||
* Fixed bug 886077: Passwords with commas don't work, expose part of password
|
||||
* Fixed bug 856024: Lintian warnings when building percona-toolkit Debian package
|
||||
* Fixed bug 903379: pt-archiver --file doesn't create a file
|
||||
* Fixed bug 979092: pt-archiver --sleep conflicts with bulk operations
|
||||
* Fixed bug 903443: pt-deadlock-logger crashes on MySQL 5.5
|
||||
* Fixed bug 941064: pt-deadlock-logger can't clear deadlocks on 5.5
|
||||
* Fixed bug 952727: pt-diskstats shows incorrect wr_mb_s
|
||||
* Fixed bug 994176: pt-diskstats --group-by=all --headers=scroll prints a header for every sample
|
||||
* Fixed bug 894140: pt-duplicate-key-checker sometimes recreates a key it shouldn't
|
||||
* Fixed bug 923896: pt-kill: uninitialized value causes script to exit
|
||||
* Fixed bug 1003003: pt-online-schema-change uses different keys for chunking and triggers
|
||||
* Fixed bug 1003315: pt-online-schema-change --dry-run always fails on table with foreign keys
|
||||
* Fixed bug 1004551: pt-online-schema-change --no-swap-tables causes error
|
||||
* Fixed bug 976108: pt-online-schema-change doesn't allow to disable foreign key checks
|
||||
* Fixed bug 976109: pt-online-schema-change doesn't handle column renames
|
||||
* Fixed bug 988036: pt-online-schema-change causes deadlocks under heavy write load
|
||||
* Fixed bug 989227: pt-online-schema-change crashes with PTDEBUG
|
||||
* Fixed bug 994002: pt-online-schema-change 2.1.1 doesn't choose the PRIMARY KEY
|
||||
* Fixed bug 994010: pt-online-schema-change 2.1.1 crashes without InnoDB
|
||||
* Fixed bug 996915: pt-online-schema-change crashes with invalid --max-load and --critical-load
|
||||
* Fixed bug 998831: pt-online-schema-change -- Should have an option to NOT drop tables on failure
|
||||
* Fixed bug 1002448: pt-online-schema-change: typo for finding usable indexes
|
||||
* Fixed bug 885382: pt-query-digest --embedded-attributes doesn't check cardinality
|
||||
* Fixed bug 888114: pt-query-digest report crashes with infinite loop
|
||||
* Fixed bug 949630: pt-query-digest mentions a Subversion repository
|
||||
* Fixed bug 844034: pt-show-grants --separate fails with proxy user
|
||||
* Fixed bug 946707: pt-sift loses STDIN after pt-diskstats
|
||||
* Fixed bug 994947: pt-stalk doesn't reset cycles_true after collection
|
||||
* Fixed bug 986151: pt-stalk-has mktemp error
|
||||
* Fixed bug 993436: pt-summary Memory: Total reports M instead of G
|
||||
* Fixed bug 1008778: pt-table-checksum doesn't wait for checksum table to replicate
|
||||
* Fixed bug 1010232: pt-table-checksum doesn't check the size of checksum chunks
|
||||
* Fixed bug 1011738: pt-table-checksum SKIPPED is zero but chunks were skipped
|
||||
* Fixed bug 919499: pt-table-checksum fails with binary log error in mysql >= 5.5.18
|
||||
* Fixed bug 972399: pt-table-checksum docs are not rendered right
|
||||
* Fixed bug 978432: pt-table-checksum ignoring primary key
|
||||
* Fixed bug 995274: pt-table-checksum can't use an undefined value as an ARRAY reference at line 2206
|
||||
* Fixed bug 996110: pt-table-checksum crashes if InnoDB is disabled
|
||||
* Fixed bug 987393: pt-table-checksum: Empy tables cause "undefined value as an ARRAY" errors
|
||||
* Fixed bug 1002365: pt-table-sync --ignore-* options don't work with --replicate
|
||||
* Fixed bug 1003014: pt-table-sync --replicate and --sync-to-master error "index does not exist"
|
||||
* Fixed bug 823403: pt-table-sync --lock-and-rename doesn't work on 5.1
|
||||
* Fixed bug 898138: pt-variable-advisor doesn't recognize 5.5.3+ concurrent_insert values
|
||||
|
||||
v2.1.1 released 2012-04-03
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.1.1 has been released. This is the first release in the
|
||||
new 2.1 series which supersedes the 2.0 series. We will continue to fix bugs
|
||||
in 2.0, but 2.1 is now the focus of development.
|
||||
|
||||
2.1 introduces a lot of new code for:
|
||||
|
||||
* pt-online-schema-change (completely redesigned)
|
||||
* pt-mysql-summary (completely redesigned)
|
||||
* pt-summary (completely redesigned)
|
||||
* pt-fingerprint (new tool)
|
||||
* pt-table-usage (new tool)
|
||||
|
||||
There were also several bug fixes.
|
||||
|
||||
The redesigned tools are meant to replace their 2.0 counterparts because
|
||||
the 2.1 versions have the same or more functionality and they are simpler
|
||||
and more reliable. pt-online-schema-change was particularly enhanced to
|
||||
be as safe as possible given that the tool is inherently risky.
|
||||
|
||||
Percona Toolkit packages can be downloaded from
|
||||
http://www.percona.com/downloads/percona-toolkit/ or the Percona Software
|
||||
Repositories (http://www.percona.com/software/repositories/).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Completely redesigned pt-online-schema-change
|
||||
* Completely redesigned pt-mysql-summary
|
||||
* Completely redesigned pt-summary
|
||||
* Added new tool: pt-table-usage
|
||||
* Added new tool: pt-fingerprint
|
||||
* Fixed bug 955860: pt-stalk doesn't run vmstat, iostat, and mpstat for --run-time
|
||||
* Fixed bug 960513: SHOW TABLE STATUS is used needlessly
|
||||
* Fixed bug 969726: pt-online-schema-change loses foreign keys
|
||||
* Fixed bug 846028: pt-online-schema-change does not show progress until completed
|
||||
* Fixed bug 898695: pt-online-schema-change add useless ORDER BY
|
||||
* Fixed bug 952727: pt-diskstats shows incorrect wr_mb_s
|
||||
* Fixed bug 963225: pt-query-digest fails to set history columns for disk tmp tables and disk filesort
|
||||
* Fixed bug 967451: Char chunking doesn't quote column name
|
||||
* Fixed bug 972399: pt-table-checksum docs are not rendered right
|
||||
* Fixed bug 896553: Various documentation spelling fixes
|
||||
* Fixed bug 949154: pt-variable-advisor advice for relay-log-space-limit
|
||||
* Fixed bug 953461: pt-upgrade manual broken 'output' section
|
||||
* Fixed bug 949653: pt-table-checksum docs don't mention risks posed by inconsistent schemas
|
||||
|
||||
v2.0.4 released 2012-03-07
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.0.4 has been released. 23 bugs were fixed in this release,
|
||||
and three new features were implemented. First, --filter was added to pt-kill
|
||||
which allows for arbitrary --group-by. Second, pt-online-schema-change now
|
||||
requires that its new --execute option be given, else the tool will just check
|
||||
the tables and exit. This is a safeguard to encourage users to read the
|
||||
documentation, particularly when replication is involved. Third, pt-stalk
|
||||
also received a new option: --[no]stalk. To collect immediately without
|
||||
stalking, specify --no-stalk and the tool will collect once and exit.
|
||||
|
||||
This release is completely backwards compatible with previous 2.0 releases.
|
||||
Given the number of bug fixes, it's worth upgrading to 2.0.4.
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Added --filter to pt-kill to allow arbitrary --group-by
|
||||
* Added --[no]stalk to pt-stalk (bug 932331)
|
||||
* Added --execute to pt-online-schema-change (bug 933232)
|
||||
* Fixed bug 873598: pt-online-schema-change doesn't like reserved words in column names
|
||||
* Fixed bug 928966: pt-pmp still uses insecure /tmp
|
||||
* Fixed bug 933232: pt-online-schema-change can break replication
|
||||
* Fixed bug 941225: Use of qw(...) as parentheses is deprecated at pt-kill line 3511
|
||||
* Fixed bug 821694: pt-query-digest doesn't recognize hex InnoDB txn IDs
|
||||
* Fixed bug 894255: pt-kill shouldn't check if STDIN is a tty when --daemonize is given
|
||||
* Fixed bug 916999: pt-table-checksum error: DBD::mysql::st execute failed: called with 2 bind variables when 6 are needed
|
||||
* Fixed bug 926598: DBD::mysql bug causes pt-upgrade to use wrong precision (M) and scale (D)
|
||||
* Fixed bug 928226: pt-diskstats illegal division by zero
|
||||
* Fixed bug 928415: Typo in pt-stalk doc: --trigger should be --function
|
||||
* Fixed bug 930317: pt-archiver doc refers to nonexistent pt-query-profiler
|
||||
* Fixed bug 930533: pt-sift looking for *-processlist1; broken compatibility with pt-stalk
|
||||
* Fixed bug 932331: pt-stalk cannot collect without stalking
|
||||
* Fixed bug 932442: pt-table-checksum error when column name has two spaces
|
||||
* Fixed bug 932883: File Debian bug after each release
|
||||
* Fixed bug 940503: pt-stalk disk space checks wrong on 32bit platforms
|
||||
* Fixed bug 944420: --daemonize doesn't always close STDIN
|
||||
* Fixed bug 945834: pt-sift invokes pt-diskstats with deprecated argument
|
||||
* Fixed bug 945836: pt-sift prints awk error if there are no stack traces to aggregate
|
||||
* Fixed bug 945842: pt-sift generates wrong state sum during processlist analysis
|
||||
* Fixed bug 946438: pt-query-digest should print a better message when an unsupported log format is specified
|
||||
* Fixed bug 946776: pt-table-checksum ignores --lock-wait-timeout
|
||||
* Fixed bug 940440: Bad grammar in pt-kill docs
|
||||
|
||||
v2.0.3 released 2012-02-03
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.0.3 has been released. The development team was very
|
||||
busy last month making this release significant: two completely
|
||||
redesigned and improved tools, pt-diskstats and pt-stalk, and 20 bug fixes.
|
||||
|
||||
Both pt-diskstats and pt-stalk were redesigned and rewritten from the ground
|
||||
up. This allowed us to greatly improve these tools' functionality and
|
||||
increase testing for them. The accuracy and output of pt-diskstats was
|
||||
enhanced, and the tool was rewritten in Perl. pt-collect was removed and
|
||||
its functionality was put into a new, enhanced pt-stalk. pt-stalk is now
|
||||
designed to be a stable, long-running daemon on a variety of common platforms.
|
||||
It is worth re-reading the documentation for each of these tools.
|
||||
|
||||
The 20 bug fixes cover a wide range of problems. The most important are
|
||||
fixes to pt-table-checksum, pt-iostats, and pt-kill. Apart from pt-diskstats,
|
||||
pt-stalk, and pt-collect (which was removed), no other tools were changed
|
||||
in backwards-incompatible ways, so it is worth reviewing the full changelog
|
||||
for this release and upgrading if you use any tools which had bug fixes.
|
||||
|
||||
Thank you to the many people who reported bugs and submitted patches.
|
||||
|
||||
Download the latest release of Percona Toolkit 2.0 from
|
||||
http://www.percona.com/software/percona-toolkit/
|
||||
or the Percona Software Repositories
|
||||
(http://www.percona.com/docs/wiki/repositories:start).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Completely redesigned pt-diskstats
|
||||
* Completely redesigned pt-stalk
|
||||
* Removed pt-collect and put its functionality in pt-stalk
|
||||
* Fixed bug 871438: Bash tools are insecure
|
||||
* Fixed bug 897758: Failed to prepare TableSyncChunk plugin: Use of uninitialized value $args{"chunk_range"} in lc at pt-table-sync line 3055
|
||||
* Fixed bug 919819: pt-kill --execute-command creates zombies
|
||||
* Fixed bug 925778: pt-ioprofile doesn't run without a file
|
||||
* Fixed bug 925477: pt-ioprofile docs refer to pt-iostats
|
||||
* Fixed bug 857091: pt-sift downloads http://percona.com/get/pt-pmp, which does not work
|
||||
* Fixed bug 857104: pt-sift tries to invoke mext, should be pt-mext
|
||||
* Fixed bug 872699: pt-diskstats: rd_avkb & wr_avkb derived incorrectly
|
||||
* Fixed bug 897029: pt-diskstats computes wrong values for md0
|
||||
* Fixed bug 882918: pt-stalk spams warning if oprofile isn't installed
|
||||
* Fixed bug 884504: pt-stalk doesn't check pt-collect
|
||||
* Fixed bug 897483: pt-online-schema-change "uninitialized value" due to update-foreign-keys-method
|
||||
* Fixed bug 925007: pt-online-schema-change Use of uninitialized value $tables{"old_table"} in concatenation (.) or string at line 4330
|
||||
* Fixed bug 915598: pt-config-diff ignores --ask-pass option
|
||||
* Fixed bug 919352: pt-table-checksum changes binlog_format even if already set to statement
|
||||
* Fixed bug 921700: pt-table-checksum doesn't add --where to chunk size test on replicas
|
||||
* Fixed bug 921802: pt-table-checksum does not recognize --recursion-method=processlist
|
||||
* Fixed bug 925855: pt-table-checksum index check is case-sensitive
|
||||
* Fixed bug 821709: pt-show-grants --revoke and --separate don't work together
|
||||
* Fixed bug 918247: Some tools use VALUE instead of VALUES
|
||||
|
||||
v2.0.2 released 2012-01-05
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.0.2 fixes one critical bug: pt-table-sync --replicate
|
||||
did not work with character values, causing an "Unknown column" error.
|
||||
If using Percona Toolkit 2.0.1, you should upgrade to 2.0.2.
|
||||
|
||||
Download the latest release of Percona Toolkit 2.0 from
|
||||
http://www.percona.com/software/percona-toolkit/
|
||||
or the Percona Software Repositories
|
||||
(http://www.percona.com/docs/wiki/repositories:start).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Fixed bug 911996: pt-table-sync --replicate causes "Unknown column" error
|
||||
|
||||
v2.0.1 released 2011-12-30
|
||||
==========================
|
||||
|
||||
The Percona Toolkit development team is proud to announce a new major version:
|
||||
2.0. Beginning with Percona Toolkit 2.0, we are overhauling, redesigning, and
|
||||
improving the major tools. 2.0 tools are therefore not backwards compatible
|
||||
with 1.0 tools, which we still support but will not continue to develop.
|
||||
|
||||
New in Percona Toolkit 2.0.1 is a completely redesigned pt-table-checksum.
|
||||
The original pt-table-checksum 1.0 was rather complex, but it worked well
|
||||
for many years. By contrast, the new pt-table-checksum 2.0 is much simpler but
|
||||
also much more efficient and reliable. We spent months rethinking, redesigning,
|
||||
and testing every aspect of the tool. The three most significant changes:
|
||||
pt-table-checksum 2.0 does only --replicate, it has only one chunking algorithm,
|
||||
and its memory usage is stable even with hundreds of thousands of tables and
|
||||
trillions of rows. The tool is now dedicated to verifying MySQL replication
|
||||
integrity, nothing else, which it does extremely well.
|
||||
|
||||
In Percona Toolkit 2.0.1 we also fixed various small bugs and forked ioprofile
|
||||
and align (as pt-ioprofile and pt-align) from Aspersa.
|
||||
|
||||
If you still need functionalities in the original pt-table-checksum,
|
||||
the latest Percona Toolkit 1.0 release remains available for download.
|
||||
Otherwise, all new development in Percona Toolkit will happen in 2.0.
|
||||
|
||||
Download the latest release of Percona Toolkit 2.0 from
|
||||
http://www.percona.com/software/percona-toolkit/
|
||||
or the Percona Software Repositories
|
||||
(http://www.percona.com/docs/wiki/repositories:start).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Completely redesigned pt-table-checksum
|
||||
* Fixed bug 856065: pt-trend does not work
|
||||
* Fixed bug 887688: Prepared statements crash pt-query-digest
|
||||
* Fixed bug 888286: align not part of percona-toolkit
|
||||
* Fixed bug 897961: ptc 2.0 replicate-check error does not include hostname
|
||||
* Fixed bug 898318: ptc 2.0 --resume with --tables does not always work
|
||||
* Fixed bug 903513: MKDEBUG should be PTDEBUG
|
||||
* Fixed bug 908256: Percona Toolkit should include pt-ioprofile
|
||||
* Fixed bug 821717: pt-tcp-model --type=requests crashes
|
||||
* Fixed bug 844038: pt-online-schema-change documentation example w/drop-tmp-table does not work
|
||||
* Fixed bug 864205: Remove the query to reset @crc from pt-table-checksum
|
||||
* Fixed bug 898663: Typo in pt-log-player documentation
|
||||
|
||||
v1.0.1 released 2011-09-01
|
||||
==========================
|
||||
|
||||
Percona Toolkit 1.0.1 has been released. In July, Baron announced planned
|
||||
changes to Maatkit and Aspersa development;[1] Percona Toolkit is the
|
||||
result. In brief, Percona Toolkit is the combined fork of Maatkit and
|
||||
Aspersa, so although the toolkit is new, the programs are not. That means
|
||||
Percona Toolkit 1.0.1 is mature, stable, and production-ready. In fact,
|
||||
it's even a little more stable because we fixed a few bugs in this release.
|
||||
|
||||
Percona Toolkit packages can be downloaded from
|
||||
http://www.percona.com/downloads/percona-toolkit/
|
||||
or the Percona Software Repositories
|
||||
(http://www.percona.com/docs/wiki/repositories:start).
|
||||
|
||||
Although Maatkit and Aspersa development use Google Code, Percona Toolkit
|
||||
uses Launchpad: https://launchpad.net/percona-toolkit
|
||||
|
||||
[1] http://www.xaprb.com/blog/2011/07/06/planned-change-in-maatkit-aspersa-development/
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Fixed bug 819421: MasterSlave::is_replication_thread() doesn't match all
|
||||
* Fixed bug 821673: pt-table-checksum doesn't include --where in min max queries
|
||||
* Fixed bug 821688: pt-table-checksum SELECT MIN MAX for char chunking is wrong
|
||||
* Fixed bug 838211: pt-collect: line 24: [: : integer expression expected
|
||||
* Fixed bug 838248: pt-collect creates a "5.1" file
|
||||
|
||||
v0.9.5 released 2011-08-04
|
||||
==========================
|
||||
|
||||
Percona Toolkit 0.9.5 represents the completed transition from Maatkit and Aspersa. There are no bug fixes or new features, but some features have been removed (like --save-results from pt-query-digest). This release is the starting point for the 1.0 series where new development will happen, and no more changes will be made to the 0.9 series.
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Forked, combined, and rebranded Maatkit and Aspersa as Percona Toolkit.
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Fixed bug 947893: Some tools use @@hostname without /*!50038*/
|
||||
* Fixed bug 1195034: pt-deadlock-logger error: Use of uninitialized value $ts in pattern match (m//)
|
||||
* Fixed bug 1163372: pt-heartbeat --utc --check always returns 0
|
||||
* Fixed bug 1137556: pt-heartbeat docs don't account for --utc
|
||||
* Fixed bug 1146324: pt-query-digest 2.1 typo in docs
|
||||
* Fixed bug 1171968: pt-query-digest docs don't mention --type=rawlog
|
||||
* Fixed bug 1199591: pt-table-checksum doesn't use non-unique index with highest cardinality
|
||||
* Fixed bug 1136559: pt-table-checksum: Deep recursion on subroutine "SchemaIterator::_iterate_dbh"
|
||||
|
||||
v2.1.10 released 2013-07-18
|
||||
===========================
|
||||
|
||||
Percona Toolkit 2.1.10 has been released. This release includes eight bug fixes.
|
||||
|
||||
* Fixed bug #1163372: pt-heartbeat --utc --check always returns 0
|
||||
|
||||
Unfortunately, the relatively new --utc option for pt-heart was still
|
||||
broken because "[MySQL] interprets date as a value in the current time zone
|
||||
and converts it to an internal value in UTC." Now the tool works correctly
|
||||
with --utc by specifying "SET time_zone='+0:00'", and older versions of
|
||||
the tool can be made to work by specifying --set-vars "time_zone='+0:00'".
|
||||
|
||||
* Fixed bug #1195034: pt-deadlock-logger error: Use of uninitialized value $ts in pattern match (m//)
|
||||
|
||||
Improved the pattern matching that caused the pt-deadlock-logger error when
|
||||
different timestamp format was used.
|
||||
|
||||
* Fixed bug #1199591: pt-table-checksum doesn't use non-unique index with highest cardinality
|
||||
|
||||
pt-table-checksum was using the first non-unique index instead of the one
|
||||
with the highest cardinality due to a sorting bug.
|
||||
|
||||
Percona Toolkit packages can be downloaded from
|
||||
http://www.percona.com/downloads/percona-toolkit/ or the Percona Software
|
||||
Repositories (http://www.percona.com/software/repositories/).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Fixed bug #1136559: pt-table-checksum: Deep recursion on subroutine "SchemaIterator::_iterate_dbh"
|
||||
* Fixed bug #1195034: pt-deadlock-logger error: Use of uninitialized value $ts in pattern match (m//)
|
||||
* Fixed bug #1163372: pt-heartbeat --utc --check always returns 0
|
||||
* Fixed bug #1199591: pt-table-checksum doesn't use non-unique index with highest cardinality
|
||||
* Fixed bug #947893: Some tools use @@hostname without /*!50038*/
|
||||
* Fixed bug #1137556: pt-heartbeat docs don't account for --utc
|
||||
* Fixed bug #1146324: pt-query-digest 2.1 typo in docs
|
||||
* Fixed bug #1171968: pt-query-digest docs don't mention --type=rawlog
|
||||
|
||||
v2.1.9 released 2013-02-14
|
||||
==========================
|
||||
|
||||
Percona Toolkit 2.1.9 has been released. This release primarily aims to
|
||||
restore backwards-compatibility with pt-heartbeat 2.1.7 and older, but it
|
||||
also has important bug fixes for other tools.
|
||||
|
||||
* Fixed bug 1103221: pt-heartbeat 2.1.8 doesn't use precision/sub-second timestamps
|
||||
* Fixed bug 1099665: pt-heartbeat 2.1.8 reports big time drift with UTC_TIMESTAMP
|
||||
|
||||
The previous release switched the time authority from Perl to MySQL, and from
|
||||
local time to UTC. Unfortunately, these changes caused a loss of precision and,
|
||||
if mixing versions of pt-heartbeat, made the tool report a huge amount of
|
||||
replication lag. This release makes the tool compatible with pt-heartbeat
|
||||
2.1.7 and older again, but the UTC behavior introduced in 2.1.8 is now only
|
||||
available by specifying the new --utc option.
|
||||
|
||||
* Fixed bug 918056: pt-table-sync false-positive error "Cannot nibble table because MySQL chose no index instead of the PRIMARY index"
|
||||
|
||||
This is an important bug fix for pt-table-sync: certain chunks from
|
||||
pt-table-checksum resulted in an impossible WHERE, causing the false-positive
|
||||
"Cannot nibble" error, if those chunks had diffs.
|
||||
|
||||
* Fixed bug 1099836: pt-online-schema-change fails with "Duplicate entry" on MariaDB
|
||||
|
||||
MariaDB 5.5.28 (https://kb.askmonty.org/en/mariadb-5528-changelog/) fixed
|
||||
a bug: "Added warnings for duplicate key errors when using INSERT IGNORE".
|
||||
However, standard MySQL does not warn in this case, despite the docs saying
|
||||
that it should. Since pt-online-schema-change has always intended to ignore
|
||||
duplicate entry errors by using "INSERT IGNORE", it now handles the MariaDB
|
||||
case by also ignoring duplicate entry errors in the code.
|
||||
|
||||
* Fixed bug 1103672: pt-online-schema-change makes bad DELETE trigger if PK is re-created with new columns
|
||||
|
||||
pt-online-schema-change 2.1.9 handles another case of changing the primary key.
|
||||
However, since changing the primary key is tricky, the tool stops if --alter
|
||||
contains "DROP PRIMARY KEY", and you have to specify --no-check-alter to
|
||||
acknowledge this case.
|
||||
|
||||
* Fixed bug 1099933: pt-stalk is too verbose, fills up log
|
||||
|
||||
Previously, pt-stalk printed a line for every check. Since the tool is
|
||||
designed to be a long-running daemon, this could result in huge log files
|
||||
with "matched=no" lines. The tool has a new --verbose option which makes it
|
||||
quieter by default.
|
||||
|
||||
All users should upgrade, but in particular, users of versions 2.1.7 and
|
||||
older are strongly recommended to skip 2.1.8 and go directly to 2.1.9.
|
||||
|
||||
Users of pt-heartbeat in 2.1.8 who prefer the UTC behavior should keep in
|
||||
mind that they will have to use the --utc option after upgrading.
|
||||
|
||||
Percona Toolkit packages can be downloaded from
|
||||
http://www.percona.com/downloads/percona-toolkit/ or the Percona Software
|
||||
Repositories (http://www.percona.com/software/repositories/).
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
* Fixed bug 1103221: pt-heartbeat 2.1.8 doesn't use precision/sub-second timestamps
|
||||
* Fixed bug 1099665: pt-heartbeat 2.1.8 reports big time drift with UTC_TIMESTAMP
|
||||
* Fixed bug 1099836: pt-online-schema-change fails with "Duplicate entry" on MariaDB
|
||||
* Fixed bug 1103672: pt-online-schema-change makes bad DELETE trigger if PK is re-created with new columns
|
||||
* Fixed bug 1115333: pt-pmp doesn't list the origin lib for each function
|
||||
* Fixed bug 823411: pt-query-digest shouldn't print "Error: none" for tcpdump
|
||||
* Fixed bug 1103045: pt-query-digest fails to parse non-SQL errors
|
||||
* Fixed bug 1105077: pt-table-checksum: Confusing error message with binlog_format ROW or MIXED on slave
|
||||
* Fixed bug 918056: pt-table-sync false-positive error "Cannot nibble table because MySQL chose no index instead of the PRIMARY index"
|
||||
* Fixed bug 1099933: pt-stalk is too verbose, fills up log
|
||||
|
||||
v2.1.8 released 2012-12-21
|
||||
==========================
|
||||
|
||||
|
@@ -155,9 +155,9 @@ sub set_dbh {
|
||||
|
||||
# Update the cxn's name. Until we connect, the DSN parts
|
||||
# h and P are used. Once connected, use @@hostname.
|
||||
my $sql = 'SELECT @@hostname, @@server_id';
|
||||
my $sql = 'SELECT @@server_id /*!50038 , @@hostname*/';
|
||||
PTDEBUG && _d($dbh, $sql);
|
||||
my ($hostname, $server_id) = $dbh->selectrow_array($sql);
|
||||
my ($server_id, $hostname) = $dbh->selectrow_array($sql);
|
||||
PTDEBUG && _d($dbh, 'hostname:', $hostname, $server_id);
|
||||
if ( $hostname ) {
|
||||
$self->{hostname} = $hostname;
|
||||
|
@@ -554,7 +554,7 @@ sub _find_best_index {
|
||||
@possible_indexes = sort {
|
||||
# Prefer the index with the highest cardinality.
|
||||
my $cmp
|
||||
= $indexes->{$b}->{cardinality} <=> $indexes->{$b}->{cardinality};
|
||||
= $indexes->{$b}->{cardinality} <=> $indexes->{$a}->{cardinality};
|
||||
if ( $cmp == 0 ) {
|
||||
# Indexes have the same cardinality; prefer the one with
|
||||
# more columns.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# This program is copyright 2012 Percona Inc.
|
||||
# This program is copyright 2012-2013 Percona Ireland Ltd.
|
||||
# Feedback and improvements are welcome.
|
||||
#
|
||||
# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
@@ -19,7 +19,7 @@
|
||||
# ###########################################################################
|
||||
{
|
||||
package Percona::Toolkit;
|
||||
our $VERSION = '2.1.8';
|
||||
our $VERSION = '2.1.10';
|
||||
|
||||
1;
|
||||
}
|
||||
|
@@ -334,64 +334,67 @@ sub _iterate_dbh {
|
||||
$self->{dbs} = \@dbs;
|
||||
}
|
||||
|
||||
if ( !$self->{db} ) {
|
||||
$self->{db} = shift @{$self->{dbs}};
|
||||
PTDEBUG && _d('Next database:', $self->{db});
|
||||
return unless $self->{db};
|
||||
}
|
||||
|
||||
if ( !defined $self->{tbls} ) {
|
||||
my $sql = 'SHOW /*!50002 FULL*/ TABLES FROM ' . $q->quote($self->{db});
|
||||
PTDEBUG && _d($sql);
|
||||
my @tbls = map {
|
||||
$_->[0]; # (tbl, type)
|
||||
DATABASE:
|
||||
while ( $self->{db} || defined(my $db = shift @{$self->{dbs}}) ) {
|
||||
if ( !$self->{db} ) {
|
||||
PTDEBUG && _d('Next database:', $db);
|
||||
$self->{db} = $db;
|
||||
}
|
||||
grep {
|
||||
my ($tbl, $type) = @$_;
|
||||
(!$type || ($type ne 'VIEW'))
|
||||
&& $self->_resume_from_table($tbl)
|
||||
&& $self->table_is_allowed($self->{db}, $tbl);
|
||||
}
|
||||
@{$dbh->selectall_arrayref($sql)};
|
||||
PTDEBUG && _d('Found', scalar @tbls, 'tables in database', $self->{db});
|
||||
$self->{tbls} = \@tbls;
|
||||
}
|
||||
|
||||
while ( my $tbl = shift @{$self->{tbls}} ) {
|
||||
my $ddl = eval { $tp->get_create_table($dbh, $self->{db}, $tbl) };
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
my $table_name = "$self->{db}.$tbl";
|
||||
# SHOW CREATE TABLE failed. This is a bit puzzling;
|
||||
# maybe the table got dropped, or crashed. Not much we can
|
||||
# do about it; If the table is missing, just PTDEBUG it, but
|
||||
# otherwise, warn with the error.
|
||||
if ( $e =~ /\QTable '$table_name' doesn't exist/ ) {
|
||||
PTDEBUG && _d("Skipping $table_name because it no longer exists");
|
||||
if ( !$self->{tbls} ) {
|
||||
my $sql = 'SHOW /*!50002 FULL*/ TABLES FROM ' . $q->quote($self->{db});
|
||||
PTDEBUG && _d($sql);
|
||||
my @tbls = map {
|
||||
$_->[0]; # (tbl, type)
|
||||
}
|
||||
else {
|
||||
warn "Skipping $table_name because SHOW CREATE TABLE failed: $e";
|
||||
grep {
|
||||
my ($tbl, $type) = @$_;
|
||||
(!$type || ($type ne 'VIEW'))
|
||||
&& $self->_resume_from_table($tbl)
|
||||
&& $self->table_is_allowed($self->{db}, $tbl);
|
||||
}
|
||||
next;
|
||||
@{$dbh->selectall_arrayref($sql)};
|
||||
PTDEBUG && _d('Found', scalar @tbls, 'tables in database',$self->{db});
|
||||
$self->{tbls} = \@tbls;
|
||||
}
|
||||
my $tbl_struct = $tp->parse($ddl);
|
||||
if ( $self->engine_is_allowed($tbl_struct->{engine}) ) {
|
||||
return {
|
||||
db => $self->{db},
|
||||
tbl => $tbl,
|
||||
name => $q->quote($self->{db}, $tbl),
|
||||
ddl => $ddl,
|
||||
tbl_struct => $tbl_struct,
|
||||
};
|
||||
|
||||
TABLE:
|
||||
while ( my $tbl = shift @{$self->{tbls}} ) {
|
||||
my $ddl = eval { $tp->get_create_table($dbh, $self->{db}, $tbl) };
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
my $table_name = "$self->{db}.$tbl";
|
||||
# SHOW CREATE TABLE failed. This is a bit puzzling;
|
||||
# maybe the table got dropped, or crashed. Not much we can
|
||||
# do about it; If the table is missing, just PTDEBUG it, but
|
||||
# otherwise, warn with the error.
|
||||
if ( $e =~ /\QTable '$table_name' doesn't exist/ ) {
|
||||
PTDEBUG && _d("$table_name no longer exists");
|
||||
}
|
||||
else {
|
||||
warn "Skipping $table_name because SHOW CREATE TABLE failed: $e";
|
||||
}
|
||||
next TABLE;
|
||||
}
|
||||
|
||||
my $tbl_struct = $tp->parse($ddl);
|
||||
if ( $self->engine_is_allowed($tbl_struct->{engine}) ) {
|
||||
return {
|
||||
db => $self->{db},
|
||||
tbl => $tbl,
|
||||
name => $q->quote($self->{db}, $tbl),
|
||||
ddl => $ddl,
|
||||
tbl_struct => $tbl_struct,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PTDEBUG && _d('No more tables in database', $self->{db});
|
||||
$self->{db} = undef;
|
||||
$self->{tbls} = undef;
|
||||
PTDEBUG && _d('No more tables in database', $self->{db});
|
||||
$self->{db} = undef;
|
||||
$self->{tbls} = undef;
|
||||
} # DATABASE
|
||||
|
||||
# Recurse to get the next database. If there's no next db, then the
|
||||
# call will return undef and we'll return undef, too.
|
||||
return $self->_iterate_dbh();
|
||||
PTDEBUG && _d('No more databases');
|
||||
return;
|
||||
}
|
||||
|
||||
sub database_is_allowed {
|
||||
|
@@ -38,9 +38,6 @@ my $dbh = $sb->get_dbh_for('master');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
}
|
||||
else {
|
||||
plan tests => 54;
|
||||
}
|
||||
|
||||
my $q = new Quoter();
|
||||
my $tp = new TableParser(Quoter=>$q);
|
||||
@@ -831,6 +828,26 @@ is_deeply(
|
||||
"Bug 995274: nibble iter works"
|
||||
);
|
||||
|
||||
|
||||
# #############################################################################
|
||||
# pt-table-checksum doesn't use non-unique index with highest cardinality
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1199591
|
||||
# #############################################################################
|
||||
|
||||
diag(`/tmp/12345/use < $trunk/t/lib/samples/cardinality.sql >/dev/null`);
|
||||
|
||||
$ni = make_nibble_iter(
|
||||
db => 'cardb',
|
||||
tbl => 't',
|
||||
argv => [qw(--databases cardb --chunk-size 2)],
|
||||
);
|
||||
|
||||
is(
|
||||
$ni->{index},
|
||||
'b',
|
||||
"Use non-unique index with highest cardinality (bug 1199591)"
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
@@ -846,4 +863,4 @@ like(
|
||||
);
|
||||
$sb->wipe_clean($dbh);
|
||||
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
||||
exit;
|
||||
done_testing;
|
||||
|
@@ -547,10 +547,24 @@ eval {
|
||||
|
||||
diag(`$trunk/sandbox/stop-sandbox $master3_port >/dev/null`);
|
||||
|
||||
# #############################################################################
|
||||
# Bug 1136559: Deep recursion on subroutine "SchemaIterator::_iterate_dbh"
|
||||
# #############################################################################
|
||||
|
||||
$sb->wipe_clean($dbh);
|
||||
diag(`/tmp/12345/use < $trunk/t/lib/samples/100-dbs.sql`);
|
||||
|
||||
test_so(
|
||||
filters => [],
|
||||
result => "foo001.bar001 ",
|
||||
lives_ok => 1,
|
||||
test_name => "Bug 1136559: Deep recursion on subroutine SchemaIterator::_iterate_dbh",
|
||||
);
|
||||
|
||||
diag(`/tmp/12345/use < $trunk/t/lib/samples/100-dbs-drop.sql`);
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
||||
|
||||
done_testing;
|
||||
exit;
|
||||
|
100
t/lib/samples/100-dbs-drop.sql
Normal file
100
t/lib/samples/100-dbs-drop.sql
Normal file
@@ -0,0 +1,100 @@
|
||||
DROP DATABASE IF EXISTS foo001;
|
||||
DROP DATABASE IF EXISTS foo002;
|
||||
DROP DATABASE IF EXISTS foo003;
|
||||
DROP DATABASE IF EXISTS foo004;
|
||||
DROP DATABASE IF EXISTS foo005;
|
||||
DROP DATABASE IF EXISTS foo006;
|
||||
DROP DATABASE IF EXISTS foo007;
|
||||
DROP DATABASE IF EXISTS foo008;
|
||||
DROP DATABASE IF EXISTS foo009;
|
||||
DROP DATABASE IF EXISTS foo010;
|
||||
DROP DATABASE IF EXISTS foo011;
|
||||
DROP DATABASE IF EXISTS foo012;
|
||||
DROP DATABASE IF EXISTS foo013;
|
||||
DROP DATABASE IF EXISTS foo014;
|
||||
DROP DATABASE IF EXISTS foo015;
|
||||
DROP DATABASE IF EXISTS foo016;
|
||||
DROP DATABASE IF EXISTS foo017;
|
||||
DROP DATABASE IF EXISTS foo018;
|
||||
DROP DATABASE IF EXISTS foo019;
|
||||
DROP DATABASE IF EXISTS foo020;
|
||||
DROP DATABASE IF EXISTS foo021;
|
||||
DROP DATABASE IF EXISTS foo022;
|
||||
DROP DATABASE IF EXISTS foo023;
|
||||
DROP DATABASE IF EXISTS foo024;
|
||||
DROP DATABASE IF EXISTS foo025;
|
||||
DROP DATABASE IF EXISTS foo026;
|
||||
DROP DATABASE IF EXISTS foo027;
|
||||
DROP DATABASE IF EXISTS foo028;
|
||||
DROP DATABASE IF EXISTS foo029;
|
||||
DROP DATABASE IF EXISTS foo030;
|
||||
DROP DATABASE IF EXISTS foo031;
|
||||
DROP DATABASE IF EXISTS foo032;
|
||||
DROP DATABASE IF EXISTS foo033;
|
||||
DROP DATABASE IF EXISTS foo034;
|
||||
DROP DATABASE IF EXISTS foo035;
|
||||
DROP DATABASE IF EXISTS foo036;
|
||||
DROP DATABASE IF EXISTS foo037;
|
||||
DROP DATABASE IF EXISTS foo038;
|
||||
DROP DATABASE IF EXISTS foo039;
|
||||
DROP DATABASE IF EXISTS foo040;
|
||||
DROP DATABASE IF EXISTS foo041;
|
||||
DROP DATABASE IF EXISTS foo042;
|
||||
DROP DATABASE IF EXISTS foo043;
|
||||
DROP DATABASE IF EXISTS foo044;
|
||||
DROP DATABASE IF EXISTS foo045;
|
||||
DROP DATABASE IF EXISTS foo046;
|
||||
DROP DATABASE IF EXISTS foo047;
|
||||
DROP DATABASE IF EXISTS foo048;
|
||||
DROP DATABASE IF EXISTS foo049;
|
||||
DROP DATABASE IF EXISTS foo050;
|
||||
DROP DATABASE IF EXISTS foo051;
|
||||
DROP DATABASE IF EXISTS foo052;
|
||||
DROP DATABASE IF EXISTS foo053;
|
||||
DROP DATABASE IF EXISTS foo054;
|
||||
DROP DATABASE IF EXISTS foo055;
|
||||
DROP DATABASE IF EXISTS foo056;
|
||||
DROP DATABASE IF EXISTS foo057;
|
||||
DROP DATABASE IF EXISTS foo058;
|
||||
DROP DATABASE IF EXISTS foo059;
|
||||
DROP DATABASE IF EXISTS foo060;
|
||||
DROP DATABASE IF EXISTS foo061;
|
||||
DROP DATABASE IF EXISTS foo062;
|
||||
DROP DATABASE IF EXISTS foo063;
|
||||
DROP DATABASE IF EXISTS foo064;
|
||||
DROP DATABASE IF EXISTS foo065;
|
||||
DROP DATABASE IF EXISTS foo066;
|
||||
DROP DATABASE IF EXISTS foo067;
|
||||
DROP DATABASE IF EXISTS foo068;
|
||||
DROP DATABASE IF EXISTS foo069;
|
||||
DROP DATABASE IF EXISTS foo070;
|
||||
DROP DATABASE IF EXISTS foo071;
|
||||
DROP DATABASE IF EXISTS foo072;
|
||||
DROP DATABASE IF EXISTS foo073;
|
||||
DROP DATABASE IF EXISTS foo074;
|
||||
DROP DATABASE IF EXISTS foo075;
|
||||
DROP DATABASE IF EXISTS foo076;
|
||||
DROP DATABASE IF EXISTS foo077;
|
||||
DROP DATABASE IF EXISTS foo078;
|
||||
DROP DATABASE IF EXISTS foo079;
|
||||
DROP DATABASE IF EXISTS foo080;
|
||||
DROP DATABASE IF EXISTS foo081;
|
||||
DROP DATABASE IF EXISTS foo082;
|
||||
DROP DATABASE IF EXISTS foo083;
|
||||
DROP DATABASE IF EXISTS foo084;
|
||||
DROP DATABASE IF EXISTS foo085;
|
||||
DROP DATABASE IF EXISTS foo086;
|
||||
DROP DATABASE IF EXISTS foo087;
|
||||
DROP DATABASE IF EXISTS foo088;
|
||||
DROP DATABASE IF EXISTS foo089;
|
||||
DROP DATABASE IF EXISTS foo090;
|
||||
DROP DATABASE IF EXISTS foo091;
|
||||
DROP DATABASE IF EXISTS foo092;
|
||||
DROP DATABASE IF EXISTS foo093;
|
||||
DROP DATABASE IF EXISTS foo094;
|
||||
DROP DATABASE IF EXISTS foo095;
|
||||
DROP DATABASE IF EXISTS foo096;
|
||||
DROP DATABASE IF EXISTS foo097;
|
||||
DROP DATABASE IF EXISTS foo098;
|
||||
DROP DATABASE IF EXISTS foo099;
|
||||
DROP DATABASE IF EXISTS foo100;
|
105
t/lib/samples/100-dbs.sql
Normal file
105
t/lib/samples/100-dbs.sql
Normal file
@@ -0,0 +1,105 @@
|
||||
CREATE DATABASE IF NOT EXISTS foo001;
|
||||
CREATE DATABASE IF NOT EXISTS foo002;
|
||||
CREATE DATABASE IF NOT EXISTS foo003;
|
||||
CREATE DATABASE IF NOT EXISTS foo004;
|
||||
CREATE DATABASE IF NOT EXISTS foo005;
|
||||
CREATE DATABASE IF NOT EXISTS foo006;
|
||||
CREATE DATABASE IF NOT EXISTS foo007;
|
||||
CREATE DATABASE IF NOT EXISTS foo008;
|
||||
CREATE DATABASE IF NOT EXISTS foo009;
|
||||
CREATE DATABASE IF NOT EXISTS foo010;
|
||||
CREATE DATABASE IF NOT EXISTS foo011;
|
||||
CREATE DATABASE IF NOT EXISTS foo012;
|
||||
CREATE DATABASE IF NOT EXISTS foo013;
|
||||
CREATE DATABASE IF NOT EXISTS foo014;
|
||||
CREATE DATABASE IF NOT EXISTS foo015;
|
||||
CREATE DATABASE IF NOT EXISTS foo016;
|
||||
CREATE DATABASE IF NOT EXISTS foo017;
|
||||
CREATE DATABASE IF NOT EXISTS foo018;
|
||||
CREATE DATABASE IF NOT EXISTS foo019;
|
||||
CREATE DATABASE IF NOT EXISTS foo020;
|
||||
CREATE DATABASE IF NOT EXISTS foo021;
|
||||
CREATE DATABASE IF NOT EXISTS foo022;
|
||||
CREATE DATABASE IF NOT EXISTS foo023;
|
||||
CREATE DATABASE IF NOT EXISTS foo024;
|
||||
CREATE DATABASE IF NOT EXISTS foo025;
|
||||
CREATE DATABASE IF NOT EXISTS foo026;
|
||||
CREATE DATABASE IF NOT EXISTS foo027;
|
||||
CREATE DATABASE IF NOT EXISTS foo028;
|
||||
CREATE DATABASE IF NOT EXISTS foo029;
|
||||
CREATE DATABASE IF NOT EXISTS foo030;
|
||||
CREATE DATABASE IF NOT EXISTS foo031;
|
||||
CREATE DATABASE IF NOT EXISTS foo032;
|
||||
CREATE DATABASE IF NOT EXISTS foo033;
|
||||
CREATE DATABASE IF NOT EXISTS foo034;
|
||||
CREATE DATABASE IF NOT EXISTS foo035;
|
||||
CREATE DATABASE IF NOT EXISTS foo036;
|
||||
CREATE DATABASE IF NOT EXISTS foo037;
|
||||
CREATE DATABASE IF NOT EXISTS foo038;
|
||||
CREATE DATABASE IF NOT EXISTS foo039;
|
||||
CREATE DATABASE IF NOT EXISTS foo040;
|
||||
CREATE DATABASE IF NOT EXISTS foo041;
|
||||
CREATE DATABASE IF NOT EXISTS foo042;
|
||||
CREATE DATABASE IF NOT EXISTS foo043;
|
||||
CREATE DATABASE IF NOT EXISTS foo044;
|
||||
CREATE DATABASE IF NOT EXISTS foo045;
|
||||
CREATE DATABASE IF NOT EXISTS foo046;
|
||||
CREATE DATABASE IF NOT EXISTS foo047;
|
||||
CREATE DATABASE IF NOT EXISTS foo048;
|
||||
CREATE DATABASE IF NOT EXISTS foo049;
|
||||
CREATE DATABASE IF NOT EXISTS foo050;
|
||||
CREATE DATABASE IF NOT EXISTS foo051;
|
||||
CREATE DATABASE IF NOT EXISTS foo052;
|
||||
CREATE DATABASE IF NOT EXISTS foo053;
|
||||
CREATE DATABASE IF NOT EXISTS foo054;
|
||||
CREATE DATABASE IF NOT EXISTS foo055;
|
||||
CREATE DATABASE IF NOT EXISTS foo056;
|
||||
CREATE DATABASE IF NOT EXISTS foo057;
|
||||
CREATE DATABASE IF NOT EXISTS foo058;
|
||||
CREATE DATABASE IF NOT EXISTS foo059;
|
||||
CREATE DATABASE IF NOT EXISTS foo060;
|
||||
CREATE DATABASE IF NOT EXISTS foo061;
|
||||
CREATE DATABASE IF NOT EXISTS foo062;
|
||||
CREATE DATABASE IF NOT EXISTS foo063;
|
||||
CREATE DATABASE IF NOT EXISTS foo064;
|
||||
CREATE DATABASE IF NOT EXISTS foo065;
|
||||
CREATE DATABASE IF NOT EXISTS foo066;
|
||||
CREATE DATABASE IF NOT EXISTS foo067;
|
||||
CREATE DATABASE IF NOT EXISTS foo068;
|
||||
CREATE DATABASE IF NOT EXISTS foo069;
|
||||
CREATE DATABASE IF NOT EXISTS foo070;
|
||||
CREATE DATABASE IF NOT EXISTS foo071;
|
||||
CREATE DATABASE IF NOT EXISTS foo072;
|
||||
CREATE DATABASE IF NOT EXISTS foo073;
|
||||
CREATE DATABASE IF NOT EXISTS foo074;
|
||||
CREATE DATABASE IF NOT EXISTS foo075;
|
||||
CREATE DATABASE IF NOT EXISTS foo076;
|
||||
CREATE DATABASE IF NOT EXISTS foo077;
|
||||
CREATE DATABASE IF NOT EXISTS foo078;
|
||||
CREATE DATABASE IF NOT EXISTS foo079;
|
||||
CREATE DATABASE IF NOT EXISTS foo080;
|
||||
CREATE DATABASE IF NOT EXISTS foo081;
|
||||
CREATE DATABASE IF NOT EXISTS foo082;
|
||||
CREATE DATABASE IF NOT EXISTS foo083;
|
||||
CREATE DATABASE IF NOT EXISTS foo084;
|
||||
CREATE DATABASE IF NOT EXISTS foo085;
|
||||
CREATE DATABASE IF NOT EXISTS foo086;
|
||||
CREATE DATABASE IF NOT EXISTS foo087;
|
||||
CREATE DATABASE IF NOT EXISTS foo088;
|
||||
CREATE DATABASE IF NOT EXISTS foo089;
|
||||
CREATE DATABASE IF NOT EXISTS foo090;
|
||||
CREATE DATABASE IF NOT EXISTS foo091;
|
||||
CREATE DATABASE IF NOT EXISTS foo092;
|
||||
CREATE DATABASE IF NOT EXISTS foo093;
|
||||
CREATE DATABASE IF NOT EXISTS foo094;
|
||||
CREATE DATABASE IF NOT EXISTS foo095;
|
||||
CREATE DATABASE IF NOT EXISTS foo096;
|
||||
CREATE DATABASE IF NOT EXISTS foo097;
|
||||
CREATE DATABASE IF NOT EXISTS foo098;
|
||||
CREATE DATABASE IF NOT EXISTS foo099;
|
||||
CREATE DATABASE IF NOT EXISTS foo100;
|
||||
CREATE TABLE IF NOT EXISTS foo001.bar001 (
|
||||
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`value` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
49
t/lib/samples/cardinality.sql
Normal file
49
t/lib/samples/cardinality.sql
Normal file
@@ -0,0 +1,49 @@
|
||||
DROP DATABASE IF EXISTS cardb;
|
||||
CREATE DATABASE cardb;
|
||||
USE cardb;
|
||||
CREATE TABLE t (
|
||||
high INT UNSIGNED NOT NULL,
|
||||
low INT UNSIGNED NOT NULL,
|
||||
INDEX a (low),
|
||||
INDEX b (high),
|
||||
INDEX c (low)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t VALUES
|
||||
(1, 1),
|
||||
(2, 1),
|
||||
(3, 1),
|
||||
(4, 1),
|
||||
(5, 1),
|
||||
(6, 1),
|
||||
(7, 1),
|
||||
(8, 1),
|
||||
(9, 1),
|
||||
(10, 1),
|
||||
(11, 1),
|
||||
(12, 1),
|
||||
(13, 1),
|
||||
(14, 1),
|
||||
(15, 1),
|
||||
(16, 1),
|
||||
(17, 1),
|
||||
(18, 1),
|
||||
(19, 1),
|
||||
(20, 1),
|
||||
(21, 2),
|
||||
(22, 2),
|
||||
(23, 2),
|
||||
(24, 2),
|
||||
(25, 2),
|
||||
(26, 2),
|
||||
(27, 2),
|
||||
(28, 2),
|
||||
(29, 2),
|
||||
(30, 2),
|
||||
(31, 2),
|
||||
(32, 2),
|
||||
(33, 2),
|
||||
(34, 2),
|
||||
(35, 2),
|
||||
(36, 2),
|
||||
(37, 2);
|
||||
ANALYZE TABLE t;
|
@@ -15,6 +15,8 @@ use PerconaTest;
|
||||
use Sandbox;
|
||||
require "$trunk/bin/pt-deadlock-logger";
|
||||
|
||||
use Data::Dumper;
|
||||
|
||||
# #############################################################################
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/903443
|
||||
# pt-deadlock-logger crashes on MySQL 5.5
|
||||
@@ -119,6 +121,21 @@ is_deeply(
|
||||
"Bug 1082104: pt-deadlock-logger shows host as user when the username has a dash in the name",
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1195034
|
||||
# pt-deadlock-logger error: Use of uninitialized value $ts in pattern match
|
||||
# #############################################################################
|
||||
|
||||
$innodb_status_sample = load_file("t/pt-deadlock-logger/samples/bug_1195034.txt");
|
||||
my $deadlocks = pt_deadlock_logger::parse_deadlocks($innodb_status_sample);
|
||||
|
||||
is_deeply(
|
||||
$deadlocks,
|
||||
{
|
||||
},
|
||||
"Bug 1195034: TOO DEEP OR LONG SEARCH IN THE LOCK TABLE WAITS-FOR GRAPH"
|
||||
) or diag(Dumper($deadlocks));
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
|
14
t/pt-deadlock-logger/samples/bug_1195034.txt
Normal file
14
t/pt-deadlock-logger/samples/bug_1195034.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
------------------------
|
||||
LATEST DETECTED DEADLOCK
|
||||
------------------------
|
||||
130624 17:39:24TOO DEEP OR LONG SEARCH IN THE LOCK TABLE WAITS-FOR GRAPH, WE WILL ROLL BACK FOLLOWING TRANSACTION
|
||||
|
||||
*** TRANSACTION:
|
||||
TRANSACTION 3BF88F886, ACTIVE 0 sec setting auto-inc lock
|
||||
mysql tables in use 1, locked 1
|
||||
1 lock struct(s), heap size 376, 0 row lock(s)
|
||||
MySQL thread id 23512694, OS thread handle 0x5055b940, query id 734303798 10.10.10.1 host update
|
||||
INSERT INTO gr_v3_response_log (query_key, time_received, time_to_respond, status, raw_response, api_host, api_path, api_client) VALUES ('...
|
||||
*** WAITING FOR THIS LOCK TO BE GRANTED:
|
||||
TABLE LOCK table `db`.`gr_v3_response_log` trx id 3BF88F886 lock mode AUTO-INC waiting
|
@@ -55,7 +55,7 @@ sub start_update_instance {
|
||||
my $cmd = "$trunk/bin/pt-heartbeat";
|
||||
exec { $cmd } $cmd, qw(-h 127.0.0.1 -u msandbox -p msandbox -P), $port,
|
||||
qw(--database test --table heartbeat --create-table),
|
||||
qw(--update --interval 0.5 --pid), $pidfile;
|
||||
qw(--utc --update --interval 0.5 --pid), $pidfile;
|
||||
exit 1;
|
||||
}
|
||||
push @exec_pids, $pid;
|
||||
@@ -131,6 +131,43 @@ like(
|
||||
"Hi-res timestamp (bug 1103221)"
|
||||
);
|
||||
|
||||
|
||||
# #############################################################################
|
||||
# Bug 1163372: pt-heartbeat --utc --check always returns 0
|
||||
# #############################################################################
|
||||
|
||||
my ($sec, $min, $hour, $mday, $mon, $year) = gmtime(time);
|
||||
$mon += 1;
|
||||
$year += 1900;
|
||||
|
||||
# Make the ts seem like it 1 hour ago, so the output should show at least
|
||||
# 1 hour lag, i.e. 1.00, or maybe 1.02 etc. on a slow test box, but definately
|
||||
# not 0.\d+.
|
||||
$hour -= 1;
|
||||
|
||||
my $old_utc_ts = sprintf(
|
||||
"%d-%02d-%02dT%02d:%02d:%02d",
|
||||
$year, $mon, $mday, $hour, $min, $sec);
|
||||
|
||||
$master_dbh->do("truncate table test.heartbeat");
|
||||
$master_dbh->do("insert into test.heartbeat (ts, server_id) values ('$old_utc_ts', 1)");
|
||||
$sb->wait_for_slaves;
|
||||
|
||||
($output) = output(
|
||||
sub {
|
||||
pt_heartbeat::main(
|
||||
$slave1_dsn, qw(--database test --table heartbeat),
|
||||
qw(--utc --check --master-server-id), $master_port
|
||||
)
|
||||
},
|
||||
);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/^1\.\d+/,
|
||||
"--utc --check (bug 1163372"
|
||||
);
|
||||
|
||||
# ############################################################################
|
||||
# Done.
|
||||
# ############################################################################
|
@@ -6,21 +6,21 @@ use English qw(-no_match_vars);
|
||||
|
||||
eval {
|
||||
my ($year, $copyright) = @ARGV;
|
||||
my ($years) = $copyright =~ m/(\S+) Percona Inc./;
|
||||
my ($years) = $copyright =~ m/(\S+) Percona Ireland Ltd/;
|
||||
my ($first_year, $last_year) = split /-/, $years;
|
||||
|
||||
my $new_copyright;
|
||||
if ( $first_year && $last_year ) {
|
||||
$new_copyright = "$first_year-$year Percona Inc."
|
||||
$new_copyright = "$first_year-$year Percona Ireland Ltd"
|
||||
}
|
||||
elsif ( $first_year < $year ) {
|
||||
$new_copyright = "$first_year-$year Percona Inc."
|
||||
$new_copyright = "$first_year-$year Percona Ireland Ltd"
|
||||
}
|
||||
else {
|
||||
$new_copyright = "$first_year Percona Inc."
|
||||
$new_copyright = "$first_year Percona Ireland Ltd"
|
||||
}
|
||||
|
||||
$copyright =~ s/\S+ Percona Inc./$new_copyright/;
|
||||
$copyright =~ s/\S+ Percona Ireland Ltd/$new_copyright/;
|
||||
print $copyright;
|
||||
};
|
||||
die $EVAL_ERROR if $EVAL_ERROR;
|
||||
|
Reference in New Issue
Block a user