MySQL 9.0.0
Source Code Documentation
classic_protocol::Codec< borrowable::message::client::Greeting< Borrowed > > Class Template Reference

codec for client side greeting message. More...

#include <classic_protocol_codec_message.h>

Inheritance diagram for classic_protocol::Codec< borrowable::message::client::Greeting< Borrowed > >:
[legend]

Public Types

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

Public Member Functions

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

Static Public Member Functions

static constexpr capabilities::value_type depends_on_capabilities () noexcept
 capabilities the codec depends on. More...
 
static stdx::expected< std::pair< size_t, value_type >, std::error_code > decode (const net::const_buffer &buffer, capabilities::value_type caps)
 

Public Attributes

friend __base
 

Private Member Functions

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

Private Attributes

const value_type v_
 

Detailed Description

template<bool Borrowed>
class classic_protocol::Codec< borrowable::message::client::Greeting< Borrowed > >

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()

template<bool Borrowed>
constexpr classic_protocol::Codec< borrowable::message::client::Greeting< Borrowed > >::Codec ( value_type  v,
capabilities::value_type  caps 
)
inlineconstexpr

Member Function Documentation

◆ accumulate_fields()

template<bool Borrowed>
template<class Accumulator >
constexpr auto classic_protocol::Codec< borrowable::message::client::Greeting< Borrowed > >::accumulate_fields ( Accumulator &&  accu) const
inlineconstexprprivate

◆ decode()

template<bool Borrowed>
static stdx::expected< std::pair< size_t, value_type >, std::error_code > classic_protocol::Codec< borrowable::message::client::Greeting< Borrowed > >::decode ( const net::const_buffer buffer,
capabilities::value_type  caps 
)
inlinestatic

◆ depends_on_capabilities()

template<bool Borrowed>
static constexpr capabilities::value_type classic_protocol::Codec< borrowable::message::client::Greeting< Borrowed > >::depends_on_capabilities ( )
inlinestaticconstexprnoexcept

capabilities the codec depends on.

Member Data Documentation

◆ __base

template<bool Borrowed>
friend classic_protocol::Codec< borrowable::message::client::Greeting< Borrowed > >::__base

◆ v_

template<bool Borrowed>
const value_type classic_protocol::Codec< borrowable::message::client::Greeting< Borrowed > >::v_
private

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