MXS-2200 Store server version string and type in internal class

This commit is contained in:
Esa Korhonen
2018-12-17 18:31:06 +02:00
parent 54ae7119cf
commit d1b098d3b0
3 changed files with 71 additions and 18 deletions

View File

@ -73,6 +73,13 @@ public:
static const int MAX_VERSION_LEN = 256;
static const int RLAG_UNDEFINED = -1; // Default replication lag value
enum class Type
{
MARIADB,
MYSQL,
CLUSTRIX
};
struct Version
{
uint32_t major = 0;
@ -179,6 +186,20 @@ public:
*/
virtual Version get_version() const = 0;
/**
* Get the type of the server.
*
* @return Server type
*/
virtual Type get_type() const = 0;
/**
* Get version string.
*
* @return Version string
*/
virtual std::string get_version_string() const = 0;
protected:
SERVER()
{