mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-16 00:03:02 +00:00
SlowLogParser leaved host empty when --skip-name-resolve was on. Now uses IP if empty - 1262456
This commit is contained in:
@@ -1629,6 +1629,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;
|
||||
if ( $thread_id ) {
|
||||
push @properties, 'Thread_id', $thread_id;
|
||||
@@ -1641,6 +1642,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;
|
||||
if ( $thread_id ) {
|
||||
push @properties, 'Thread_id', $thread_id;
|
||||
|
Reference in New Issue
Block a user