MySQL 9.1.0
Source Code Documentation
anonymous_namespace{dictionary_client.cc}::MDL_checker Class Reference

Helper class providing overloaded functions asserting that we have proper MDL locks in place. More...

Static Public Member Functions

static bool is_release_locked (THD *, const dd::Entity_object *)
 
static bool is_read_locked (THD *thd, const dd::Abstract_table *table)
 
static bool is_write_locked (THD *thd, const dd::Abstract_table *table)
 
static bool is_read_locked (THD *thd, const dd::Spatial_reference_system *srs)
 
static bool is_write_locked (THD *thd, const dd::Spatial_reference_system *srs)
 
static bool is_release_locked (THD *thd, const dd::Spatial_reference_system *srs)
 
static bool is_read_locked (THD *thd, const dd::Column_statistics *column_statistics)
 
static bool is_write_locked (THD *thd, const dd::Column_statistics *column_statistics)
 
static bool is_release_locked (THD *thd, const dd::Column_statistics *column_statistics)
 
static bool is_read_locked (THD *, const dd::Charset *)
 
static bool is_write_locked (THD *, const dd::Charset *)
 
static bool is_read_locked (THD *, const dd::Collation *)
 
static bool is_write_locked (THD *, const dd::Collation *)
 
static bool is_read_locked (THD *thd, const dd::Schema *schema)
 
static bool is_write_locked (THD *thd, const dd::Schema *schema)
 
static bool is_release_locked (THD *thd, const dd::Schema *schema)
 
static bool is_read_locked (THD *thd, const dd::Tablespace *tablespace)
 
static bool is_write_locked (THD *thd, const dd::Tablespace *tablespace)
 
static bool is_release_locked (THD *thd, const dd::Tablespace *tablespace)
 
static bool is_read_locked (THD *thd, const dd::Event *event)
 
static bool is_write_locked (THD *thd, const dd::Event *event)
 
static bool is_read_locked (THD *thd, const dd::Routine *routine)
 
static bool is_write_locked (THD *thd, const dd::Routine *routine)
 
static bool is_locked (THD *thd, const dd::Resource_group *resource_group, enum_mdl_type lock_type)
 Private helper function for asserting MDL for resource groups. More...
 
static bool is_read_locked (THD *thd, const dd::Resource_group *resource_group)
 Check whether a resource group object holds at least MDL_INTENTION_EXCLUSIVE. More...
 
static bool is_write_locked (THD *thd, const dd::Resource_group *resource_group)
 Check if MDL_EXCLUSIVE lock is held by DD Resource group object. More...
 

Static Private Member Functions

static bool is_locked (THD *thd, const dd::Abstract_table *table, enum_mdl_type lock_type)
 Private helper function for asserting MDL for tables. More...
 
static bool is_locked (THD *thd, const dd::Event *event, enum_mdl_type lock_type)
 Private helper function for asserting MDL for events. More...
 
static bool is_locked (THD *thd, const dd::Routine *routine, enum_mdl_type lock_type)
 Private helper function for asserting MDL for routines. More...
 
static bool is_locked (THD *thd, const dd::Schema *schema, enum_mdl_type lock_type)
 Private helper function for asserting MDL for schemata. More...
 
static bool is_locked (THD *thd, const dd::Spatial_reference_system *srs, enum_mdl_type lock_type)
 Private helper function for asserting MDL for spatial reference systems. More...
 
static bool is_locked (THD *thd, const dd::Column_statistics *column_statistics, enum_mdl_type lock_type)
 Private helper function for asserting MDL for column statistics. More...
 
static bool is_locked (THD *thd, const dd::Tablespace *tablespace, enum_mdl_type lock_type)
 Private helper function for asserting MDL for tablespaces. More...
 

Detailed Description

Helper class providing overloaded functions asserting that we have proper MDL locks in place.

Please note that the functions cannot be called until after we have the name of the object, so if we acquire an object by id, the asserts must be delayed until the object is retrieved.

Note
Checking for MDL locks is disabled for the DD initialization thread because the server is not multi threaded at this stage.

Member Function Documentation

◆ is_locked() [1/8]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_locked ( THD thd,
const dd::Abstract_table table,
enum_mdl_type  lock_type 
)
inlinestaticprivate

Private helper function for asserting MDL for tables.

Note
We need to retrieve the schema name, since this is required for the MDL key.
Parameters
thdThread context.
tableTable object.
lock_typeWeakest lock type accepted.
Returns
true if we have the required lock, otherwise false.

◆ is_locked() [2/8]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_locked ( THD thd,
const dd::Column_statistics column_statistics,
enum_mdl_type  lock_type 
)
inlinestaticprivate

Private helper function for asserting MDL for column statistics.

Parameters
thdThread context.
column_statisticsColumn statistic object.
lock_typeWeakest lock type accepted.
Returns
true if we have the required lock, otherwise false.

◆ is_locked() [3/8]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_locked ( THD thd,
const dd::Event event,
enum_mdl_type  lock_type 
)
inlinestaticprivate

Private helper function for asserting MDL for events.

Note
We need to retrieve the schema name, since this is required for the MDL key.
Parameters
thdThread context.
eventEvent object.
lock_typeWeakest lock type accepted.
Returns
true if we have the required lock, otherwise false.

◆ is_locked() [4/8]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_locked ( THD thd,
const dd::Resource_group resource_group,
enum_mdl_type  lock_type 
)
inlinestatic

