23#ifndef TABLE_EVENTS_TRANSACTIONS_H
24#define TABLE_EVENTS_TRANSACTIONS_H
150 bool read_all)
override;
177 int rnd_pos(
const void *pos)
override;
179 int index_init(uint idx,
bool sorted)
override;
219 int rnd_pos(
const void *pos)
override;
221 int index_init(uint idx,
bool sorted)
override;
256 int rnd_pos(
const void *pos)
override;
Definition: pfs_engine_table.h:299
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:69
Definition: table_events_transactions.h:53
PFS_key_thread_id m_key_1
Definition: table_events_transactions.h:66
PFS_key_event_id m_key_2
Definition: table_events_transactions.h:67
PFS_index_events_transactions()
Definition: table_events_transactions.h:55
bool match(PFS_thread *pfs)
Definition: table_events_transactions.cc:205
~PFS_index_events_transactions() override=default
Definition: table_helper.h:1267
Definition: table_helper.h:1251
Class to hold information regarding a table to be created on behalf of a plugin.
Definition: plugin_table.h:39
Adapter, for table sharing the structure of PERFORMANCE_SCHEMA.EVENTS_TRANSACTIONS_CURRENT.
Definition: table_events_transactions.h:147
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:367
int make_row(PFS_events_transactions *transaction)
Build a row.
Definition: table_events_transactions.cc:233
row_events_transactions m_row
Current row.
Definition: table_events_transactions.h:160
~table_events_transactions_common() override=default
table_events_transactions_common(const PFS_engine_table_share *share, void *pos)
Definition: table_events_transactions.cc:223
Table PERFORMANCE_SCHEMA.EVENTS_TRANSACTIONS_CURRENT.
Definition: table_events_transactions.h:165
table_events_transactions_current()
Definition: table_events_transactions.cc:515
PFS_simple_index m_pos
Current position.
Definition: table_events_transactions.h:198
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_transactions.h:193
static ha_rows get_row_count()
Definition: table_events_transactions.cc:599
int index_init(uint idx, bool sorted) override
Definition: table_events_transactions.cc:561
int index_next() override
Find key in index, read record.
Definition: table_events_transactions.cc:571
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_transactions.cc:510
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_transactions.cc:527
static int delete_all_rows()
Definition: table_events_transactions.cc:594
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_transactions.cc:525
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_transactions.cc:544
PFS_simple_index m_next_pos
Next position.
Definition: table_events_transactions.h:200
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_transactions.cc:520
static Plugin_table m_table_def
Table definition.
Definition: table_events_transactions.h:195
PFS_index_events_transactions * m_opened_index
Definition: table_events_transactions.h:202
static PFS_engine_table_share m_share
Table share.
Definition: table_events_transactions.h:168
~table_events_transactions_current() override=default
Table PERFORMANCE_SCHEMA.EVENTS_TRANSACTIONS_HISTORY_LONG.
Definition: table_events_transactions.h:246
static PFS_engine_table_share m_share
Table share.
Definition: table_events_transactions.h:249
PFS_simple_index m_pos
Current position.
Definition: table_events_transactions.h:272
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_transactions.cc:753
static ha_rows get_row_count()
Definition: table_events_transactions.cc:821
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_transactions.cc:743
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_transactions.cc:787
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_transactions.cc:758
static int delete_all_rows()
Definition: table_events_transactions.cc:816
~table_events_transactions_history_long() override=default
static Plugin_table m_table_def
Table definition.
Definition: table_events_transactions.h:269
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_transactions.cc:760
table_events_transactions_history_long()
Definition: table_events_transactions.cc:748
PFS_simple_index m_next_pos
Next position.
Definition: table_events_transactions.h:274
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_transactions.h:267
Table PERFORMANCE_SCHEMA.EVENTS_TRANSACTIONS_HISTORY.
Definition: table_events_transactions.h:207
int index_init(uint idx, bool sorted) override
Definition: table_events_transactions.cc:680
pos_events_transactions_history m_pos
Current position.
Definition: table_events_transactions.h:237
static PFS_engine_table * create(PFS_engine_table_share *)
Definition: table_events_transactions.cc:603
~table_events_transactions_history() override=default
static int delete_all_rows()
Definition: table_events_transactions.cc:733
int rnd_next() override
Fetch the next row in this cursor.
Definition: table_events_transactions.cc:620
static PFS_engine_table_share m_share
Table share.
Definition: table_events_transactions.h:210
static Plugin_table m_table_def
Table definition.
Definition: table_events_transactions.h:234
static ha_rows get_row_count()
Definition: table_events_transactions.cc:738
pos_events_transactions_history m_next_pos
Next position.
Definition: table_events_transactions.h:239
table_events_transactions_history()
Definition: table_events_transactions.cc:608
int rnd_pos(const void *pos) override
Fetch a row by position.
Definition: table_events_transactions.cc:655
PFS_index_events_transactions * m_opened_index
Definition: table_events_transactions.h:241
void reset_position() override
Reset the cursor position to the beginning of the table.
Definition: table_events_transactions.cc:613
static THR_LOCK m_table_lock
Table share lock.
Definition: table_events_transactions.h:232
int rnd_init(bool scan) override
Initialize table scan.
Definition: table_events_transactions.cc:618
int index_next() override
Find key in index, read record.
Definition: table_events_transactions.cc:690
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1139
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
static PFS_engine_table_share_proxy table
Definition: pfs.cc:60
Definition: buf0block_hint.cc:29
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:323
enum_transaction_state
Enum values for transaction state columns.
Definition: pfs_column_types.h:286
#define COL_SOURCE_SIZE
Size of the SOURCE columns, in bytes.
Definition: pfs_column_types.h:75
enum_event_type
Enum values for the NESTING_EVENT_TYPE columns.
Definition: pfs_column_types.h:269
enum_xa_transaction_state
Enum values for XA transaction state columns.
Definition: pfs_column_types.h:303
Performance schema tables (declarations).
Events transactions data structures (declarations).
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:65
static const int MAX_TEXT_LENGTH
Definition: rpl_gtid.h:3852
Position of a double cursor, for iterations using 2 nested loops.
Definition: pfs_engine_table.h:592
uint m_index_1
Outer index.
Definition: pfs_engine_table.h:594
uint m_index_2
Current index within index_1.
Definition: pfs_engine_table.h:596
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:357
A transaction record.
Definition: pfs_events_transactions.h:84
An event record.
Definition: pfs_events.h:37
Position of a cursor, for simple iterations.
Definition: pfs_engine_table.h:557
Instrumented thread implementation.
Definition: pfs_instr.h:374
struct PSI_xid is binary compatible with the XID structure as in the X/Open CAE Specification,...
Definition: pfs_events_transactions.h:63
Definition: thr_lock.h:138
Position of a cursor on PERFORMANCE_SCHEMA.EVENTS_TRANSACTIONS_HISTORY.
Definition: table_events_transactions.h:129
void next_thread()
Definition: table_events_transactions.h:137
void reset()
Definition: table_events_transactions.h:132
pos_events_transactions_history()
Definition: table_events_transactions.h:130
A row of table_events_transactions_common.
Definition: table_events_transactions.h:71
char m_gtid[Gtid_specification::MAX_TEXT_LENGTH+1]
Global Transaction ID.
Definition: table_events_transactions.h:101
ulonglong m_rollback_to_savepoint_count
Column NUMBER_OF_ROLLBACK_TO_SAVEPOINT.
Definition: table_events_transactions.h:119
bool m_read_only
True if read-only, read-write otherwise.
Definition: table_events_transactions.h:115
enum_event_type m_nesting_event_type
Column NESTING_EVENT_TYPE.
Definition: table_events_transactions.h:81
int m_gtid_length
GTID length in bytes.
Definition: table_events_transactions.h:103
PSI_xid m_xid
XA transaction ID.
Definition: table_events_transactions.h:105
ulonglong m_nesting_event_id
Column NESTING_EVENT_ID.
Definition: table_events_transactions.h:79
ulonglong m_timer_wait
Column TIMER_WAIT.
Definition: table_events_transactions.h:91
ulonglong m_event_id
Column EVENT_ID.
Definition: table_events_transactions.h:75
enum_isolation_level m_isolation_level
Isolation level.
Definition: table_events_transactions.h:113
const char * m_name
Column EVENT_NAME.
Definition: table_events_transactions.h:83
bool m_autocommit
True if autocommit transaction.
Definition: table_events_transactions.h:111
enum_transaction_state m_state
Transaction state.
Definition: table_events_transactions.h:99
uint m_source_length
Length in bytes of m_source.
Definition: table_events_transactions.h:95
ulonglong m_timer_start
Column TIMER_START.
Definition: table_events_transactions.h:87
char m_source[COL_SOURCE_SIZE]
Column SOURCE.
Definition: table_events_transactions.h:93
ulonglong m_thread_internal_id
Column THREAD_ID.
Definition: table_events_transactions.h:73
ulonglong m_end_event_id
Column END_EVENT_ID.
Definition: table_events_transactions.h:77
uint m_name_length
Length in bytes of m_name.
Definition: table_events_transactions.h:85
enum_xa_transaction_state m_xa_state
XA transaction state.
Definition: table_events_transactions.h:107
bool m_xa
True if XA transaction.
Definition: table_events_transactions.h:109
ulonglong m_timer_end
Column TIMER_END.
Definition: table_events_transactions.h:89
ulonglong m_savepoint_count
Column NUMBER_OF_SAVEPOINTS.
Definition: table_events_transactions.h:117
ulonglong m_trxid
InnoDB transaction id.
Definition: table_events_transactions.h:97
ulonglong m_release_savepoint_count
Column NUMBER_OF_RELEASE_SAVEPOINT.
Definition: table_events_transactions.h:121
Helpers to implement a performance schema table.