MySQL 8.0.39
Source Code Documentation

Namespaces

namespace  anonymous_namespace{sdi.cc}
 

Classes

class  Import_target
 State and operations for importing an sdi file into the DD. More...
 

Functions

bool store (THD *thd, const Table *t)
 Stores the SDI for a table. More...
 
bool store (THD *thd, const Tablespace *ts)
 Stores the SDI for a table space. More...
 
bool drop (THD *thd, const Table *t)
 Remove SDI for a table. More...
 
bool drop_after_update (THD *thd, const Table *old_t, const Table *new_t)
 Table cleanup hook. More...
 
bool drop_all_for_table (THD *, const Table *)
 Drop all SDIs from all tablespaces associated with table. More...
 
bool drop_all_for_part (THD *, const Partition *)
 Drop all SDIs from all tablespaces associated with partition or sub-partition. More...
 
template<class DDT >
bool store (THD *thd, const DDT *ddo)
 Generic noop for all types that don't have a specific overload. More...
 
template<class DDT >
bool drop (THD *thd, const DDT *)
 Generic noop for all types that don't have a specific overload. More...
 
template<class DDT >
bool drop_after_update (THD *thd, const DDT *old_ddo, const DDT *new_ddo)
 Hook for SDI cleanup after updating DD object. More...
 
bool check_privileges (THD *thd, const Import_target &t)
 Check that we have the the necessary privileges to import this table. More...
 
MDL_requestmdl_request (const Import_target &t, MEM_ROOT *mem_root)
 Creates an MDL_request for exclusive MDL on the table being imported. More...
 

Function Documentation

◆ check_privileges()

bool dd::sdi::check_privileges ( THD thd,
const Import_target t 
)

Check that we have the the necessary privileges to import this table.

Precondition: The Import_target must be loaded before this member function is called.

Parameters
thdthread handle
timport target context
Return values
trueif an error occurred
falseotherwise

◆ mdl_request()

MDL_request * dd::sdi::mdl_request ( const Import_target t,
MEM_ROOT mem_root 
)

Creates an MDL_request for exclusive MDL on the table being imported.

Does not actually lock the name, that must be done later for all requests to avoid deadlock.

Parameters
timport target context
mem_rootwhere to allocate the MDL_request
Returns
pointer to mem_root allocated MDL_request