MXS-3301 Rename clustrix -> xpand everywhere
This commit is contained in:
@ -141,7 +141,7 @@ public:
|
|||||||
{
|
{
|
||||||
MARIADB,
|
MARIADB,
|
||||||
MYSQL,
|
MYSQL,
|
||||||
CLUSTRIX
|
XPAND
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class RLagState
|
enum class RLagState
|
||||||
|
@ -1153,7 +1153,7 @@ void Server::VersionInfo::set(uint64_t version, const std::string& version_str)
|
|||||||
if (strcasestr(version_str.c_str(), "xpand") != NULL
|
if (strcasestr(version_str.c_str(), "xpand") != NULL
|
||||||
|| strcasestr(version_str.c_str(), "clustrix") != NULL)
|
|| strcasestr(version_str.c_str(), "clustrix") != NULL)
|
||||||
{
|
{
|
||||||
m_type = Type::CLUSTRIX;
|
m_type = Type::XPAND;
|
||||||
}
|
}
|
||||||
else if (strcasestr(version_str.c_str(), "mariadb") != NULL)
|
else if (strcasestr(version_str.c_str(), "mariadb") != NULL)
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,7 @@ const char* mariadb_users_query_format =
|
|||||||
"FROM mysql.user AS u LEFT JOIN mysql.tables_priv AS t "
|
"FROM mysql.user AS u LEFT JOIN mysql.tables_priv AS t "
|
||||||
"ON (u.user = t.user AND u.host = t.host) WHERE u.plugin IN ('', 'mysql_native_password') %s";
|
"ON (u.user = t.user AND u.host = t.host) WHERE u.plugin IN ('', 'mysql_native_password') %s";
|
||||||
|
|
||||||
const char* clustrix_users_query_format =
|
const char* xpand_users_query_format =
|
||||||
"SELECT u.username AS user, u.host, a.dbname AS db, "
|
"SELECT u.username AS user, u.host, a.dbname AS db, "
|
||||||
" IF(a.privileges & 1048576, 'Y', 'N') AS select_priv, u.password "
|
" IF(a.privileges & 1048576, 'Y', 'N') AS select_priv, u.password "
|
||||||
"FROM system.users AS u LEFT JOIN system.user_acl AS a ON (u.user = a.role) "
|
"FROM system.users AS u LEFT JOIN system.user_acl AS a ON (u.user = a.role) "
|
||||||
@ -144,7 +144,7 @@ enum server_category_t
|
|||||||
{
|
{
|
||||||
SERVER_NO_ROLES,
|
SERVER_NO_ROLES,
|
||||||
SERVER_ROLES,
|
SERVER_ROLES,
|
||||||
SERVER_CLUSTRIX
|
SERVER_XPAND
|
||||||
};
|
};
|
||||||
|
|
||||||
static int get_users(Listener* listener, bool skip_local, SERVER** srv);
|
static int get_users(Listener* listener, bool skip_local, SERVER** srv);
|
||||||
@ -208,7 +208,7 @@ static char* get_mariadb_users_query(bool include_root, const SERVER::Version& v
|
|||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char* get_clustrix_users_query(bool include_root)
|
static char* get_xpand_users_query(bool include_root)
|
||||||
{
|
{
|
||||||
const char* with_root;
|
const char* with_root;
|
||||||
|
|
||||||
@ -223,10 +223,10 @@ static char* get_clustrix_users_query(bool include_root)
|
|||||||
with_root = "AND u.username <> 'root'";
|
with_root = "AND u.username <> 'root'";
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t n_bytes = snprintf(NULL, 0, clustrix_users_query_format, with_root);
|
size_t n_bytes = snprintf(NULL, 0, xpand_users_query_format, with_root);
|
||||||
char* rval = static_cast<char*>(MXS_MALLOC(n_bytes + 1));
|
char* rval = static_cast<char*>(MXS_MALLOC(n_bytes + 1));
|
||||||
MXS_ABORT_IF_NULL(rval);
|
MXS_ABORT_IF_NULL(rval);
|
||||||
snprintf(rval, n_bytes + 1, clustrix_users_query_format, with_root);
|
snprintf(rval, n_bytes + 1, xpand_users_query_format, with_root);
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
@ -243,8 +243,8 @@ static char* get_users_query(const SERVER::Version& version, bool include_root,
|
|||||||
get_mariadb_101_users_query(include_root);
|
get_mariadb_101_users_query(include_root);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SERVER_CLUSTRIX:
|
case SERVER_XPAND:
|
||||||
rval = get_clustrix_users_query(include_root);
|
rval = get_xpand_users_query(include_root);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SERVER_NO_ROLES:
|
case SERVER_NO_ROLES:
|
||||||
@ -866,14 +866,14 @@ static bool check_default_table_permissions(MYSQL* mysql,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check table permissions on a Clustrix server
|
* @brief Check table permissions on a Xpand server
|
||||||
*
|
*
|
||||||
* @return True if the table permissions are OK, false otherwise.
|
* @return True if the table permissions are OK, false otherwise.
|
||||||
*/
|
*/
|
||||||
static bool check_clustrix_table_permissions(MYSQL* mysql,
|
static bool check_xpand_table_permissions(MYSQL* mysql,
|
||||||
SERVICE* service,
|
SERVICE* service,
|
||||||
SERVER* server,
|
SERVER* server,
|
||||||
const char* user)
|
const char* user)
|
||||||
{
|
{
|
||||||
bool rval = true;
|
bool rval = true;
|
||||||
|
|
||||||
@ -948,9 +948,9 @@ static bool check_server_permissions(SERVICE* service,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool rval = true;
|
bool rval = true;
|
||||||
if (server->type() == SERVER::Type::CLUSTRIX)
|
if (server->type() == SERVER::Type::XPAND)
|
||||||
{
|
{
|
||||||
rval = check_clustrix_table_permissions(mysql, service, server, user);
|
rval = check_xpand_table_permissions(mysql, service, server, user);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1113,9 +1113,9 @@ struct User
|
|||||||
bool query_and_process_users(const char* query, MYSQL* con, SERVICE* service, int* users,
|
bool query_and_process_users(const char* query, MYSQL* con, SERVICE* service, int* users,
|
||||||
std::vector<User>* userlist, server_category_t category)
|
std::vector<User>* userlist, server_category_t category)
|
||||||
{
|
{
|
||||||
// Clustrix does not have a mysql database. If non-clustrix we set the
|
// Xpand does not have a mysql database. If non-xpand we set the
|
||||||
// default database in case CTEs are used.
|
// default database in case CTEs are used.
|
||||||
bool rval = (category == SERVER_CLUSTRIX || mxs_mysql_query(con, "USE mysql") == 0);
|
bool rval = (category == SERVER_XPAND || mxs_mysql_query(con, "USE mysql") == 0);
|
||||||
|
|
||||||
if (rval && mxs_mysql_query(con, query) == 0)
|
if (rval && mxs_mysql_query(con, query) == 0)
|
||||||
{
|
{
|
||||||
@ -1197,9 +1197,9 @@ int get_users_from_server(MYSQL* con, SERVER* server, SERVICE* service, Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
server_category_t category;
|
server_category_t category;
|
||||||
if (server->type() == SERVER::Type::CLUSTRIX)
|
if (server->type() == SERVER::Type::XPAND)
|
||||||
{
|
{
|
||||||
category = SERVER_CLUSTRIX;
|
category = SERVER_XPAND;
|
||||||
}
|
}
|
||||||
else if (roles_are_available(con, service, server))
|
else if (roles_are_available(con, service, server))
|
||||||
{
|
{
|
||||||
|
@ -232,7 +232,7 @@ bool MariaDBServer::do_show_slave_status(string* errmsg_out)
|
|||||||
unsigned int columns = 0;
|
unsigned int columns = 0;
|
||||||
string query;
|
string query;
|
||||||
bool all_slaves_status = false;
|
bool all_slaves_status = false;
|
||||||
if (m_srv_type == server_type::CLUSTRIX)
|
if (m_srv_type == server_type::XPAND)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -898,9 +898,9 @@ void MariaDBServer::update_server_version()
|
|||||||
m_srv_type = server_type::UNKNOWN; // TODO: Use type information in SERVER directly
|
m_srv_type = server_type::UNKNOWN; // TODO: Use type information in SERVER directly
|
||||||
auto base_server_type = srv->type();
|
auto base_server_type = srv->type();
|
||||||
MYSQL_RES* result;
|
MYSQL_RES* result;
|
||||||
if (base_server_type == SERVER::Type::CLUSTRIX)
|
if (base_server_type == SERVER::Type::XPAND)
|
||||||
{
|
{
|
||||||
m_srv_type = server_type::CLUSTRIX;
|
m_srv_type = server_type::XPAND;
|
||||||
}
|
}
|
||||||
// Check whether this server is a MaxScale Binlog Server.
|
// Check whether this server is a MaxScale Binlog Server.
|
||||||
else if (mxs_mysql_query(conn, "SELECT @@maxscale_version") == 0
|
else if (mxs_mysql_query(conn, "SELECT @@maxscale_version") == 0
|
||||||
|
@ -89,7 +89,7 @@ public:
|
|||||||
UNKNOWN, /* Totally unknown. Server has not been connected to yet. */
|
UNKNOWN, /* Totally unknown. Server has not been connected to yet. */
|
||||||
NORMAL, /* A normal MariaDB/MySQL server, possibly supported. */
|
NORMAL, /* A normal MariaDB/MySQL server, possibly supported. */
|
||||||
BINLOG_ROUTER, /* MaxScale binlog server. Requires special handling. */
|
BINLOG_ROUTER, /* MaxScale binlog server. Requires special handling. */
|
||||||
CLUSTRIX /* Clustrix server. Requires special handling. */
|
XPAND /* Xpand server. Requires special handling. */
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class BinlogMode
|
enum class BinlogMode
|
||||||
|
Reference in New Issue
Block a user