=== modified file 'bin/pt-kill' --- bin/pt-kill 2014-11-07 16:55:56 +0000 +++ bin/pt-kill 2014-11-11 17:28:56 +0000 @@ -4007,7 +4007,7 @@ die "You do not have the PROCESS privilege"; } - $sql = 'SHOW PROCESSLIST'; + $sql = 'SHOW FULL PROCESSLIST'; PTDEBUG && _d($dbh, $sql); grep { $_->{command} =~ m/Binlog Dump/i } map { # Lowercase the column names @@ -6567,6 +6567,7 @@ use English qw(-no_match_vars); use POSIX qw(setsid); use List::Util qw(max); +use Digest::MD5 qw(md5_hex); use Data::Dumper; $Data::Dumper::Indent = 1; @@ -7101,6 +7102,11 @@ $query->{Id}, ($query->{Command} || 'NULL'), $query->{Time}, ($query->{Info} || 'NULL'); } + if ( $o->get('fingerprint') ) { + my $fp = $qr->fingerprint($query->{'Info'}); + my $chksm = uc substr(md5_hex($fp), -16); + print "Fingerprint: 0x$chksm\n"; + } if ( $o->get('execute-command') ) { exec_cmd($o->get('execute-command')); msg('Executed ' . $o->get('execute-command')); @@ -7487,6 +7493,12 @@ It is permissible for the code to have side effects (to alter C<$event>). +=item --fingerprint + +Prints a fingerprint (checksum) of the query that was just killed. This is +equivalent to the fingerprint output of pt-query-digest. This allows +cross-referencing the output of both tools. + =item --group-by type: string