WL#9632: mysqlbinlog: generate deprecation warning for - -short-form

Affects: Server-8.0   —   Status: Complete


This worklog implements a deprecation warning in mysqlbinlog when the
user provides the option: --short-form . This option is not to be used
in production (as stated in the docs) and is now too overloaded to be
used even when testing.


The option is already documented with the disclaimer "This is for
testing only, and should not be used in production systems." (in
mysqlbinlog --help).

Originally, the option was probably meant to remove unnecessary
output. However, it was subsequently altered so that it also removes
non-deterministic output; this was to allow writing the output to the
result file in mtr test cases. However, this means it removes
information that is necessary in order to safely re-execute the
output. So the option is now too overloaded to be useful. There are
better ways to make mtr output deterministic: in most cases it is
enough to rewrite the test case to more specifically verify the
condition being tested rather than writing the whole binary log to the

FR1. mysqlbinlog SHALL emit a deprecation warning when --short-form is

FR2. The deprecation warning SHALL be emitted to the standard error,
     as are the other warnings in mysqlbinlog.
User Visible Changes

- Deprecation Warning

The user visible change is that a deprecation warning will be emited
when the user invokes mysqlbinlog with --short-form.

For example:

  $ ./mysqlbinlog --short-form
  WARNING: --short-form is deprecated and will be removed in a future version

- Warning Emited to the stderr, not to stdout

The deprecation warning will be written the the standard error, NOT to
the standard output. This will make sure that those users that built
tools around the output of mysqlbinlog to standard output will not
break because a warning is emited.


After using an upgraded version of mysqlbinlog, while using
--short-form flag, the user will get a warning in the standard
error. This however, shall not break backwards compatibility.


There are no security considerations.


There are no observability considerations. There is no new
functionality added only a new warning is emited.

1. Add deprecation macros in client_priv.h to be able to print the
   warnings to stderr instead of stdout as they are today. This means


2. Deploy a call to the warning function in mysqlbinlog when processing
   --short-form option.

3. Add deprecation test to mysqlbinlog.test case.