WL#12240: X Protocol server initiates conversation

Affects: Server-8.0   —   Status: Complete

Motivation

In (the not so uncommon) case a classic-protocol client connects to xproto server port, the client will return

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial 
communication packet', system error: 0

to the application:

  • socket connection was successful
  • but timeout was reached, waiting for the server's handshake message

This error is triggered as classic proto and xproto have different expectations on who sends the first packet:

  • in classic, server initiates the conversation
  • in X, client initiates the conversation

Thus when classic client connect to X Server then client waits for data from the server and server waits for data from the client.

The displayed error message isn't helpful for the users, and a classic client has no way to know it connected to a xproto port.

Goal

Give the classic-protocol client a way to report a useful error if it connected to a xproto port.

Notes

Until 8.0.15, only C++ Connector (X Protocol) supported global notice other connectors failed with following errors:

  • C/Net 8.0 GA - "Expected message id: 2. Received message id: 11"
  • C/Python 8.0 GA - "AttributeError"
  • C/Node.JS 8.0 GA - "Invalid type for Mysqlx.Notice.Frame"

All connectors must:

  • ignore unknown notice
  • allow global notices at any moment of the X Protocol flow