71 [[maybe_unused]])
const override {
75 return (
double)(
stats.records +
stats.deleted) / 20.0 + 10;
78 return (
double)rows / 20.0 + 1;
83 int close(
void)
override;
108 int reset()
override;
128 return memcmp(ref1, ref2,
sizeof(
HEAP_PTR));
131 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:34
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info, dd::Table *table_def) override
Create table (implementation).
Definition: ha_heap.cc:636
int index_first(uchar *buf) override
Definition: ha_heap.cc:298
int rnd_pos(uchar *buf, uchar *pos) override
Definition: ha_heap.cc:321
int disable_indexes(uint mode) override
Disable indexes for a while.
Definition: ha_heap.cc:406
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:276
void drop_table(const char *name) override
Definition: ha_heap.cc:500
bool is_index_algorithm_supported(enum ha_key_alg key_alg) const override
Check if SE supports specific key algorithm.
Definition: ha_heap.h:51
int external_lock(THD *thd, int lock_type) override
Is not invoked for non-transactional temporary tables.
Definition: ha_heap.cc:378
int rnd_next(uchar *buf) override
Definition: ha_heap.cc:314
int index_next(uchar *buf) override
Definition: ha_heap.cc:284
bool single_instance
True if only one ha_heap is to exist for the table.
Definition: ha_heap.h:41
int close(void) override
Definition: ha_heap.cc:151
enum ha_key_alg get_default_index_algorithm() const override
Get default key algorithm for SE.
Definition: ha_heap.h:48
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:671
int write_row(uchar *buf) override
Write a row.
Definition: ha_heap.cc:208
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:476
int index_last(uchar *buf) override
Definition: ha_heap.cc:305
int enable_indexes(uint mode) override
Enable indexes again.
Definition: ha_heap.cc:447
int open(const char *name, int mode, uint test_if_locked, const dd::Table *table_def) override
Definition: ha_heap.cc:99
void set_keys_for_scanning(void)
int delete_row(const uchar *buf) override
Definition: ha_heap.cc:242
handler * clone(const char *name, MEM_ROOT *mem_root) override
Definition: ha_heap.cc:167
int cmp_ref(const uchar *ref1, const uchar *ref2) const override
Compare two positions.
Definition: ha_heap.h:127
~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:77
int extra(enum ha_extra_function operation) override
Storage engine specific implementation of ha_extra()
Definition: ha_heap.cc:360
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:55
void position(const uchar *record) override
Definition: ha_heap.cc:330
HP_INFO * file
Definition: ha_heap.h:35
ulong index_flags(uint inx, uint, bool) const override
Definition: ha_heap.h:64
HP_SHARE * internal_share
Definition: ha_heap.h:36
int update_row(const uchar *old_data, uchar *new_data) override
Update a single row.
Definition: ha_heap.cc:227
const char * table_type() const override
The following can be called without an open handler.
Definition: ha_heap.cc:176
ha_heap(handlerton *hton, TABLE_SHARE *table)
Definition: ha_heap.cc:79
double scan_time() override
Definition: ha_heap.h:74
int info(uint) override
General method to gather info from handler.
Definition: ha_heap.cc:335
int delete_table(const char *from, const dd::Table *table_def) override
Delete a table.
Definition: ha_heap.cc:495
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:267
int reset() override
Reset state of file to after 'open'.
Definition: ha_heap.cc:364
uint key_stat_version
Definition: ha_heap.h:39
void update_key_stats()
Update index statistics for the table.
Definition: ha_heap.cc:182
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:662
uint max_supported_key_part_length(HA_CREATE_INFO *create_info) const override
Definition: ha_heap.h:70
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:505
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:312
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:257
ulonglong table_flags() const override
Definition: ha_heap.h:58
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:510
uint max_supported_keys() const override
Definition: ha_heap.h:69
int delete_all_rows(void) override
Delete all rows in a table.
Definition: ha_heap.cc:366
int index_prev(uchar *buf) override
Definition: ha_heap.cc:291
int indexes_are_disabled(void) override
Check if indexes are disabled.
Definition: ha_heap.cc:472
uint records_changed
Definition: ha_heap.h:38
void update_create_info(HA_CREATE_INFO *create_info) override
Update create info as part of ALTER TABLE.
Definition: ha_heap.cc:656
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4414
TABLE_SHARE * table_share
Definition: handler.h:4421
TABLE * table
Definition: handler.h:4422
A table definition from the master.
Definition: rpl_utility.h:248
static MEM_ROOT mem_root
Definition: client_plugin.cc:110
uchar * HEAP_PTR
Definition: heap.h:187
ha_key_alg
Definition: my_base.h:97
@ HA_KEY_ALG_HASH
Definition: my_base.h:109
@ HA_KEY_ALG_BTREE
Definition: my_base.h:107
ha_rkey_function
Definition: my_base.h:78
ulong key_part_map
Definition: my_base.h:1007
my_off_t ha_rows
Definition: my_base.h:1140
ha_extra_function
Definition: my_base.h:184
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
unsigned char uchar
Definition: my_inttypes.h:52
static int record
Definition: mysqltest.cc:188
Definition: buf0block_hint.cc:30
mode
Definition: file_handle.h:60
required string key
Definition: replication_asynchronous_connection_failover.proto:60
#define HA_COUNT_ROWS_INSTANT
Definition: handler.h:332
#define HA_BINLOG_ROW_CAPABLE
Definition: handler.h:339
#define HA_READ_NEXT
Definition: handler.h:526
#define HA_NO_BLOBS
Definition: handler.h:252
#define HA_KEY_SCAN_NOT_ROR
Definition: handler.h:576
row_type
Definition: handler.h:676
@ ROW_TYPE_FIXED
Definition: handler.h:679
#define HA_BINLOG_STMT_CAPABLE
Definition: handler.h:340
#define HA_READ_ORDER
Definition: handler.h:542
#define HA_FAST_KEY_READ
Definition: handler.h:234
#define HA_READ_RANGE
Definition: handler.h:549
#define HA_NO_TRANSACTIONS
Definition: handler.h:210
#define HA_STATS_RECORDS_IS_EXACT
Definition: handler.h:272
#define HA_NULL_IN_KEY
Definition: handler.h:245
#define HA_ONLY_WHOLE_INDEX
Definition: handler.h:554
#define HA_READ_PREV
Definition: handler.h:530
constexpr const unsigned int MAX_KEY
Definition: sql_const.h:46
constexpr const unsigned int MAX_KEY_LENGTH
Definition: sql_const.h:48
case opt name
Definition: sslopt-case.h:33
Struct to hold information about the table that should be created.
Definition: handler.h:3045
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
This structure is shared between different table objects.
Definition: table.h:690
KEY * key_info
Definition: table.h:746
Definition: thr_lock.h:124
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2622
Definition: my_base.h:1124
Definition: mysqlslap.cc:238
thr_lock_type
Definition: thr_lock.h:51
unsigned int uint
Definition: uca9-dump.cc:75