Private helper function for asserting MDL for resource groups.

Parameters
thdTHD context.
resource_groupDD Resource group object.
lock_typeWeakest lock type accepted.
Returns
true if we have the required lock, otherwise false.

◆ is_locked() [5/8]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_locked ( THD thd,
const dd::Routine routine,
enum_mdl_type  lock_type 
)
inlinestaticprivate

Private helper function for asserting MDL for routines.

Note
We need to retrieve the schema name, since this is required for the MDL key.
Parameters
thdThread context.
routineRoutine object.
lock_typeWeakest lock type accepted.
Returns
true if we have the required lock, otherwise false.

◆ is_locked() [6/8]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_locked ( THD thd,
const dd::Schema schema,
enum_mdl_type  lock_type 
)
inlinestaticprivate

Private helper function for asserting MDL for schemata.

Parameters
thdThread context.
schemaSchema object.
lock_typeWeakest lock type accepted.
Returns
true if we have the required lock, otherwise false.

◆ is_locked() [7/8]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_locked ( THD thd,
const dd::Spatial_reference_system srs,
enum_mdl_type  lock_type 
)
inlinestaticprivate

Private helper function for asserting MDL for spatial reference systems.

Parameters
thdThread context.
srsSpatial reference system object.
lock_typeWeakest lock type accepted.
Returns
true if we have the required lock, otherwise false.

◆ is_locked() [8/8]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_locked ( THD thd,
const dd::Tablespace tablespace,
enum_mdl_type  lock_type 
)
inlinestaticprivate

Private helper function for asserting MDL for tablespaces.

Note
We need to retrieve the schema name, since this is required for the MDL key.
Parameters
thdThread context.
tablespaceTablespace object.
lock_typeWeakest lock type accepted.
Returns
true if we have the required lock, otherwise false.

◆ is_read_locked() [1/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_read_locked ( THD ,
const dd::Charset  
)
inlinestatic

◆ is_read_locked() [2/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_read_locked ( THD ,
const dd::Collation  
)
inlinestatic

◆ is_read_locked() [3/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_read_locked ( THD thd,
const dd::Abstract_table table 
)
inlinestatic

◆ is_read_locked() [4/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_read_locked ( THD thd,
const dd::Column_statistics column_statistics 
)
inlinestatic

◆ is_read_locked() [5/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_read_locked ( THD thd,
const dd::Event event 
)
inlinestatic

◆ is_read_locked() [6/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_read_locked ( THD thd,
const dd::Resource_group resource_group 
)
inlinestatic

Check whether a resource group object holds at least MDL_INTENTION_EXCLUSIVE.

IX is acquired when a resource group is being accessed when creating/altering a resource group.

Parameters
thdTHD context.
resource_groupPointer to DD resource group object.
Returns
true if required lock is held else false

◆ is_read_locked() [7/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_read_locked ( THD thd,
const dd::Routine routine 
)
inlinestatic

◆ is_read_locked() [8/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_read_locked ( THD thd,
const dd::Schema schema 
)
inlinestatic

◆ is_read_locked() [9/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_read_locked ( THD thd,
const dd::Spatial_reference_system srs 
)
inlinestatic

◆ is_read_locked() [10/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_read_locked ( THD thd,
const dd::Tablespace tablespace 
)
inlinestatic

◆ is_release_locked() [1/5]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_release_locked ( THD ,
const dd::Entity_object  
)
inlinestatic

◆ is_release_locked() [2/5]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_release_locked ( THD thd,
const dd::Column_statistics column_statistics 
)
inlinestatic

◆ is_release_locked() [3/5]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_release_locked ( THD thd,
const dd::Schema schema 
)
inlinestatic

◆ is_release_locked() [4/5]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_release_locked ( THD thd,
const dd::Spatial_reference_system srs 
)
inlinestatic

◆ is_release_locked() [5/5]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_release_locked ( THD thd,
const dd::Tablespace tablespace 
)
inlinestatic

◆ is_write_locked() [1/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_write_locked ( THD ,
const dd::Charset  
)
inlinestatic

◆ is_write_locked() [2/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_write_locked ( THD ,
const dd::Collation  
)
inlinestatic

◆ is_write_locked() [3/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_write_locked ( THD thd,
const dd::Abstract_table table 
)
inlinestatic

◆ is_write_locked() [4/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_write_locked ( THD thd,
const dd::Column_statistics column_statistics 
)
inlinestatic

◆ is_write_locked() [5/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_write_locked ( THD thd,
const dd::Event event 
)
inlinestatic

◆ is_write_locked() [6/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_write_locked ( THD thd,
const dd::Resource_group resource_group 
)
inlinestatic

Check if MDL_EXCLUSIVE lock is held by DD Resource group object.

Writing a resource group object should be governed by MDL_EXCLUSIVE.

Parameters
thdTHD context
resource_groupPointer to DD resource group object.
Returns
true if required lock is held else false.

◆ is_write_locked() [7/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_write_locked ( THD thd,
const dd::Routine routine 
)
inlinestatic

◆ is_write_locked() [8/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_write_locked ( THD thd,
const dd::Schema schema 
)
inlinestatic

◆ is_write_locked() [9/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_write_locked ( THD thd,
const dd::Spatial_reference_system srs 
)
inlinestatic

◆ is_write_locked() [10/10]

static bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_write_locked ( THD thd,
const dd::Tablespace tablespace 
)
inlinestatic

The documentation for this class was generated from the following file: