mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 13:11:32 +00:00
SlowLogParser leaved host empty when --skip-name-resolve was on. Now uses IP if empty - 1262456
This commit is contained in:
@@ -541,7 +541,7 @@ sub no_diff {
|
||||
`cat $expected_output | sed $sed_args > /tmp/pt-test-outfile-trf`;
|
||||
$expected_output = "/tmp/pt-test-outfile-trf";
|
||||
}
|
||||
|
||||
die("entre");
|
||||
# Determine cmd type and run it.
|
||||
if ( ref $cmd eq 'CODE' ) {
|
||||
output($cmd, file => $tmp_file);
|
||||
|
@@ -162,6 +162,7 @@ sub parse_event {
|
||||
&& ( my ( $user, $host, $ip, $thread_id ) = $line =~ m/$slow_log_uh_line/o )
|
||||
) {
|
||||
PTDEBUG && _d("Got user, host, ip", $user, $host, $ip);
|
||||
$host ||= $ip; # sometimes host is missing when using skip-name-resolve (LP #issue 1262456)
|
||||
push @properties, 'user', $user, 'host', $host, 'ip', $ip;
|
||||
# 5.6 has the thread id on the User@Host line
|
||||
if ( $thread_id ) {
|
||||
@@ -177,6 +178,7 @@ sub parse_event {
|
||||
&& ( my ( $user, $host, $ip, $thread_id ) = $line =~ m/$slow_log_uh_line/o )
|
||||
) {
|
||||
PTDEBUG && _d("Got user, host, ip", $user, $host, $ip);
|
||||
$host ||= $ip; # sometimes host is missing when using skip-name-resolve (LP #issue 1262456)
|
||||
push @properties, 'user', $user, 'host', $host, 'ip', $ip;
|
||||
# 5.6 has the thread id on the User@Host line
|
||||
if ( $thread_id ) {
|
||||
|
Reference in New Issue
Block a user