24#ifndef DD__DICTIONARY_INCLUDED
25#define DD__DICTIONARY_INCLUDED
45class Dictionary_client;
133 bool is_ddl_statement,
134 const char *schema_name,
135 size_t schema_length,
151 bool *hidden)
const = 0;
244 THD *thd,
const char *tablespace_name,
bool no_wait,
245 MDL_ticket **ticket =
nullptr,
bool for_trx =
true);
264 const char *tablespace_name,
267 bool for_trx =
true);
310 const char *schema_name,
329 unsigned long int lock_wait_timeout,
MDL_ticket **out_mdl_ticket);
345 const char *schema_name,
415 bool release_mdl_on_commit_only =
false);
427template <
typename Entity_
object_type>
A granted metadata lock.
Definition: mdl.h:985
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:40
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Data structure that contains the information about shared tablespaces.
Definition: fsp0space.h:47
Main interface class enabling users to operate on data dictionary.
Definition: dictionary.h:51
virtual bool is_dd_table_name(const String_type &schema_name, const String_type &table_name) const =0
Check if given table name is a dictionary table name.
virtual const Object_table * get_dd_table(const String_type &schema_name, const String_type &table_name) const =0
Get dictionary object for a given dictionary table name.
virtual bool is_system_view_name(const char *schema_name, const char *table_name) const =0
Check if given table name is a system view name.
virtual bool is_dd_schema_name(const String_type &schema_name) const =0
Check if the given schema name is 'mysql', which where the DD tables are stored.
virtual int table_type_error_code(const String_type &schema_name, const String_type &table_name) const =0
Get the error code representing the type name string for a dictionary or system table.
virtual bool is_system_view_name(const char *schema_name, const char *table_name, bool *hidden) const =0
Check if given table name is a system view name.
virtual bool is_system_table_name(const String_type &schema_name, const String_type &table_name) const =0
Check if given table name is a system table name.
virtual ~Dictionary()=default
virtual bool is_dd_table_access_allowed(bool is_dd_internal_thread, bool is_ddl_statement, const char *schema_name, size_t schema_length, const char *table_name) const =0
Check if given table name can be accessed by the given thread type.
This class represents all data dictionary table like mysql.tables, mysql.columns and more.
Definition: object_table.h:72
Definition: tablespace.h:56
Definition: dictionary_client.h:149
borrowable::session_track::Schema< true > Schema
Definition: classic_protocol_session_track.h:288
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
bool 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.
Definition: dictionary_impl.cc:507
bool alter_tablespace_encryption(THD *thd, const char *tablespace_name, bool encryption)
Execute an ALTER TABLESPACE ... ENCRYPTION statement.
Definition: dictionary_impl.cc:744
bool 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.
Definition: dictionary_impl.cc:528
bool 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.
Definition: dictionary_impl.cc:550
bool 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.
Definition: dictionary_impl.cc:519
bool 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.
Definition: dictionary_impl.cc:567
bool reset_tables_and_tablespaces()
Reset the tables and tablespace partitions in the DD cache, and invalidate the entries in the DDSE ca...
Definition: dictionary_impl.cc:683
cache::Dictionary_client * get_dd_client(THD *thd)
Get Dictionary_client from THD object (the latter is opaque * in SEs).
Definition: dictionary_impl.cc:581
void rename_tablespace_mdl_hook(THD *thd, MDL_ticket *src, MDL_ticket *dst)
Implicit tablespaces are renamed inside SE.
Definition: dictionary_impl.cc:737
const Object_table & get_dd_table()
Get the Object_table instance storing the given entity object type.
Definition: dictionary_impl.cc:727
bool create_native_table(THD *thd, const Plugin_table *pt)
Create plugin native table.
Definition: dictionary_impl.cc:584
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
bool drop_native_table(THD *thd, const char *schema_name, const char *table_name)
Remove plugin native table from DD.
Definition: dictionary_impl.cc:647
bool 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.
Definition: dictionary_impl.cc:538
bool 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.
Definition: dictionary_impl.cc:499
void release_mdl(THD *thd, MDL_ticket *mdl_ticket)
Release MDL_EXPLICIT lock held by a ticket.
Definition: dictionary_impl.cc:574
bool 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 nam...
Definition: dictionary_impl.cc:513
bool 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.
Definition: dictionary_impl.cc:544
bool 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.
Definition: dictionary_impl.cc:703
const char * table_name
Definition: rules_table_service.cc:56