MySQL 8.0.32
Source Code Documentation
classic_protocol::Codec< message::client::Greeting > Class Reference

codec for client side greeting message. More...

#include <classic_protocol_codec_message.h>

Inheritance diagram for classic_protocol::Codec< message::client::Greeting >:

Public Types

using value_type = message::client::Greeting
using __base = impl::EncodeBase< Codec< value_type > >

Public Member Functions

 Codec (value_type v, capabilities::value_type caps)
- Public Member Functions inherited from classic_protocol::impl::EncodeBase< Codec< message::client::Greeting > >
constexpr EncodeBase (capabilities::value_type caps)
constexpr size_t size () const noexcept
stdx::expected< size_t, std::error_code > encode (const net::mutable_buffer &buffer) const
constexpr capabilities::value_type caps () const noexcept

Static Public Member Functions

template<class ConstBufferSequence >
static stdx::expected< std::pair< size_t, value_type >, std::error_code > decode (const ConstBufferSequence &buffers, capabilities::value_type caps)

Public Attributes

friend __base

Private Member Functions

template<class Accumulator >
auto accumulate_fields (Accumulator &&accu) const

Private Attributes

const value_type v_

Detailed Description

codec for client side greeting message.

in 3.21 ... 4.0:

FixedInt<2>    capabilities [protocol_41 not set]
FixedInt<3>    max-allowed-packet
NulTermString  username
NulTermString  auth-method-data

[if not connect_with_schema, there may be no trailing Nul-byte]

if connect_with_schema {
  String         schema

the auth-method is "old_password" if "protocol_version == 10 && (capabilities & long_password)", it is "older_password" otherwise

FixedInt<2>    capabilities_lo [protocol_41 set]
FixedInt<2>    capabilities_hi
FixedInt<4>    max_allowed-packet

The capabilities that are part of the message are the client's capabilities (which may announce more than what the server supports). The codec uses the capabilities that are shared between client and server to decide which parts and how they are understood, though.

checked capabilities:

  • protocol_41
  • ssl
  • client_auth_method_data_varint
  • secure_connection
  • connect_with_schema
  • plugin_auth
  • connect_attributes

Member Typedef Documentation

◆ __base

◆ value_type

Constructor & Destructor Documentation

◆ Codec()

Member Function Documentation

◆ accumulate_fields()

template<class Accumulator >
auto classic_protocol::Codec< message::client::Greeting >::accumulate_fields ( Accumulator &&  accu) const

◆ decode()

template<class ConstBufferSequence >
static stdx::expected< std::pair< size_t, value_type >, std::error_code > classic_protocol::Codec< message::client::Greeting >::decode ( const ConstBufferSequence &  buffers,
capabilities::value_type  caps 

Member Data Documentation

◆ __base

◆ v_

The documentation for this class was generated from the following file: