WL#13178: Deprecate WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS

Affects: Server-8.0   —   Status: Complete

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

This worklog implements a deprecation warning when user engages the
function WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS.

BACKGROUND
==========

After this work the user will get a deprecation warning when using the
function WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS. The warning shall state
that he should use WAIT_FOR_EXECUTED_GTID_SET instead of
WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS. The former supersedes the latter.

- This function is superseded by WAIT_FOR_EXECUTED_GTID_SET.

- This function is restricted to the slave applier. If the slave
  applier is stopped the function returns an error.

- Its behaviour is not consistent. The function has a channel
  parameter, so that one can restrict waiting for GTIDs on that
  specific replication channel. But the implementation is a bit more
  loose than that [a1], in the sense that it waits on the channel, but
  then checks GTIDs against the global state. So, this is not
  intuitive and not really very useful.
Functional Requirements
=======================

FR1: server SHALL emit a warning when the function
     WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS is invoked.
User Visible Changes
====================

- Server emits a deprecation warning in the session when the user
  enages the function WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS.

  "Warning 1287 'WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS' is deprecated and
   will be removed in a future release. Please use
   WAIT_FOR_EXECUTED_GTID_SET instead"


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. In the Item_master_gtid_set_wait constructors deploy a
   push_deprecated_warn call, so that a warning is emitted when this
   option is used.

2. Add deprecation test case validating that the function will emit
   the deprecation warning.