Commit 3d417476 authored by Hugo Wen's avatar Hugo Wen Committed by Andrew Hutchings

MDEV-33574 Improve mysqlbinlog error message

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.
parent b3e531a3
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment