MySQL 8.0.39
Source Code Documentation
|
Events transactions data structures (implementation). More...
#include "storage/perfschema/pfs_events_transactions.h"
#include <assert.h>
#include <atomic>
#include "m_string.h"
#include "my_compiler.h"
#include "my_sys.h"
#include "mysql/plugin.h"
#include "storage/perfschema/pfs_account.h"
#include "storage/perfschema/pfs_buffer_container.h"
#include "storage/perfschema/pfs_builtin_memory.h"
#include "storage/perfschema/pfs_global.h"
#include "storage/perfschema/pfs_host.h"
#include "storage/perfschema/pfs_instr.h"
#include "storage/perfschema/pfs_instr_class.h"
#include "storage/perfschema/pfs_user.h"
Functions | |
int | init_events_transactions_history_long (uint events_transactions_history_long_sizing) |
Initialize table EVENTS_TRANSACTIONS_HISTORY_LONG. More... | |
void | cleanup_events_transactions_history_long () |
Cleanup table EVENTS_TRANSACTIONS_HISTORY_LONG. More... | |
static void | copy_events_transactions (PFS_events_transactions *dest, const PFS_events_transactions *source) |
void | insert_events_transactions_history (PFS_thread *thread, PFS_events_transactions *transaction) |
Insert a transaction record in table EVENTS_TRANSACTIONS_HISTORY. More... | |
void | insert_events_transactions_history_long (PFS_events_transactions *transaction) |
Insert a transaction record in table EVENTS_TRANSACTIONS_HISTORY_LONG. More... | |
static void | fct_reset_events_transactions_current (PFS_thread *pfs) |
void | reset_events_transactions_current () |
Reset table EVENTS_TRANSACTIONS_CURRENT data. More... | |
static void | fct_reset_events_transactions_history (PFS_thread *pfs_thread) |
void | reset_events_transactions_history () |
Reset table EVENTS_TRANSACTIONS_HISTORY data. More... | |
void | reset_events_transactions_history_long () |
Reset table EVENTS_TRANSACTIONS_HISTORY_LONG data. More... | |
static void | fct_reset_events_transactions_by_thread (PFS_thread *thread) |
void | reset_events_transactions_by_thread () |
Reset table EVENTS_TRANSACTIONS_SUMMARY_BY_THREAD_BY_EVENT_NAME data. More... | |
static void | fct_reset_events_transactions_by_account (PFS_account *pfs) |
void | reset_events_transactions_by_account () |
Reset table EVENTS_TRANSACTIONS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME data. More... | |
static void | fct_reset_events_transactions_by_user (PFS_user *pfs) |
void | reset_events_transactions_by_user () |
Reset table EVENTS_TRANSACTIONS_SUMMARY_BY_USER_BY_EVENT_NAME data. More... | |
static void | fct_reset_events_transactions_by_host (PFS_host *pfs) |
void | reset_events_transactions_by_host () |
Reset table EVENTS_TRANSACTIONS_SUMMARY_BY_HOST_BY_EVENT_NAME data. More... | |
void | reset_events_transactions_global () |
Reset table EVENTS_TRANSACTIONS_GLOBAL_BY_EVENT_NAME data. More... | |
bool | xid_printable (PSI_xid *xid, size_t offset, size_t length) |
Check if the XID consists of printable characters, ASCII 32 - 127. More... | |
Variables | |
PFS_ALIGNED ulong | events_transactions_history_long_size = 0 |
PFS_ALIGNED bool | flag_events_transactions_current = false |
Consumer flag for table EVENTS_TRANSACTIONS_CURRENT. More... | |
PFS_ALIGNED bool | flag_events_transactions_history = false |
Consumer flag for table EVENTS_TRANSACTIONS_HISTORY. More... | |
PFS_ALIGNED bool | flag_events_transactions_history_long = false |
Consumer flag for table EVENTS_TRANSACTIONS_HISTORY_LONG. More... | |
PFS_ALIGNED bool | events_transactions_history_long_full = false |
True if EVENTS_TRANSACTIONS_HISTORY_LONG circular buffer is full. More... | |
PFS_ALIGNED PFS_cacheline_atomic_uint32 | events_transactions_history_long_index |
Index in EVENTS_TRANSACTIONS_HISTORY_LONG circular buffer. More... | |
PFS_ALIGNED PFS_events_transactions * | events_transactions_history_long_array |
EVENTS_TRANSACTIONS_HISTORY_LONG circular buffer. More... | |
Events transactions data structures (implementation).
void cleanup_events_transactions_history_long | ( | ) |
Cleanup table EVENTS_TRANSACTIONS_HISTORY_LONG.
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int init_events_transactions_history_long | ( | uint | events_transactions_history_long_sizing | ) |
Initialize table EVENTS_TRANSACTIONS_HISTORY_LONG.
events_transactions_history_long_sizing | table sizing |
void insert_events_transactions_history | ( | PFS_thread * | thread, |
PFS_events_transactions * | transaction | ||
) |
Insert a transaction record in table EVENTS_TRANSACTIONS_HISTORY.
thread | thread that executed the wait |
transaction | record to insert |
void insert_events_transactions_history_long | ( | PFS_events_transactions * | transaction | ) |
Insert a transaction record in table EVENTS_TRANSACTIONS_HISTORY_LONG.
transaction | record to insert |
void reset_events_transactions_by_account | ( | ) |
Reset table EVENTS_TRANSACTIONS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME data.
void reset_events_transactions_by_host | ( | ) |
Reset table EVENTS_TRANSACTIONS_SUMMARY_BY_HOST_BY_EVENT_NAME data.
void reset_events_transactions_by_thread | ( | ) |
Reset table EVENTS_TRANSACTIONS_SUMMARY_BY_THREAD_BY_EVENT_NAME data.
void reset_events_transactions_by_user | ( | ) |
Reset table EVENTS_TRANSACTIONS_SUMMARY_BY_USER_BY_EVENT_NAME data.
void reset_events_transactions_current | ( | ) |
Reset table EVENTS_TRANSACTIONS_CURRENT data.
void reset_events_transactions_global | ( | ) |
Reset table EVENTS_TRANSACTIONS_GLOBAL_BY_EVENT_NAME data.
void reset_events_transactions_history | ( | ) |
Reset table EVENTS_TRANSACTIONS_HISTORY data.
void reset_events_transactions_history_long | ( | ) |
Reset table EVENTS_TRANSACTIONS_HISTORY_LONG data.
bool xid_printable | ( | PSI_xid * | xid, |
size_t | offset, | ||
size_t | length | ||
) |
Check if the XID consists of printable characters, ASCII 32 - 127.
xid | XID structure |
offset | offset into XID.data[] |
length | number of bytes to process |
PFS_ALIGNED PFS_events_transactions* events_transactions_history_long_array |
EVENTS_TRANSACTIONS_HISTORY_LONG circular buffer.
PFS_ALIGNED bool events_transactions_history_long_full = false |
True if EVENTS_TRANSACTIONS_HISTORY_LONG circular buffer is full.
PFS_ALIGNED PFS_cacheline_atomic_uint32 events_transactions_history_long_index |
Index in EVENTS_TRANSACTIONS_HISTORY_LONG circular buffer.
PFS_ALIGNED ulong events_transactions_history_long_size = 0 |
PFS_ALIGNED bool flag_events_transactions_current = false |
Consumer flag for table EVENTS_TRANSACTIONS_CURRENT.
PFS_ALIGNED bool flag_events_transactions_history = false |
Consumer flag for table EVENTS_TRANSACTIONS_HISTORY.
PFS_ALIGNED bool flag_events_transactions_history_long = false |
Consumer flag for table EVENTS_TRANSACTIONS_HISTORY_LONG.