24#ifndef TABLE_EVENTS_TRANSACTIONS_H
25#define TABLE_EVENTS_TRANSACTIONS_H
151 bool read_all)
override;
178 int rnd_pos(
const void *pos)
override;
180 int index_init(uint idx,
bool sorted)
override;
220 int rnd_pos(
const void *pos)
override;
222 int index_init(uint idx,
bool sorted)
override;
257 int rnd_pos(
const void *pos)
override;
Definition: pfs_engine_table.h:300
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:70
Definition: table_events_transactions.h:54
PFS_key_thread_id m_key_1
Definition: table_events_transactions.h:67
PFS_key_event_id m_key_2
Definition: table_events_transactions.h:68
PFS_index_events_transactions()
Definition: table_events_transactions.h:56
bool match(PFS_thread *pfs)
Definition: table_events_transactions.cc:206
~PFS_index_events_transactions() override=default
Definition: table_helper.h:1295
Definition: table_helper.h:1279
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:40
Adapter, for table sharing the structure of PERFORMANCE_SCHEMA.EVENTS_TRANSACTIONS_CURRENT.
Definition: table_events_transactions.h:148
int read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) override
Read the current row values.
Definition: table_events_transactions.cc:370
int make_row(PFS_events_transactions *transaction)
Build a row.
Definition: table_events_transactions.cc:234
row_events_transactions m_row
Current row.
Definition: table_events_transactions.h:161
~table_events_transactions_common() override=default
table_events_transactions_common(const PFS_engine_table_share *share, void *pos)
Definition: table_events_transactions.cc:224
Table PERFORMANCE_SCHEMA.EVENTS_TRANSACTIONS_CURRENT.
Definition: table_events_transactions.h:166
table_events_transactions_current()
Definition: table_events_transactions.cc:518
PFS_simple_index m_pos
Current position.
Definition: table_events_transactions.h:199
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_transactions.h:194
static ha_rows get_row_count()
Definition: table_events_transactions.cc:602
int index_init(uint idx, bool sorted) override
Definition: table_events_transactions.cc:564
int index_next() override
Find key in index, read record.
Definition: table_events_transactions.cc:574
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_transactions.cc:513
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_transactions.cc:530
static int delete_all_rows()
Definition: table_events_transactions.cc:597
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_transactions.cc:528
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_transactions.cc:547
PFS_simple_index m_next_pos
Next position.
Definition: table_events_transactions.h:201
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_transactions.cc:523
static Plugin_table m_table_def
Table definition.
Definition: table_events_transactions.h:196
PFS_index_events_transactions * m_opened_index
Definition: table_events_transactions.h:203
static PFS_engine_table_share m_share
Table share.
Definition: table_events_transactions.h:169
~table_events_transactions_current() override=default
Table PERFORMANCE_SCHEMA.EVENTS_TRANSACTIONS_HISTORY_LONG.
Definition: table_events_transactions.h:247
static PFS_engine_table_share m_share
Table share.
Definition: table_events_transactions.h:250
PFS_simple_index m_pos
Current position.
Definition: table_events_transactions.h:273
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_transactions.cc:756
static ha_rows get_row_count()
Definition: table_events_transactions.cc:824
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_transactions.cc:746
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_transactions.cc:790
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_transactions.cc:761
static int delete_all_rows()
Definition: table_events_transactions.cc:819
~table_events_transactions_history_long() override=default
static Plugin_table m_table_def
Table definition.
Definition: table_events_transactions.h:270
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_transactions.cc:763
table_events_transactions_history_long()
Definition: table_events_transactions.cc:751
PFS_simple_index m_next_pos
Next position.
Definition: table_events_transactions.h:275
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_transactions.h:268
Table PERFORMANCE_SCHEMA.EVENTS_TRANSACTIONS_HISTORY.
Definition: table_events_transactions.h:208
int index_init(uint idx, bool sorted) override
Definition: table_events_transactions.cc:683
pos_events_transactions_history m_pos
Current position.
Definition: table_events_transactions.h:238
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_transactions.cc:606
~table_events_transactions_history() override=default
static int delete_all_rows()
Definition: table_events_transactions.cc:736
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_transactions.cc:623
static PFS_engine_table_share m_share
Table share.
Definition: table_events_transactions.h:211
static Plugin_table m_table_def
Table definition.
Definition: table_events_transactions.h:235
static ha_rows get_row_count()
Definition: table_events_transactions.cc:741
pos_events_transactions_history m_next_pos
Next position.
Definition: table_events_transactions.h:240
table_events_transactions_history()
Definition: table_events_transactions.cc:611
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_transactions.cc:658
PFS_index_events_transactions * m_opened_index
Definition: table_events_transactions.h:242
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_transactions.cc:616
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_transactions.h:233
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_transactions.cc:621
int index_next() override
Find key in index, read record.
Definition: table_events_transactions.cc:693
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1141
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: buf0block_hint.cc:30
Data types for columns used in the performance schema tables (declarations)
enum_isolation_level
Enum values for transaction isolation level columns.
Definition: pfs_column_types.h:324
enum_transaction_state
Enum values for transaction state columns.
Definition: pfs_column_types.h:287
#define COL_SOURCE_SIZE
Size of the SOURCE columns, in bytes.
Definition: pfs_column_types.h:76
enum_event_type
Enum values for the NESTING_EVENT_TYPE columns.
Definition: pfs_column_types.h:270
enum_xa_transaction_state
Enum values for XA transaction state columns.
Definition: pfs_column_types.h:304
Performance schema tables (declarations).
Events transactions data structures (declarations).
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:66
static const int MAX_TEXT_LENGTH
Definition: rpl_gtid.h:4104
Position of a double cursor, for iterations using 2 nested loops.
Definition: pfs_engine_table.h:601
uint m_index_1
Outer index.
Definition: pfs_engine_table.h:603
uint m_index_2
Current index within index_1.
Definition: pfs_engine_table.h:605
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:358
A transaction record.
Definition: pfs_events_transactions.h:86
An event record.
Definition: pfs_events.h:38
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:566
Instrumented thread implementation.
Definition: pfs_instr.h:375
struct PSI_xid is binary compatible with the XID structure as in the X/Open CAE Specification,...
Definition: pfs_events_transactions.h:65
Definition: thr_lock.h:139
Position of a cursor on PERFORMANCE_SCHEMA.EVENTS_TRANSACTIONS_HISTORY.
Definition: table_events_transactions.h:130
void next_thread()
Definition: table_events_transactions.h:138
void reset()
Definition: table_events_transactions.h:133
pos_events_transactions_history()
Definition: table_events_transactions.h:131
A row of table_events_transactions_common.
Definition: table_events_transactions.h:72
char m_gtid[Gtid_specification::MAX_TEXT_LENGTH+1]
Global Transaction ID.
Definition: table_events_transactions.h:102
ulonglong m_rollback_to_savepoint_count
Column NUMBER_OF_ROLLBACK_TO_SAVEPOINT.
Definition: table_events_transactions.h:120
bool m_read_only
True if read-only, read-write otherwise.
Definition: table_events_transactions.h:116
enum_event_type m_nesting_event_type
Column NESTING_EVENT_TYPE.
Definition: table_events_transactions.h:82
int m_gtid_length
GTID length in bytes.
Definition: table_events_transactions.h:104
PSI_xid m_xid
XA transaction ID.
Definition: table_events_transactions.h:106
ulonglong m_nesting_event_id
Column NESTING_EVENT_ID.
Definition: table_events_transactions.h:80
ulonglong m_timer_wait
Column TIMER_WAIT.
Definition: table_events_transactions.h:92
ulonglong m_event_id
Column EVENT_ID.
Definition: table_events_transactions.h:76
enum_isolation_level m_isolation_level
Isolation level.
Definition: table_events_transactions.h:114
const char * m_name
Column EVENT_NAME.
Definition: table_events_transactions.h:84
bool m_autocommit
True if autocommit transaction.
Definition: table_events_transactions.h:112
enum_transaction_state m_state
Transaction state.
Definition: table_events_transactions.h:100
uint m_source_length
Length in bytes of m_source.
Definition: table_events_transactions.h:96
ulonglong m_timer_start
Column TIMER_START.
Definition: table_events_transactions.h:88
char m_source[COL_SOURCE_SIZE]
Column SOURCE.
Definition: table_events_transactions.h:94
ulonglong m_thread_internal_id
Column THREAD_ID.
Definition: table_events_transactions.h:74
ulonglong m_end_event_id
Column END_EVENT_ID.
Definition: table_events_transactions.h:78
uint m_name_length
Length in bytes of m_name.
Definition: table_events_transactions.h:86
enum_xa_transaction_state m_xa_state
XA transaction state.
Definition: table_events_transactions.h:108
bool m_xa
True if XA transaction.
Definition: table_events_transactions.h:110
ulonglong m_timer_end
Column TIMER_END.
Definition: table_events_transactions.h:90
ulonglong m_savepoint_count
Column NUMBER_OF_SAVEPOINTS.
Definition: table_events_transactions.h:118
ulonglong m_trxid
InnoDB transaction id.
Definition: table_events_transactions.h:98
ulonglong m_release_savepoint_count
Column NUMBER_OF_RELEASE_SAVEPOINT.
Definition: table_events_transactions.h:122
Helpers to implement a performance schema table.