70 [[maybe_unused]])
const override {
74 return (
double)(
stats.records +
stats.deleted) / 20.0 + 10;
77 return (
double)rows / 20.0 + 1;
82 int close(
void)
override;
107 int reset()
override;
127 return memcmp(ref1, ref2,
sizeof(
HEAP_PTR));
130 uint table_changes)
override;
app_data_ptr new_data(u_int n, char *val, cons_type consensus)
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info, dd::Table *table_def) override
Create table (implementation).
Definition: ha_heap.cc:635
int index_first(uchar *buf) override
Definition: ha_heap.cc:297
int rnd_pos(uchar *buf, uchar *pos) override
Definition: ha_heap.cc:320
int disable_indexes(uint mode) override
Disable indexes for a while.
Definition: ha_heap.cc:405
int index_read_idx_map(uchar *buf, uint index, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) override
Positions an index cursor to the index specified in argument.
Definition: ha_heap.cc:275
void drop_table(const char *name) override
Definition: ha_heap.cc:499
bool is_index_algorithm_supported(enum ha_key_alg key_alg) const override
Check if SE supports specific key algorithm.
Definition: ha_heap.h:50
int external_lock(THD *thd, int lock_type) override
Is not invoked for non-transactional temporary tables.
Definition: ha_heap.cc:377
int rnd_next(uchar *buf) override
Definition: ha_heap.cc:313
int index_next(uchar *buf) override
Definition: ha_heap.cc:283
bool single_instance
True if only one ha_heap is to exist for the table.
Definition: ha_heap.h:40
int close(void) override
Definition: ha_heap.cc:150
enum ha_key_alg get_default_index_algorithm() const override
Get default key algorithm for SE.
Definition: ha_heap.h:47
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes) override
Part of old, deprecated in-place ALTER API.
Definition: ha_heap.cc:670
int write_row(uchar *buf) override
Write a row.
Definition: ha_heap.cc:207
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_heap.cc:475
int index_last(uchar *buf) override
Definition: ha_heap.cc:304
int enable_indexes(uint mode) override
Enable indexes again.
Definition: ha_heap.cc:446
int open(const char *name, int mode, uint test_if_locked, const dd::Table *table_def) override
Definition: ha_heap.cc:98
void set_keys_for_scanning(void)
int delete_row(const uchar *buf) override
Definition: ha_heap.cc:241
handler * clone(const char *name, MEM_ROOT *mem_root) override
Definition: ha_heap.cc:166
int cmp_ref(const uchar *ref1, const uchar *ref2) const override
Compare two positions.
Definition: ha_heap.h:126
~ha_heap() override=default
double read_time(uint, uint, ha_rows rows) override
The cost of reading a set of ranges from the table using an index to access it.
Definition: ha_heap.h:76
int extra(enum ha_extra_function operation) override
Storage engine specific implementation of ha_extra()
Definition: ha_heap.cc:359
enum row_type get_real_row_type(const HA_CREATE_INFO *) const override
Get real row type for the table created based on one specified by user, CREATE TABLE options and SE c...
Definition: ha_heap.h:54
void position(const uchar *record) override
Definition: ha_heap.cc:329
HP_INFO * file
Definition: ha_heap.h:34
ulong index_flags(uint inx, uint, bool) const override
Definition: ha_heap.h:63
HP_SHARE * internal_share
Definition: ha_heap.h:35
int update_row(const uchar *old_data, uchar *new_data) override
Update a single row.
Definition: ha_heap.cc:226
const char * table_type() const override
The following can be called without an open handler.
Definition: ha_heap.cc:175
ha_heap(handlerton *hton, TABLE_SHARE *table)
Definition: ha_heap.cc:78
double scan_time() override
Definition: ha_heap.h:73
int info(uint) override
General method to gather info from handler.
Definition: ha_heap.cc:334
int delete_table(const char *from, const dd::Table *table_def) override
Delete a table.
Definition: ha_heap.cc:494
int index_read_last_map(uchar *buf, const uchar *key, key_part_map keypart_map) override
The following functions works like index_read, but it find the last row with the current key value or...
Definition: ha_heap.cc:266
int reset() override
Reset state of file to after 'open'.
Definition: ha_heap.cc:363
uint key_stat_version
Definition: ha_heap.h:38
void update_key_stats()
Update index statistics for the table.
Definition: ha_heap.cc:181
void get_auto_increment(ulonglong offset, ulonglong increment, ulonglong nb_desired_values, ulonglong *first_value, ulonglong *nb_reserved_values) override
Reserves an interval of auto_increment values from the handler.
Definition: ha_heap.cc:661
uint max_supported_key_part_length(HA_CREATE_INFO *create_info) const override
Definition: ha_heap.h:69
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_heap.cc:504
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_heap.cc:311
int index_read_map(uchar *buf, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) override
Positions an index cursor to the index specified in the handle ('active_index').
Definition: ha_heap.cc:256
ulonglong table_flags() const override
Definition: ha_heap.h:57
ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key) override
Find number of records in a range.
Definition: ha_heap.cc:509
uint max_supported_keys() const override
Definition: ha_heap.h:68
int delete_all_rows(void) override
Delete all rows in a table.
Definition: ha_heap.cc:365
int index_prev(uchar *buf) override
Definition: ha_heap.cc:290
int indexes_are_disabled(void) override
Check if indexes are disabled.
Definition: ha_heap.cc:471
uint records_changed
Definition: ha_heap.h:37
void update_create_info(HA_CREATE_INFO *create_info) override
Update create info as part of ALTER TABLE.
Definition: ha_heap.cc:655
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4365
TABLE_SHARE * table_share
Definition: handler.h:4372
TABLE * table
Definition: handler.h:4373
A table definition from the master.
Definition: rpl_utility.h:247
static MEM_ROOT mem_root
Definition: client_plugin.cc:109
uchar * HEAP_PTR
Definition: heap.h:186
ha_key_alg
Definition: my_base.h:96
@ HA_KEY_ALG_HASH
Definition: my_base.h:108
@ HA_KEY_ALG_BTREE
Definition: my_base.h:106
ha_rkey_function
Definition: my_base.h:77
ulong key_part_map
Definition: my_base.h:1006
my_off_t ha_rows
Definition: my_base.h:1139
ha_extra_function
Definition: my_base.h:183
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
unsigned char uchar
Definition: my_inttypes.h:51
static int record
Definition: mysqltest.cc:187
Definition: buf0block_hint.cc:29
mode
Definition: file_handle.h:59
required string key
Definition: replication_asynchronous_connection_failover.proto:59
#define HA_COUNT_ROWS_INSTANT
Definition: handler.h:331
#define HA_BINLOG_ROW_CAPABLE
Definition: handler.h:338
#define HA_READ_NEXT
Definition: handler.h:525
#define HA_NO_BLOBS
Definition: handler.h:251
#define HA_KEY_SCAN_NOT_ROR
Definition: handler.h:575
row_type
Definition: handler.h:675
@ ROW_TYPE_FIXED
Definition: handler.h:678
#define HA_BINLOG_STMT_CAPABLE
Definition: handler.h:339
#define HA_READ_ORDER
Definition: handler.h:541
#define HA_FAST_KEY_READ
Definition: handler.h:233
#define HA_READ_RANGE
Definition: handler.h:548
#define HA_NO_TRANSACTIONS
Definition: handler.h:209
#define HA_STATS_RECORDS_IS_EXACT
Definition: handler.h:271
#define HA_NULL_IN_KEY
Definition: handler.h:244
#define HA_ONLY_WHOLE_INDEX
Definition: handler.h:553
#define HA_READ_PREV
Definition: handler.h:529
constexpr const unsigned int MAX_KEY
Definition: sql_const.h:45
constexpr const unsigned int MAX_KEY_LENGTH
Definition: sql_const.h:47
case opt name
Definition: sslopt-case.h:32
Definition: handler.h:2998
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:82
This structure is shared between different table objects.
Definition: table.h:688
KEY * key_info
Definition: table.h:744
Definition: thr_lock.h:123
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2594
Definition: my_base.h:1123
Definition: mysqlslap.cc:237
thr_lock_type
Definition: thr_lock.h:50
unsigned int uint
Definition: uca9-dump.cc:74