MySQL 8.4.2
Source Code Documentation
cluster_metadata.cc File Reference
#include "cluster_metadata.h"
#include <cstring>
#include <stdexcept>
#include <rapidjson/document.h>
#include <rapidjson/prettywriter.h>
#include <rapidjson/schema.h>
#include <rapidjson/stringbuffer.h>
#include "common.h"
#include "configuration_update_schema.h"
#include "harness_assert.h"
#include "mysql/harness/dynamic_config.h"
#include "mysql/harness/event_state_tracker.h"
#include "mysql/harness/logging/logging.h"
#include "mysqld_error.h"
#include "mysqlrouter/cluster_metadata_instance_attributes.h"
#include "mysqlrouter/utils.h"
#include "mysqlrouter/utils_sqlstring.h"
#include "router_config.h"

Classes

class  mysqlrouter::anonymous_namespace{cluster_metadata.cc}::ConfigurationDefaults
 

Namespaces

namespace  mysqlrouter
 
 

Macros

#define RAPIDJSON_HAS_STDSTRING   1
 

Functions

static std::string mysqlrouter::get_string (const char *input_str)
 Return a string representation of the input character string. More...
 
static void mysqlrouter::do_verify_router_id_is_ours (const uint32_t router_id, const std::string &hostname_override, MySQLSession *mysql, mysql_harness::SocketOperationsBase *socket_operations)
 
std::string mysqlrouter::anonymous_namespace{cluster_metadata.cc}::to_string_md (const ClusterType cluster_type)
 
void mysqlrouter::anonymous_namespace{cluster_metadata.cc}::update_router_info_v2 (const mysqlrouter::ClusterType cluster_type, const uint32_t router_id, const std::string &cluster_id, const std::string &target_cluster, const std::string &rw_endpoint, const std::string &ro_endpoint, const std::string &rw_split_endpoint, const std::string &rw_x_endpoint, const std::string &ro_x_endpoint, const std::string &username, MySQLSession *mysql)
 
uint32_t mysqlrouter::anonymous_namespace{cluster_metadata.cc}::register_router_v2 (const std::string &router_name, const bool overwrite, const std::string &hostname_override, MySQLSession *mysql, mysql_harness::SocketOperationsBase *socket_operations)
 
bool ROUTER_CLUSTER_EXPORT mysqlrouter::metadata_schema_version_is_compatible (const mysqlrouter::MetadataSchemaVersion &required, const mysqlrouter::MetadataSchemaVersion &available)
 
std::string ROUTER_CLUSTER_EXPORT mysqlrouter::get_metadata_schema_uncompatible_msg (const mysqlrouter::MetadataSchemaVersion &version)
 
std::string ROUTER_CLUSTER_EXPORT mysqlrouter::to_string (const MetadataSchemaVersion &version)
 
MetadataSchemaVersion ROUTER_CLUSTER_EXPORT mysqlrouter::get_metadata_schema_version (MySQLSession *mysql)
 
bool ROUTER_CLUSTER_EXPORT mysqlrouter::check_group_replication_online (MySQLSession *mysql)
 
bool ROUTER_CLUSTER_EXPORT mysqlrouter::check_group_has_quorum (MySQLSession *mysql)
 
static uint64_t mysqlrouter::query_gr_cluster_count (MySQLSession *mysql)
 
static InstanceType mysqlrouter::get_instance_type (const std::string &attributes)
 
static ClusterInfo mysqlrouter::query_metadata_servers (MySQLSession *mysql, const mysqlrouter::ClusterType cluster_type)
 
static std::vector< std::string > mysqlrouter::do_get_routing_mode_queries (MySQLSession *mysql)
 
static ClusterType mysqlrouter::get_cluster_type (MySQLSession *mysql)
 
bool ROUTER_CLUSTER_EXPORT mysqlrouter::is_part_of_cluster_set (MySQLSession *mysql)
 
static bool mysqlrouter::was_bootstrapped_as_clusterset (MySQLSession *mysql, const unsigned router_id)
 
ClusterType ROUTER_CLUSTER_EXPORT mysqlrouter::get_cluster_type (const MetadataSchemaVersion &schema_version, MySQLSession *mysql, unsigned int router_id=0)
 
std::unique_ptr< ClusterMetadatamysqlrouter::create_metadata (const MetadataSchemaVersion &schema_version, MySQLSession *mysql, const OptionsMap &options, mysql_harness::SocketOperationsBase *sockops)
 
std::string ROUTER_CLUSTER_EXPORT mysqlrouter::to_string (const ClusterType cluster_type)
 
static std::vector< std::string > mysqlrouter::do_get_grant_statements (const std::string &new_accounts)
 
stdx::expected< void, std::string > ROUTER_CLUSTER_EXPORT mysqlrouter::setup_metadata_session (MySQLSession &session)
 
std::optional< InstanceType > ROUTER_CLUSTER_EXPORT mysqlrouter::str_to_instance_type (const std::string &)
 
std::string ROUTER_CLUSTER_EXPORT mysqlrouter::to_string (const InstanceType)
 
std::string ROUTER_CLUSTER_EXPORT mysqlrouter::to_string (const TargetCluster::InvalidatedClusterRoutingPolicy)
 

Variables

static constexpr const std::string_view kClusterSet {"clusterset"}
 
static constexpr const std::string_view kCreateClusterUrl
 
constexpr const char * mysqlrouter::kDefaultSqlMode
 

Macro Definition Documentation

◆ RAPIDJSON_HAS_STDSTRING

#define RAPIDJSON_HAS_STDSTRING   1

Variable Documentation

◆ kClusterSet

constexpr const std::string_view kClusterSet {"clusterset"}
staticconstexpr

◆ kCreateClusterUrl

constexpr const std::string_view kCreateClusterUrl
staticconstexpr
Initial value:
{
"https://dev.mysql.com/doc/mysql-shell/en/"
"deploying-production-innodb-cluster.html"}