| My Project
   
    | 
#include <mdl.h>
| Public Types | |
| enum | enum_mdl_namespace { GLOBAL = 0, SCHEMA, TABLE, FUNCTION, PROCEDURE, TRIGGER, EVENT, COMMIT, NAMESPACE_END } | 
| Public Member Functions | |
| const uchar * | ptr () const | 
| uint | length () const | 
| const char * | db_name () const | 
| uint | db_name_length () const | 
| const char * | name () const | 
| uint | name_length () const | 
| enum_mdl_namespace | mdl_namespace () const | 
| void | mdl_key_init (enum_mdl_namespace mdl_namespace, const char *db, const char *name) | 
| void | mdl_key_init (const MDL_key *rhs) | 
| bool | is_equal (const MDL_key *rhs) const | 
| int | cmp (const MDL_key *rhs) const | 
| MDL_key (const MDL_key *rhs) | |
| MDL_key (enum_mdl_namespace namespace_arg, const char *db_arg, const char *name_arg) | |
| const PSI_stage_info * | get_wait_state_name () const | 
Metadata lock object key.
A lock is requested or granted based on a fully qualified name and type. E.g. They key for a table consists of <0 (=table)>+<database>+
Elsewhere in the comments this triple will be referred to simply as "key" or "name".
Object namespaces. Sic: when adding a new member to this enum make sure to update m_namespace_to_wait_state_name array in mdl.cc!
Different types of objects exist in different namespaces
| int MDL_key::cmp | ( | const MDL_key * | rhs | ) | const  [inline] | 
Compare two MDL keys lexicographically.
| const PSI_stage_info* MDL_key::get_wait_state_name | ( | ) | const  [inline] | 
Get thread state name to be used in case when we have to wait on resource identified by key.
| void MDL_key::mdl_key_init | ( | enum_mdl_namespace | mdl_namespace, | 
| const char * | db, | ||
| const char * | name | ||
| ) |  [inline] | 
Construct a metadata lock key from a triplet (mdl_namespace, database and name).
| db | Name of database to which the object belongs | 
| name | Name of of the object | 
| key | Where to store the the MDL key. | 
 1.7.6.1
 1.7.6.1