MySQL 9.0.0
Source Code Documentation
dictionary_impl.cc File Reference
#include "sql/dd/impl/dictionary_impl.h"
#include <string.h>
#include <memory>
#include "m_string.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "mysql/strings/m_ctype.h"
#include "mysql/thread_type.h"
#include "mysql/udf_registration_types.h"
#include "mysql_com.h"
#include "mysqld_error.h"
#include "sql/auth/auth_common.h"
#include "sql/auth/sql_security_ctx.h"
#include "sql/auto_thd.h"
#include "sql/bootstrap.h"
#include "sql/dd/cache/dictionary_client.h"
#include "sql/dd/dd.h"
#include "sql/dd/dd_schema.h"
#include "sql/dd/dd_version.h"
#include "sql/dd/impl/bootstrap/bootstrapper.h"
#include "sql/dd/impl/cache/shared_dictionary_cache.h"
#include "sql/dd/impl/system_registry.h"
#include "sql/dd/impl/tables/columns.h"
#include "sql/dd/impl/tables/dd_properties.h"
#include "sql/dd/impl/tables/indexes.h"
#include "sql/dd/impl/tables/table_partitions.h"
#include "sql/dd/impl/tables/tables.h"
#include "sql/dd/impl/tables/tablespaces.h"
#include "sql/dd/impl/upgrade/server.h"
#include "sql/dd/impl/utils.h"
#include "sql/dd/info_schema/metadata.h"
#include "sql/dd/types/abstract_table.h"
#include "sql/dd/types/column.h"
#include "sql/dd/types/index.h"
#include "sql/dd/types/object_table_definition.h"
#include "sql/dd/types/partition.h"
#include "sql/dd/types/system_view.h"
#include "sql/dd/types/table.h"
#include "sql/dd/types/tablespace.h"
#include "sql/derror.h"
#include "sql/handler.h"
#include "sql/mdl.h"
#include "sql/mysqld.h"
#include "sql/opt_costconstantcache.h"
#include "sql/plugin_table.h"
#include "sql/sql_base.h"
#include "sql/sql_class.h"
#include "sql/system_variables.h"
#include "sql/thd_raii.h"
#include "sql/transaction.h"
#include "storage/perfschema/pfs_dd_version.h"

Namespaces

namespace  dd
 The version of the current data dictionary table definitions.
 

Functions

static bool dd::acquire_shared_mdl (THD *thd, MDL_key::enum_mdl_namespace lock_namespace, const char *schema_name, const char *table_name, bool no_wait, ulong lock_wait_timeout, enum_mdl_duration lock_duration, MDL_ticket **out_mdl_ticket)
 
static bool dd::acquire_exclusive_mdl (THD *thd, MDL_key::enum_mdl_namespace lock_namespace, const char *schema_name, const char *table_name, bool no_wait, ulong lock_wait_timeout, enum_mdl_duration lock_duration, MDL_ticket **out_mdl_ticket)
 
bool dd::acquire_shared_table_mdl (THD *thd, const char *schema_name, const char *table_name, bool no_wait, MDL_ticket **out_mdl_ticket)
 Acquire shared metadata lock on the given table name with explicit duration. More...
 
bool dd::has_shared_table_mdl (THD *thd, const char *schema_name, const char *table_name)
 Predicate to check if we have a shared meta data lock on the submitted schema qualified table name. More...
 
bool dd::has_exclusive_table_mdl (THD *thd, const char *schema_name, const char *table_name)
 Predicate to check if we have an exclusive meta data lock on the submitted schema qualified table name. More...
 
bool dd::acquire_exclusive_tablespace_mdl (THD *thd, const char *tablespace_name, bool no_wait, MDL_ticket **ticket=nullptr, bool for_trx=true)
 Acquire an exclusive metadata lock on the given tablespace name with transaction duration. More...
 
bool dd::acquire_shared_tablespace_mdl (THD *thd, const char *tablespace_name, bool no_wait, MDL_ticket **ticket=nullptr, bool for_trx=true)
 Acquire a shared metadata lock on the given tablespace name with transaction duration. More...
 
bool dd::has_shared_tablespace_mdl (THD *thd, const char *tablespace_name)
 Predicate to check if we have a shared meta data lock on the submitted tablespace name. More...
 
bool dd::has_exclusive_tablespace_mdl (THD *thd, const char *tablespace_name)
 Predicate to check if we have an exclusive meta data lock on the submitted tablespace name. More...
 
bool dd::acquire_exclusive_table_mdl (THD *thd, const char *schema_name, const char *table_name, bool no_wait, MDL_ticket **out_mdl_ticket)
 Acquire exclusive metadata lock on the given table name with TRANSACTIONAL duration. More...
 
bool dd::acquire_exclusive_table_mdl (THD *thd, const char *schema_name, const char *table_name, unsigned long int lock_wait_timeout, MDL_ticket **out_mdl_ticket)
 Acquire exclusive metadata lock on the given table name with TRANSACTIONAL duration. More...
 
bool dd::acquire_exclusive_schema_mdl (THD *thd, const char *schema_name, bool no_wait, MDL_ticket **out_mdl_ticket)
 Acquire exclusive metadata lock on the given schema name with explicit duration. More...
 
void dd::release_mdl (THD *thd, MDL_ticket *mdl_ticket)
 Release MDL_EXPLICIT lock held by a ticket. More...
 
cache::Dictionary_client * dd::get_dd_client (THD *thd)
 Get Dictionary_client from THD object (the latter is opaque * in SEs). More...
 
bool dd::create_native_table (THD *thd, const Plugin_table *pt)
 Create plugin native table. More...
 
bool dd::drop_native_table (THD *thd, const char *schema_name, const char *table_name)
 Remove plugin native table from DD. More...
 
bool dd::reset_tables_and_tablespaces ()
 Reset the tables and tablespace partitions in the DD cache, and invalidate the entries in the DDSE cache. More...
 
bool dd::commit_or_rollback_tablespace_change (THD *thd, dd::Tablespace *space, bool error, bool release_mdl_on_commit_only=false)
 Update a tablespace change, commit and release transactional MDL. More...
 
template<typename Entity_object_type >
const Object_table & dd::get_dd_table ()
 Get the Object_table instance storing the given entity object type. More...
 
template const Object_table & dd::get_dd_table< dd::Column > ()
 
template const Object_table & dd::get_dd_table< dd::Index > ()
 
template const Object_table & dd::get_dd_table< dd::Partition > ()
 
template const Object_table & dd::get_dd_table< dd::Table > ()
 
template const Object_table & dd::get_dd_table< dd::Tablespace > ()
 
void dd::rename_tablespace_mdl_hook (THD *thd, MDL_ticket *src, MDL_ticket *dst)
 Implicit tablespaces are renamed inside SE. More...
 
bool dd::alter_tablespace_encryption (THD *thd, const char *tablespace_name, bool encryption)
 Execute an ALTER TABLESPACE ... ENCRYPTION statement. More...
 

Variables

Cost_constant_cachecost_constant_cache
 

Variable Documentation

◆ cost_constant_cache

Cost_constant_cache* cost_constant_cache
extern