WL#12905: Allow mysql_server_mock sending async Notices to the clients connected on X-protocol port

Affects: Server-8.0   —   Status: Complete


"WL#12861 Support the current mysql_server_mock features for x-protocol" introduces xproto support in the mysql_server_mock that the Router uses for component level testing.

For testing "WL#10719 Invalid Cache based on Group Replication Notification" mysql_server_mock needs a way to mimic the GR notifications.

Notifications about membership changes are sent over xproto as global Notice messages and don't have request/response cycle as other xproto messages.

Instead, global notifications are sent based on internal events like a timer.


Allow to

  • send Notices
  • send Notices at time intervals

Functional Requirements

The mysql_server_mock user MUST be able to specify a set of Notices that the server mock should send asynchronously to the active X-protocol connections by . specifying it via the same trace file that is used to instrument the mock server statement responses.
It MUST be possible to specify the time offset (in milliseconds) between the client connection and sending each particular notice.
The notices section MUST be ignored in case of classic protocol connections.

The current mysql_server_mock state file will be extended to contain the notices section:

"notices": [
    "send_offset": 2000,
    "id": 4,
    "scope": "LOCAL",
    "payload": {"type": 4 "view_id": "abcdefg" }