24#ifndef HA_PERFSCHEMA_H
25#define HA_PERFSCHEMA_H
101 ulong
index_flags(uint idx, uint part,
bool all_parts)
const override;
118 [[maybe_unused]])
const override {
122 int index_init(uint idx,
bool sorted)
override;
141 int open(
const char *
name,
int mode, uint test_if_locked,
148 int close()
override;
203 int info(uint)
override;
app_data_ptr new_data(u_int n, char *val, cons_type consensus)
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:70
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
A handler for a PERFORMANCE_SCHEMA table.
Definition: ha_perfschema.h:56
void use_hidden_primary_key() override
use_hidden_primary_key() is called in case of an update/delete when (table_flags() and HA_PRIMARY_KEY...
Definition: ha_perfschema.cc:1689
ulong index_flags(uint idx, uint part, bool all_parts) const override
Operations supported by indexes.
Definition: ha_perfschema.cc:1911
uint max_supported_record_length() const override
Definition: ha_perfschema.h:107
int open(const char *name, int mode, uint test_if_locked, const dd::Table *table_def) override
Open a performance schema table.
Definition: ha_perfschema.cc:1633
THR_LOCK_DATA m_thr_lock
MySQL lock.
Definition: ha_perfschema.h:253
enum ha_key_alg get_default_index_algorithm() const override
Get default key algorithm for SE.
Definition: ha_perfschema.h:103
int rename_table(const char *from, const char *to, const dd::Table *from_table_def, dd::Table *to_table_def) override
Default rename_table() and delete_table() rename/delete files with a given name and extensions from h...
Definition: ha_perfschema.cc:1849
int index_end() override
Definition: ha_perfschema.cc:1961
PFS_engine_table_share * m_table_share
Performance schema table share for this table handler.
Definition: ha_perfschema.h:255
void position(const uchar *record) override
Read the row current position.
Definition: ha_perfschema.cc:1777
THR_LOCK_DATA ** store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type) override
Is not invoked for non-transactional temporary tables.
Definition: ha_perfschema.cc:1834
int delete_row(const uchar *buf) override
Delete a row.
Definition: ha_perfschema.cc:1716
~ha_perfschema() override
int truncate(dd::Table *table_def) override
Quickly remove all rows from a table.
Definition: ha_perfschema.cc:1832
int delete_all_rows() override
Delete all rows in a table.
Definition: ha_perfschema.cc:1811
ha_rows estimate_rows_upper_bound() override
Return upper bound of current number of records in the table (max.
Definition: ha_perfschema.h:129
int index_read(uchar *buf, const uchar *key, uint key_len, enum ha_rkey_function find_flag) override
Positions an index cursor to the index specified in the handle.
Definition: ha_perfschema.cc:1976
double scan_time() override
Definition: ha_perfschema.h:131
uint max_supported_key_length() const override
Definition: ha_perfschema.h:115
int rnd_end() override
Scan end.
Definition: ha_perfschema.cc:1750
const char * index_type(uint key_number)
Definition: ha_perfschema.cc:1909
ulonglong table_flags() const override
Capabilities of the performance schema tables.
Definition: ha_perfschema.h:72
int create(const char *name, TABLE *table_arg, HA_CREATE_INFO *create_info, dd::Table *table_def) override
Create table (implementation).
Definition: ha_perfschema.cc:1855
uint max_supported_key_parts() const override
Definition: ha_perfschema.h:113
int delete_table(const char *from, const dd::Table *table_def) override
Delete a table.
Definition: ha_perfschema.cc:1844
int info(uint) override
General method to gather info from handler.
Definition: ha_perfschema.cc:1799
int rnd_init(bool scan) override
rnd_init() can be called two times without rnd_end() in between (it only makes sense if scan=1).
Definition: ha_perfschema.cc:1728
int index_next_same(uchar *buf, const uchar *key, uint keylen) override
Reads the next row matching the given key value.
Definition: ha_perfschema.cc:2034
uint max_supported_key_part_length(HA_CREATE_INFO *create_info) const override
Definition: ha_perfschema.h:117
int rnd_pos(uchar *buf, uchar *pos) override
Iterator, fetch the row at a given position.
Definition: ha_perfschema.cc:1784
int index_init(uint idx, bool sorted) override
Initializes a handle to use an index.
Definition: ha_perfschema.cc:1937
ha_perfschema(handlerton *hton, TABLE_SHARE *share)
Create a new performance schema table handle on a table.
Definition: ha_perfschema.cc:1628
int update_row(const uchar *old_data, uchar *new_data) override
Update a row.
Definition: ha_perfschema.cc:1699
void print_error(int error, myf errflags) override
Print error that we got from handler function.
Definition: ha_perfschema.cc:1880
int write_row(uchar *buf) override
Write a row.
Definition: ha_perfschema.cc:1672
uint max_supported_keys() const override
Definition: ha_perfschema.h:111
int close() override
Close a table handle.
Definition: ha_perfschema.cc:1657
const char * table_type() const override
The following can be called without an open handler.
Definition: ha_perfschema.h:67
int index_next(uchar *buf) override
Reads the next row from a cursor, which must have previously been positioned by index_read.
Definition: ha_perfschema.cc:2013
int rnd_next(uchar *buf) override
Iterator, fetch the next row.
Definition: ha_perfschema.cc:1758
bool is_executed_by_slave() const
Check if the caller is a replication thread or the caller is called by a client thread executing base...
Definition: ha_perfschema.cc:2052
PFS_engine_table * m_table
Performance schema table cursor.
Definition: ha_perfschema.h:257
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4583
A table definition from the master.
Definition: rpl_utility.h:249
This file includes constants used by all storage engines.
ha_key_alg
Definition: my_base.h:98
@ HA_KEY_ALG_HASH
Definition: my_base.h:110
ha_rkey_function
Definition: my_base.h:78
my_off_t ha_rows
Definition: my_base.h:1141
#define HA_POS_ERROR
Definition: my_base.h:1143
#define HA_NULL_PART_KEY
Some key part is nullable.
Definition: my_base.h:497
Some integer typedefs for easier portability.
int myf
Definition: my_inttypes.h:94
unsigned long long int ulonglong
Definition: my_inttypes.h:56
unsigned char uchar
Definition: my_inttypes.h:52
static int record
Definition: mysqltest.cc:193
Definition: buf0block_hint.cc:30
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
mode
Definition: file_handle.h:61
required string key
Definition: replication_asynchronous_connection_failover.proto:60
#define HA_MAX_REC_LENGTH
Definition: handler.h:625
#define HA_PRIMARY_KEY_REQUIRED_FOR_DELETE
Definition: handler.h:305
#define HA_NO_TRANSACTIONS
Definition: handler.h:218
#define HA_NULL_IN_KEY
Definition: handler.h:253
#define HA_NO_AUTO_INCREMENT
Definition: handler.h:322
File containing constants that can be used throughout the server.
constexpr const unsigned int MAX_KEY
Definition: sql_const.h:45
constexpr const unsigned int MAX_REF_PARTS
Definition: sql_const.h:46
constexpr const unsigned int MAX_KEY_LENGTH
Definition: sql_const.h:47
case opt name
Definition: sslopt-case.h:29
Struct to hold information about the table that should be created.
Definition: handler.h:3210
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:359
This structure is shared between different table objects.
Definition: table.h:704
Definition: thr_lock.h:124
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2740
thr_lock_type
Definition: thr_lock.h:51