WL#9633: mysqlbinlog: generate deprecation warning for --stop-never-slave-server-id
Affects: Server-8.0 — Status: Complete — Priority: Medium
EXECUTIVE SUMMARY ================= This worklog implements a deprecation warning in mysqlbinlog when the user provides the option: --stop-never-slave-server-id . The user should use the --connection-server-id option instead. Background ========== mysqlbinlog can connect to a running server and fetch the binlogs using COM_BINLOG_DUMP. In the connection packet there is a field to specify a 'server-id' of the connecting part. This is primarily intended to be used by a slave, but mysqlbinlog has to set it too. mysqlbinlog has a flag that enables the user to specify the server-id: --stop-never-slave-server-id. However, stop-never-slave-server-id only takes effect in combination with the --stop-never flag. So it is too limited. In addition, stop-never-slave-server-id is a very clumsy name. We implement --connection-server-id, which overcomes both these problems and thus users can always use --connection-server-id instead of --stop-never-slave-server-id.
REQUIREMENTS ============ FR1. mysqlbinlog SHALL emit a deprecation warning when --stop-never-slave-server-id 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 --stop-never-slave-server-id. For example: $ client/mysqlbinlog --stop-never-slave-server-id=10 WARNING: --stop-never-slave-server-id is deprecated and will be removed in a future version. Use --connection-server-id instead. client/mysqlbinlog Ver 8.0.3-rc for Linux on x86_64 (Source distribution) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. [...] - 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. - Collateral change: warning for secure-auth is now emited to stderr as well The secure-auth option is deprecated, but the deprecation warning is printed to the stdout. This patch adjusts that as well. The warning is now printed to the stderr. Upgrades ======== After using an upgraded version of mysqlbinlog, while using --stop-never-slave-server-id 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 --stop-never-slave-server-id option. 3. Add deprecation test to mysqlbinlog.test case. 4. Change so that the existing deprecation "--secure-auth" is also printed to stderr instead of stdout.
Copyright (c) 2000, 2017, Oracle Corporation and/or its affiliates. All rights reserved.