MySQL 9.6.0
Source Code Documentation
anonymous_namespace{dictionary_client.cc} Namespace Reference

Namespaces

namespace  MDL_checker
 Providing generic functions asserting that we have proper MDL locks in place.
 

Classes

class  SPI_lru_cache_templ
 

Typedefs

using SPI_missing_status = std::bitset< 2 >
 
using SPI_order = std::vector< dd::Object_id >
 
using SPI_index = std::unordered_map< dd::Object_id, SPI_missing_status >
 

Enumerations

enum class  SPI_missing_type { TABLES , PARTITIONS }
 

Functions

bool is_locked (THD *thd, const dd::cache::MDL_descriptor &mdld)
 Conveniece wrapper for checking if the MDL of an MDL_descriptor is held. More...
 
decltype(auto) with_schema_of (dd::cache::Dictionary_client *dc, const auto &schema_member, const auto &clos)
 Convenience function to temporarily acquire the schema and run a callable which uses it. More...
 
template<typename DDT >
constexpr bool HAS_MDL_KEY ()
 Compile-time function to determine if a DD type has its own MDL key. More...
 
template<typename DDT >
constexpr enum_mdl_type READ_LOCK_MDL_TYPE ()
 Compile-time function to obtain the enum_mld_type value to use for read-locking. More...
 
MDL_key make_mdl_key (THD *thd, const dd::Abstract_table &at)
 
MDL_key make_mdl_key (THD *thd, const dd::Event &event)
 
MDL_key make_mdl_key (THD *thd, const dd::Routine &routine)
 
MDL_key make_mdl_key (THD *, const dd::Schema &schema)
 
MDL_key make_mdl_key (THD *, const dd::Spatial_reference_system &srs)
 
MDL_key make_mdl_key (THD *, const dd::Tablespace &ts)
 
MDL_key make_mdl_key (THD *, const dd::Resource_group &rg)
 
template<enum_mdl_type MDL_TYPE>
dd::cache::MDL_descriptor make_mdl_descriptor (THD *thd, const auto &object)
 Wrapper which creates and MDL_descriptor with the correct key and the enum_mdl_type value provided as a template argument. More...
 
template<enum_mdl_type MDL_TYPE>
dd::cache::MDL_descriptor make_mdl_descriptor (THD *thd, const dd::Column_statistics &col_stat)
 dd::Column_statistics need a special overload of this function as the exact MDL_key and enum_mdl_type which guards is determined at runtime and depends on which other locks are held for the table. More...
 
template<typename T >
bool fetch_schema_component_names_by_criteria (THD *thd, const dd::Schema *schema, std::vector< dd::String_type > *names, std::function< bool(dd::Raw_record *)> const &fetch_criteria)
 

Variables

constexpr const auto innodb_engine_name
 

Typedef Documentation

◆ SPI_index

using anonymous_namespace{dictionary_client.cc}::SPI_index = typedef std::unordered_map<dd::Object_id, SPI_missing_status>

◆ SPI_missing_status

using anonymous_namespace{dictionary_client.cc}::SPI_missing_status = typedef std::bitset<2>

◆ SPI_order

using anonymous_namespace{dictionary_client.cc}::SPI_order = typedef std::vector<dd::Object_id>

Enumeration Type Documentation

◆ SPI_missing_type

enum class anonymous_namespace{dictionary_client.cc}::SPI_missing_type
strong
Enumerator
TABLES 
PARTITIONS 

Function Documentation

◆ fetch_schema_component_names_by_criteria()

template<typename T >
bool anonymous_namespace{dictionary_client.cc}::fetch_schema_component_names_by_criteria ( THD thd,
const dd::Schema schema,
std::vector< dd::String_type > *  names,
std::function< bool(dd::Raw_record *)> const &  fetch_criteria 
)

◆ HAS_MDL_KEY()

template<typename DDT >
constexpr bool anonymous_namespace{dictionary_client.cc}::HAS_MDL_KEY ( )
constexpr

Compile-time function to determine if a DD type has its own MDL key.

◆ is_locked()

bool anonymous_namespace{dictionary_client.cc}::is_locked ( THD thd,
const dd::cache::MDL_descriptor mdld 
)

Conveniece wrapper for checking if the MDL of an MDL_descriptor is held.

◆ make_mdl_descriptor() [1/2]

template<enum_mdl_type MDL_TYPE>
dd::cache::MDL_descriptor anonymous_namespace{dictionary_client.cc}::make_mdl_descriptor ( THD thd,
const auto &  object 
)

Wrapper which creates and MDL_descriptor with the correct key and the enum_mdl_type value provided as a template argument.

◆ make_mdl_descriptor() [2/2]

template<enum_mdl_type MDL_TYPE>
dd::cache::MDL_descriptor anonymous_namespace{dictionary_client.cc}::make_mdl_descriptor ( THD thd,
const dd::Column_statistics col_stat 
)

dd::Column_statistics need a special overload of this function as the exact MDL_key and enum_mdl_type which guards is determined at runtime and depends on which other locks are held for the table.

◆ make_mdl_key() [1/7]

MDL_key anonymous_namespace{dictionary_client.cc}::make_mdl_key ( THD ,
const dd::Resource_group rg 
)

◆ make_mdl_key() [2/7]

MDL_key anonymous_namespace{dictionary_client.cc}::make_mdl_key ( THD ,
const dd::Schema schema 
)

◆ make_mdl_key() [3/7]

MDL_key anonymous_namespace{dictionary_client.cc}::make_mdl_key ( THD ,
const dd::Spatial_reference_system srs 
)

◆ make_mdl_key() [4/7]

MDL_key anonymous_namespace{dictionary_client.cc}::make_mdl_key ( THD ,
const dd::Tablespace ts 
)

◆ make_mdl_key() [5/7]

MDL_key anonymous_namespace{dictionary_client.cc}::make_mdl_key ( THD thd,
const dd::Abstract_table at 
)

◆ make_mdl_key() [6/7]

MDL_key anonymous_namespace{dictionary_client.cc}::make_mdl_key ( THD thd,
const dd::Event event 
)

◆ make_mdl_key() [7/7]

MDL_key anonymous_namespace{dictionary_client.cc}::make_mdl_key ( THD thd,
const dd::Routine routine 
)

◆ READ_LOCK_MDL_TYPE()

template<typename DDT >
constexpr enum_mdl_type anonymous_namespace{dictionary_client.cc}::READ_LOCK_MDL_TYPE ( )
constexpr

Compile-time function to obtain the enum_mld_type value to use for read-locking.

◆ with_schema_of()

decltype(auto) anonymous_namespace{dictionary_client.cc}::with_schema_of ( dd::cache::Dictionary_client dc,
const auto &  schema_member,
const auto &  clos 
)

Convenience function to temporarily acquire the schema and run a callable which uses it.

Variable Documentation

◆ innodb_engine_name

constexpr const auto anonymous_namespace{dictionary_client.cc}::innodb_engine_name
constexpr
Initial value:
=
std::string_view(STRING_WITH_LEN("InnoDB"))
#define STRING_WITH_LEN(X)
Definition: string_with_len.h:29