![]() |
MySQL 8.0.43
Source Code Documentation
|
System variable cache. More...
#include <pfs_variable.h>
Public Member Functions | |
| PFS_system_variable_cache (bool external_init) | |
| bool | match_scope (int scope) |
| Match system variable scope to desired scope. More... | |
| ulonglong | get_sysvar_hash_version () |
| ~PFS_system_variable_cache () override | |
Public Member Functions inherited from PFS_variable_cache< System_variable > | |
| PFS_variable_cache (bool external_init) | |
| virtual | ~PFS_variable_cache ()=0 |
| Destructor. More... | |
| bool | initialize_session () |
| Build array of SHOW_VARs from the external variable source. More... | |
| bool | initialize_client_session () |
| Build array of SHOW_VARs suitable for aggregation by user, host or account. More... | |
| int | materialize_global () |
| Build cache of GLOBAL system or status variables. More... | |
| int | materialize_all (THD *thd) |
| Build cache of GLOBAL and SESSION variables for a non-instrumented thread. More... | |
| int | materialize_session (THD *thd) |
| Build cache of SESSION variables for a non-instrumented thread. More... | |
| int | materialize_session (PFS_thread *pfs_thread, bool use_mem_root=false) |
| Build cache of SESSION variables for an instrumented thread. More... | |
| int | materialize_session (PFS_thread *pfs_thread, uint index) |
| Cache a single SESSION variable for an instrumented thread. More... | |
| int | materialize_user (PFS_user *pfs_user) |
| Build cache of SESSION status variables for a user. More... | |
| int | materialize_host (PFS_host *pfs_host) |
| Build cache of SESSION status variables for a host. More... | |
| int | materialize_account (PFS_account *pfs_account) |
| Build cache of SESSION status variables for an account. More... | |
| bool | is_materialized () |
| True if variables have been materialized. More... | |
| bool | is_materialized (THD *unsafe_thd) |
| True if variables have been materialized for given THD. More... | |
| bool | is_materialized (PFS_thread *pfs_thread) |
| True if variables have been materialized for given PFS_thread. More... | |
| bool | is_materialized (PFS_user *pfs_user) |
| True if variables have been materialized for given PFS_user. More... | |
| bool | is_materialized (PFS_host *pfs_host) |
| True if variables have been materialized for given PFS_host. More... | |
| bool | is_materialized (PFS_account *pfs_account) |
| True if variables have been materialized for given PFS_account. More... | |
| bool | is_materialized (PFS_client *pfs_client) |
| True if variables have been materialized for given PFS_user/host/account. More... | |
| THD_ptr | get_THD (THD *thd) |
| Get a validated THD from the thread manager. More... | |
| THD_ptr | get_THD (PFS_thread *pfs_thread) |
| const System_variable * | get (uint index=0) const |
| Get a single variable from the cache. More... | |
| uint | size () |
| Number of elements in the cache. More... | |
Protected Member Functions | |
| bool | init_show_var_array (enum_var_type scope, bool strict) |
| Build a sorted list of all system variables from the system variable hash. More... | |
| int | do_materialize_all (THD *thd) override |
| Build a GLOBAL and SESSION system variable cache. More... | |
Private Member Functions | |
| bool | do_initialize_session () override |
| Build an array of SHOW_VARs from the system variable hash. More... | |
| int | do_materialize_global () override |
| Build a GLOBAL system variable cache. More... | |
| int | do_materialize_session (THD *thd) override |
| Build a SESSION system variable cache for a THD. More... | |
| int | do_materialize_session (PFS_thread *thread) override |
| Build a SESSION system variable cache for a pfs_thread. More... | |
| int | do_materialize_session (PFS_thread *pfs_thread, uint index) override |
| Materialize a single system variable for a pfs_thread. More... | |
| void | set_mem_root () |
| Allocate and assign mem_root for system variable materialization. More... | |
| void | clear_mem_root () |
| Mark memory blocks in the temporary mem_root as free. More... | |
| void | free_mem_root () |
| Free the temporary mem_root. More... | |
Private Attributes | |
| MEM_ROOT | m_mem_sysvar |
| MEM_ROOT ** | m_mem_thd |
| MEM_ROOT * | m_mem_thd_save |
| MEM_ROOT * | m_mem_sysvar_ptr |
Additional Inherited Members | |
Public Types inherited from PFS_variable_cache< System_variable > | |
| typedef Prealloced_array< System_variable, SYSTEM_VARIABLE_PREALLOC > | Variable_array |
Protected Attributes inherited from PFS_variable_cache< System_variable > | |
| THD * | m_safe_thd |
| THD * | m_unsafe_thd |
| THD * | m_current_thd |
| PFS_thread * | m_pfs_thread |
| PFS_client * | m_pfs_client |
| Find_THD_variable | m_thd_finder |
| Variable_array | m_cache |
| bool | m_initialized |
| bool | m_external_init |
| bool | m_materialized |
| Show_var_array | m_show_var_array |
| System_variable_tracker::Array | m_sys_var_tracker_array |
| ulonglong | m_version |
| enum_var_type | m_query_scope |
| bool | m_use_mem_root |
| bool | m_aggregate |
System variable cache.
|
explicit |
|
inlineoverride |
|
private |
Mark memory blocks in the temporary mem_root as free.
Restore THD::mem_root.
|
overrideprivatevirtual |
Build an array of SHOW_VARs from the system variable hash.
Filter for SESSION scope.
Reimplemented from PFS_variable_cache< System_variable >.
|
overrideprotectedvirtual |
Build a GLOBAL and SESSION system variable cache.
Reimplemented from PFS_variable_cache< System_variable >.
Reimplemented in PFS_system_variable_info_cache, and PFS_system_persisted_variables_cache.
|
overrideprivatevirtual |
Build a GLOBAL system variable cache.
Reimplemented from PFS_variable_cache< System_variable >.
|
overrideprivatevirtual |
Materialize a single system variable for a pfs_thread.
Requires that init_show_var_array() has already been called. Return 0 for success.
Reimplemented from PFS_variable_cache< System_variable >.
|
overrideprivatevirtual |
Build a SESSION system variable cache for a pfs_thread.
Requires that init_show_var_array() has already been called. Return 0 for success.
Reimplemented from PFS_variable_cache< System_variable >.
|
overrideprivatevirtual |
Build a SESSION system variable cache for a THD.
Reimplemented from PFS_variable_cache< System_variable >.
|
private |
Free the temporary mem_root.
Restore THD::mem_root if necessary.
|
inline |
|
protected |
Build a sorted list of all system variables from the system variable hash.
Filter by scope. Must be called inside of LOCK_plugin_delete.
| bool PFS_system_variable_cache::match_scope | ( | int | scope | ) |
Match system variable scope to desired scope.
|
private |
Allocate and assign mem_root for system variable materialization.
|
private |
|
private |
|
private |
|
private |