![]() |
MySQL 8.0.43
Source Code Documentation
|
An instance of the global read lock in a connection. More...
#include <sql_class.h>
Public Types | |
| enum | enum_grl_state { GRL_NONE , GRL_ACQUIRED , GRL_ACQUIRED_AND_BLOCKS_COMMIT } |
Public Member Functions | |
| Global_read_lock () | |
| bool | lock_global_read_lock (THD *thd) |
| Take global read lock, wait if there is protection against lock. More... | |
| void | unlock_global_read_lock (THD *thd) |
| Unlock global read lock. More... | |
| bool | can_acquire_protection () const |
| Check if this connection can acquire protection against GRL and emit error if otherwise. More... | |
| bool | make_global_read_lock_block_commit (THD *thd) |
| Make global read lock also block commits. More... | |
| bool | is_acquired () const |
| void | set_explicit_lock_duration (THD *thd) |
| Set explicit duration for metadata locks which are used to implement GRL. More... | |
Static Public Member Functions | |
| static bool | global_read_lock_active () |
| Used by innodb memcached server to check if any connections have global read lock. More... | |
Private Attributes | |
| enum_grl_state | m_state |
| MDL_ticket * | m_mdl_global_shared_lock |
| In order to acquire the global read lock, the connection must acquire shared metadata lock in GLOBAL namespace, to prohibit all DDL. More... | |
| MDL_ticket * | m_mdl_blocks_commits_lock |
| Also in order to acquire the global read lock, the connection must acquire a shared metadata lock in COMMIT namespace, to prohibit commits. More... | |
Static Private Attributes | |
| static std::atomic< int32 > | m_atomic_active_requests |
An instance of the global read lock in a connection.
Implemented in lock.cc.
|
inline |
|
inline |
Check if this connection can acquire protection against GRL and emit error if otherwise.
|
inlinestatic |
Used by innodb memcached server to check if any connections have global read lock.
|
inline |
|
private |
Also in order to acquire the global read lock, the connection must acquire a shared metadata lock in COMMIT namespace, to prohibit commits.
|
private |
In order to acquire the global read lock, the connection must acquire shared metadata lock in GLOBAL namespace, to prohibit all DDL.
|
private |