WL#9632: mysqlbinlog: generate deprecation warning for - -short-form
Affects: Server-8.0 — Status: Complete — Priority: Medium
EXECUTIVE SUMMARY ================= 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. Background ========== 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 output.
REQUIREMENTS ============ FR1. mysqlbinlog SHALL emit a deprecation warning when --short-form is used. 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. Upgrades ======== 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. Security ======== There are no security considerations. Observability ============= There are no observability considerations. There is no new functionality added only a new warning is emited.
LOW LEVEL CHANGES ================= 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 changing: CLIENT_WARN_DEPRECATED_NO_REPLACEMENT and CLIENT_WARN_DEPRECATED 2. Deploy a call to the warning function in mysqlbinlog when processing --short-form option. 3. Add deprecation test to mysqlbinlog.test case.
Copyright (c) 2000, 2017, Oracle Corporation and/or its affiliates. All rights reserved.