MySQL 8.3.0
Source Code Documentation
Compatibility_module Class Reference

#include <compatibility_module.h>

Public Member Functions

 Compatibility_module ()
 
 Compatibility_module (Member_version &local_version)
 
Member_versionget_local_version ()
 Returns this member version. More...
 
void set_local_version (Member_version &local_version)
 Set the module local version. More...
 
void add_incompatibility (Member_version &from, Member_version &to)
 Add a incompatibility between the given members. More...
 
void add_incompatibility (Member_version &from, Member_version &to_min, Member_version &to_max)
 Add a incompatibility between a range of member versions. More...
 
Compatibility_type check_incompatibility (Member_version &from, Member_version &to, bool do_version_check)
 Checks if the given version is incompatible with another version. More...
 
bool check_version_range_incompatibility (Member_version &from, unsigned int to_min, unsigned int to_max)
 Checks if the given version is incompatible with another version. More...
 
Compatibility_type check_local_incompatibility (Member_version &to, bool is_lowest_version)
 Checks if the given version is compatible with this member local version. More...
 
virtual ~Compatibility_module ()
 

Static Public Member Functions

static Compatibility_type check_version_incompatibility (Member_version from, Member_version to)
 Checks if the given version is incompatible with another version. More...
 

Private Attributes

Member_versionlocal_version
 
std::multimap< unsigned int, std::pair< unsigned int, unsigned int > > incompatibilities
 

Constructor & Destructor Documentation

◆ Compatibility_module() [1/2]

Compatibility_module::Compatibility_module ( )

◆ Compatibility_module() [2/2]

Compatibility_module::Compatibility_module ( Member_version local_version)

◆ ~Compatibility_module()

Compatibility_module::~Compatibility_module ( )
virtual

Member Function Documentation

◆ add_incompatibility() [1/2]

void Compatibility_module::add_incompatibility ( Member_version from,
Member_version to 
)

Add a incompatibility between the given members.

Parameters
fromThe member that is not compatible with 'to'
toThe member with which 'from' is not compatible with

◆ add_incompatibility() [2/2]

void Compatibility_module::add_incompatibility ( Member_version from,
Member_version to_min,
Member_version to_max 
)

Add a incompatibility between a range of member versions.

Parameters
fromThe member that is not compatible with 'to'
to_minThe minimum version with which 'from' is not compatible with
to_maxThe maximum version with which 'from' is not compatible with

◆ check_incompatibility()

Compatibility_type Compatibility_module::check_incompatibility ( Member_version from,
Member_version to,
bool  do_version_check 
)

Checks if the given version is incompatible with another version.

Parameters
fromThe member that may be not compatible with 'to'
toThe member with which 'from' may be not compatible with
do_version_checkIf version compatibility check is needed
Returns
the compatibility status
Return values
INCOMPATIBLEThe versions are not compatible with each other
COMPATIBLEThe versions are compatible with each other
READ_COMPATIBLEThe version 'from' can only read from 'to'

We have already confirmed versions are not same. If joinee version is higher then group lowest version, its read compatible else joinee version is INCOMPATIBLE with the group.

◆ check_local_incompatibility()

Compatibility_type Compatibility_module::check_local_incompatibility ( Member_version to,
bool  is_lowest_version 
)

Checks if the given version is compatible with this member local version.

Parameters
toThe member with which 'from' may be not compatible with
is_lowest_versionIf to version is lowest in the group
Returns
the compatibility status
Return values
INCOMPATIBLEThe versions are not compatible with each other
COMPATIBLEThe versions are compatible with each other
READ_COMPATIBLEThe version 'from' can only read from 'to'

◆ check_version_incompatibility()

Compatibility_type Compatibility_module::check_version_incompatibility ( Member_version  from,
Member_version  to 
)
static

Checks if the given version is incompatible with another version.

Parameters
fromThe member that may be not compatible with 'to'
toThe member with which 'from' may be not compatible with
Returns
the compatibility status
Return values
INCOMPATIBLEThe versions are not compatible with each other
COMPATIBLEThe versions are compatible with each other
READ_COMPATIBLEThe version 'from' can only read from 'to'

◆ check_version_range_incompatibility()

bool Compatibility_module::check_version_range_incompatibility ( Member_version from,
unsigned int  to_min,
unsigned int  to_max 
)

Checks if the given version is incompatible with another version.

Parameters
fromThe member that may be not compatible with 'to'
to_minThe minimum version with which 'from' is not compatible with
to_maxThe maximum version with which 'from' is not compatible with
Returns
the compatibility status
Return values
trueThe version is in the range of the incompatible versions
falseThe version is not in the range of the incompatible versions

◆ get_local_version()

Member_version & Compatibility_module::get_local_version ( )

Returns this member version.

◆ set_local_version()

void Compatibility_module::set_local_version ( Member_version local_version)

Set the module local version.

Parameters
local_versionthe new local version to be set

Member Data Documentation

◆ incompatibilities

std::multimap<unsigned int, std::pair<unsigned int, unsigned int> > Compatibility_module::incompatibilities
private

◆ local_version

Member_version* Compatibility_module::local_version
private

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