Skip to content

Commit

Permalink
MDEV-33574 Improve mysqlbinlog error message
Browse files Browse the repository at this point in the history
Previously, when running mysqlbinlog without providing a binlog file, it
would print the entire help text, which was very verbose and made it
difficult to identify the actual issue.

Now change the behavior to print a more concise error message instead:

    "ERROR: Please provide the log file(s). Run with '--help' for usage instructions."

This makes the error output more user-friendly and easier to understand,
especially when running the tool in scripts or automated processes.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer
Amazon Web Services, Inc.
  • Loading branch information
HugoWenTD authored and LinuxJedi committed Apr 26, 2024
1 parent b3e531a commit 3d41747
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/mysqlbinlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2997,7 +2997,8 @@ int main(int argc, char** argv)
{
if (!opt_version)
{
usage();
error("Please provide the log file(s). Run with '--help' for usage "
"instructions.");
retval= ERROR_STOP;
}
goto err;
Expand Down

0 comments on commit 3d41747

Please sign in to comment.