MySQL 9.7.0
Source Code Documentation
my_version.cc File Reference

Functions to compare server version strings and and determine if clone should be allowed. More...

#include <algorithm>
#include <array>
#include <cassert>
#include <cctype>
#include <cstddef>
#include <sstream>
#include <string>

Classes

struct  version_t
 Type to hold different parts of a version. More...
 

Functions

static version_t parse_version_string (std::string version, bool &is_valid)
 Parse a version string and extract the major, minor, patch and build from the version. More...
 
bool are_versions_clone_compatible (const std::string &recipient, const std::string &donor, const bool is_recipient_lts=false, const bool is_donor_lts=false)
 Compares versions and determine if clone is allowed. More...
 

Variables

constexpr unsigned long CLONE_BACKPORT_VERSION = 37
 
const version_t CLONE_TO_NEXT_LTS_SUPPORT {9, 7, 0, ""}
 

Detailed Description

Functions to compare server version strings and and determine if clone should be allowed.

Function Documentation

◆ parse_version_string()

static version_t parse_version_string ( std::string  version,
bool &  is_valid 
)
static

Parse a version string and extract the major, minor, patch and build from the version.

A string of length 0 is filled in case a particular version string could not be parsed.

Parameters
[in]versioninput version string
[in,out]is_validtrue if version string is valid
Returns
parsed components of the version string.

Variable Documentation

◆ CLONE_BACKPORT_VERSION

constexpr unsigned long CLONE_BACKPORT_VERSION = 37
constexpr

◆ CLONE_TO_NEXT_LTS_SUPPORT

const version_t CLONE_TO_NEXT_LTS_SUPPORT {9, 7, 0, ""}