MySQL 9.6.0
Source Code Documentation
anonymous_namespace{dictionary_client.cc}::MDL_checker Namespace Reference

Providing generic functions asserting that we have proper MDL locks in place. More...

Functions

template<typename DDT >
bool is_read_locked (THD *thd, const DDT *objectp)
 Predicate which returns true if a DD object is suitably read locked. More...
 
template<typename DDT >
bool is_write_locked (THD *thd, const DDT *objectp)
 Predicate which returns true if a DD object is suitably write locked. More...
 

Detailed Description

Providing generic 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.

Function Documentation

◆ is_read_locked()

template<typename DDT >
bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_read_locked ( THD thd,
const DDT *  objectp 
)

Predicate which returns true if a DD object is suitably read locked.

◆ is_write_locked()

template<typename DDT >
bool anonymous_namespace{dictionary_client.cc}::MDL_checker::is_write_locked ( THD thd,
const DDT *  objectp 
)

Predicate which returns true if a DD object is suitably write locked.