MySQL 8.0.39
Source Code Documentation
mysql_version_gcs_protocol_map.cc File Reference
#include "plugin/group_replication/include/mysql_version_gcs_protocol_map.h"
#include <assert.h>
#include <cerrno>
#include <cinttypes>
#include <limits>
#include <regex>

Functions

Member_version convert_to_mysql_version (Gcs_protocol_version const &gcs_protocol)
 Converts the given GCS protocol version into the respective MySQL version. More...
 
Gcs_protocol_version convert_to_gcs_protocol (Member_version const &mysql_version, Member_version const &my_version)
 Maps GCS protocol version to MySQL version. More...
 
static bool is_one_or_two_digit_number (const std::string &s)
 
bool valid_mysql_version_string (char const *version_str)
 Checks whether the given C-style string has the version format "major.minor.patch". More...
 
static unsigned int convert_to_base_16_number (char const *const str)
 
Member_version convert_to_member_version (char const *str)
 Converts a "major.minor.patch" C-style string to a Member_version object. More...
 

Variables

static Member_version const version_5_7_14 (0x050714)
 
static Member_version const version_8_0_16 (0x080016)
 
static Member_version const version_8_0_27 (0x080027)
 
static std::string const one_or_two_digit_number_regex = "([0-9]{1,2})"
 

Function Documentation

◆ convert_to_base_16_number()

static unsigned int convert_to_base_16_number ( char const *const  str)
static

◆ convert_to_gcs_protocol()

Gcs_protocol_version convert_to_gcs_protocol ( Member_version const &  mysql_version,
Member_version const &  my_version 
)

Maps GCS protocol version to MySQL version.

Converts the mysql_version into the respective GCS protocol, taking into account this server's version my_version.

Parameters
mysql_versionThe MySQL version to convert
my_versionThe MySQL version of this server
Returns
the respective GCS protocol version

◆ convert_to_member_version()

Member_version convert_to_member_version ( char const *  version_str)

Converts a "major.minor.patch" C-style string to a Member_version object.

Requires that version_str is a valid_mysql_version_string.

Parameters
version_strthe string to convert
Returns
the version string as a Member_version object

◆ convert_to_mysql_version()

Member_version convert_to_mysql_version ( Gcs_protocol_version const &  gcs_protocol)

Converts the given GCS protocol version into the respective MySQL version.

Parameters
gcs_protocolThe GCS protocol to convert
Returns
the respective MySQL version as a Member_version object

◆ is_one_or_two_digit_number()

static bool is_one_or_two_digit_number ( const std::string &  s)
static

◆ valid_mysql_version_string()

bool valid_mysql_version_string ( char const *  version_str)

Checks whether the given C-style string has the version format "major.minor.patch".

Parameters
version_strthe string to validate
Return values
trueif valid
falseotherwise

Variable Documentation

◆ one_or_two_digit_number_regex

std::string const one_or_two_digit_number_regex = "([0-9]{1,2})"
static

◆ version_5_7_14

Member_version const version_5_7_14(0x050714) ( 0x050714  )
static

◆ version_8_0_16

Member_version const version_8_0_16(0x080016) ( 0x080016  )
static

◆ version_8_0_27

Member_version const version_8_0_27(0x080027) ( 0x080027  )
static