Topics in this section:
The following list describes some of the terms introduced in this section:
Transport layer that exchanges data: TCP sockets, Unix Sockets, Named Pipes, TLS, and so on.
A lower-level connection between two Endpoints.
The session maintains the state. User-Variables, Temporary Tables, and so on.
Messages are exchanged between Endpoints. On a higher level they build a sequence of Messages with a initial and final Message.
A client or a server.
A default connection supports:
A session owns state like:
current character set
A session is used by the server and the protocol to manage state.
Closing a session releases all session related data.
After a client connects to the server it:
In the Negotiation step the client checks which features the server supports on the protocol side.
After a successful finish of the Authentication step the previous Session is discarded and a new Session is created.
Further Command Messages run within a Session.
Server-side supported SASL mechanism:
before TLS connection established:
after TLS connection established:
[ "EXTERNAL", "PLAIN" ]
Other known mechanisms:
MYSQL41 (MySQL 4.1 auth mechanism)
The messages may be pipelined:
the client may send the messages without waiting for a reply first
the client should only send messages which safely trigger an Error packet
For the server it is no difference if the messages from client where sent in a bulk or if the client waited. The network and send/receive buffers of the Operation System will act as queue.
Expectations help to control the behavior of following messages if a pipelined message fails.
For more information, see Implementation Notes.
If the server receives a message that is larger than the current Max Message Length, then it MUST close the connection.
As clients and servers may have to buffer the entire message before it can be processed these limits allow protect against excessive resource usage.
If the result of
contains a extension key from the table below it supports the
More extensions can be added in future iterations as long as
they are announced in
The client may assume that the server supports a set of features
by default and skip the
if the TLS extension isn't supported, then the
if it is supported, then it will succeed
Feature: extensions Scenario: connecting with TLS, fast path Given a client side X.509 certificate is provided with user name "foo" And client certificate is valid When connecting with TLS established Then handshake should be single-step
0: supported, not in use
1: supported, in use
1: switch to TLS connection after server-side Ok
If the server doesn't support the capability, then it will return an error.Note
Disabling TLS on a connection may not be supported by the server and should result in an error.