WL#12926: Deprecate log_bin_use_v1_row_events

Affects: Server-8.0   —   Status: Complete

EXECUTIVE SUMMARY
=================

This worklog implements a deprecation warning when user sets or reads
the value of log_bin_use_v1_row_events.

BACKGROUND
==========

- Back in MySQL 5.6, the concept of v1 and v2 row events was
  introduced as needed by NDB.

  The motivation was: "Allow extra data to be appended to a
  Rows_log_event.  This allows per-row information to be communicated
  from Master to Slave."

- 5.5 generates and reads only v1 row events.
- 5.6, 5.7 and 8.0 can parse and interpret v1 and v2 row events
- 5.6, 5.7 and 8.0 have an option to choose which version of events to
  generate. This option is "log_bin_use_v1_events".
  - If set to 1 v1 row events are generated.
  - If set to 0 v2 row events are generated.
- The option is dynamic and should be dynamic, but there are bugs
  associated with it. But we are deprecating this option so we should
  not fix the bugs.

- log_bin_use_v1_row_events is only needed for RBR replication into
  5.5 slaves.

- We don't support cross-version more than one major version.

- v2 events are extensible and have been the default since MySQL 5.6.
Functional Requirements
=======================

FR1: Server SHALL emit a warning, at server start time, when
     configuring log_bin_use_v1_row_events in the server configuration
     file.

FR2: Server SHALL emit a warning, at server start time, when passing
     log_bin_use_v1_row_events as a server start up option on the
     command line.

FR3: Warning shall be emitted in the user session when the user reads
     the variable @@global.log_bin_use_v1_row_events.

FR4: Warning shall be emitted in the user session when the user SETS
     the variable @@global.log_bin_use_v1_row_events.
User Visible Changes
====================

- Server emits a deprecation warning in the session when the user
  selects @@global.log_bin_use_v1_row_events.

    "Warning 1287 '@@log_bin_use_v1_row_events' is deprecated and will
     be removed in a future release."

- Server emits a deprecation warning at startup if the
  log_bin_use_v1_row_events config option is set.

    "2019-07-09T22:45:35.948132Z 0 [Warning] [MY-011069] [Server] The
    syntax '--log-bin-use-v1-row-events' is deprecated and will be removed
    in a future release."

- Server emits a deprecation warning at startup if the
  master_info_file config option is set.

    "2019-07-09T22:45:35.948132Z 0 [Warning] [MY-011069] [Server] The
    syntax '--log-bin-use-v1-row-events' is deprecated and will be removed
    in a future release."

Upgrades
========

After upgrading to the version that contains this change then the user
will get the aforementioned deprecation warnings. This, however, shall
not break backwards compatiblity.

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. Deploy DEPRECATED_VAR("") in the log_bin_use_v1_row_events system
   variable declaration.

2. Deploy conditional calls to push_deprecated_warn in
   mysql_get_one_options, for log_bin_use_v1_row_events so that the
   warning is pushed at server start time, when the options is set.

3. Add deprecation test case validating session and server start
   warnings.