Merge pull request #988 from percona/PT-2052_Tools_should_default_to_unbuffered_stdout_stderr

Pt 2052 tools should default to unbuffered stdout stderr
This commit is contained in:
Sveta Smirnova
2025-08-13 14:22:57 +03:00
committed by GitHub
27 changed files with 384 additions and 0 deletions

View File

@@ -1255,6 +1255,10 @@ sub get_opts {
}
}
if ( exists $self->{opts}->{'buffer-stdout'} && $self->{opts}->{'buffer-stdout'}->{got} ) {
STDOUT->autoflush(1 - $self->{opts}->{'buffer-stdout'}->{value});
}
if ( @ARGV && $self->{strict} ) {
$self->save_error("Unrecognized command-line options @ARGV");
}
@@ -5738,6 +5742,13 @@ L<"SYNOPSIS"> and usage information for details.
Prompt for a password when connecting to MySQL.
=item --[no]buffer-stdout
default: yes
Enables STDOUT buffering. Disable this option if you want to see live progress
when using output post-processing tools such as C<tee> or C<kubectl logs>.
=item --charset
short form: -A; type: string