Build percona-toolkit-2.1.8

This commit is contained in:
Brian Fraser
2012-12-21 14:38:09 -03:00
parent 0ff46fd3da
commit 76301871ec
42 changed files with 295 additions and 91 deletions

View File

@@ -46,7 +46,7 @@ BEGIN {
# ###########################################################################
{
package Percona::Toolkit;
our $VERSION = '2.1.7';
our $VERSION = '2.1.8';
1;
}
@@ -1727,14 +1727,25 @@ sub parse_event {
if ( !$found_arg && $pos == $len ) {
PTDEBUG && _d("Did not find arg, looking for special cases");
local $INPUT_RECORD_SEPARATOR = ";\n";
local $INPUT_RECORD_SEPARATOR = ";\n"; # get next line
if ( defined(my $l = $next_event->()) ) {
chomp $l;
$l =~ s/^\s+//;
PTDEBUG && _d("Found admin statement", $l);
push @properties, 'cmd', 'Admin', 'arg', $l;
push @properties, 'bytes', length($properties[-1]);
$found_arg++;
if ( $l =~ /^\s*[A-Z][a-z_]+: / ) {
PTDEBUG && _d("Found NULL query before", $l);
local $INPUT_RECORD_SEPARATOR = ";\n#";
my $rest_of_event = $next_event->();
push @{$self->{pending}}, $l . $rest_of_event;
push @properties, 'cmd', 'Query', 'arg', '/* No query */';
push @properties, 'bytes', 0;
$found_arg++;
}
else {
chomp $l;
$l =~ s/^\s+//;
PTDEBUG && _d("Found admin statement", $l);
push @properties, 'cmd', 'Admin', 'arg', $l;
push @properties, 'bytes', length($properties[-1]);
$found_arg++;
}
}
else {
PTDEBUG && _d("I can't figure out what to do with this line");
@@ -1890,7 +1901,8 @@ sub parse_event {
$cmd = $arg;
}
else {
my ($user, undef, $db) = $arg =~ /(\S+)/g;
my ($user) = $arg =~ m/(\S+)/;
my ($db) = $arg =~ m/on (\S+)/;
my $host;
($user, $host) = split(/@/, $user);
PTDEBUG && _d('Connect', $user, '@', $host, 'on', $db);
@@ -2907,6 +2919,9 @@ sub parse_timestamp {
. (defined $f ? '%09.6f' : '%02d'),
$y + 2000, $m, $d, $h, $i, (defined $f ? $s + $f : $s);
}
elsif ( $val =~ m/^$proper_ts$/ ) {
return $val;
}
return $val;
}
@@ -8713,6 +8728,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-query-advisor 2.1.7
pt-query-advisor 2.1.8
=cut