71 [[maybe_unused]])
const override {
75 return (
double)(
stats.records +
stats.deleted) / 20.0 + 10;
78 return (
double)rows / 20.0 + 1;
81 int open(
const char *
name,
int mode, uint test_if_locked,
83 int close(
void)
override;
106 int info(uint)
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:36
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info, dd::Table *table_def) override
Create table (implementation).
Definition: ha_heap.cc:640
int index_first(uchar *buf) override
Definition: ha_heap.cc:302
int rnd_pos(uchar *buf, uchar *pos) override
Definition: ha_heap.cc:325
int disable_indexes(uint mode) override
Disable indexes for a while.
Definition: ha_heap.cc:410
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:280
void drop_table(const char *name) override
Definition: ha_heap.cc:504
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:382
int rnd_next(uchar *buf) override
Definition: ha_heap.cc:318
int index_next(uchar *buf) override
Definition: ha_heap.cc:288
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:148
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:675
int write_row(uchar *buf) override
Write a row.
Definition: ha_heap.cc:205
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:480
int index_last(uchar *buf) override
Definition: ha_heap.cc:309
int enable_indexes(uint mode) override
Enable indexes again.
Definition: ha_heap.cc:451
int open(const char *name, int mode, uint test_if_locked, const dd::Table *table_def) override
Definition: ha_heap.cc:97
void set_keys_for_scanning(void)
int delete_row(const uchar *buf) override
Definition: ha_heap.cc:246
handler * clone(const char *name, MEM_ROOT *mem_root) override
Definition: ha_heap.cc:164
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:364
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:334
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:231
const char * table_type() const override
The following can be called without an open handler.
Definition: ha_heap.cc:173
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:339
int delete_table(const char *from, const dd::Table *table_def) override
Delete a table.
Definition: ha_heap.cc:499
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:271
int reset() override
Reset state of file to after 'open'.
Definition: ha_heap.cc:368
uint key_stat_version
Definition: ha_heap.h:39
void update_key_stats()
Update index statistics for the table.
Definition: ha_heap.cc:179
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:666
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:509
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:316
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:261
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:514
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:370
int index_prev(uchar *buf) override
Definition: ha_heap.cc:295
int indexes_are_disabled(void) override
Check if indexes are disabled.
Definition: ha_heap.cc:476
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:660
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4583
TABLE_SHARE * table_share
Definition: handler.h:4591
TABLE * table
Definition: handler.h:4592
A table definition from the master.
Definition: rpl_utility.h:249
static MEM_ROOT mem_root
Definition: client_plugin.cc:114
uchar * HEAP_PTR
Definition: heap.h:187
ha_key_alg
Definition: my_base.h:98
@ HA_KEY_ALG_HASH
Definition: my_base.h:110
@ HA_KEY_ALG_BTREE
Definition: my_base.h:108
ha_rkey_function
Definition: my_base.h:78
ulong key_part_map
Definition: my_base.h:1008
my_off_t ha_rows
Definition: my_base.h:1141
ha_extra_function
Definition: my_base.h:185
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:193
Definition: buf0block_hint.cc:30
mode
Definition: file_handle.h:61
required string key
Definition: replication_asynchronous_connection_failover.proto:60
#define HA_COUNT_ROWS_INSTANT
Definition: handler.h:340
#define HA_BINLOG_ROW_CAPABLE
Definition: handler.h:347
#define HA_READ_NEXT
Definition: handler.h:534
#define HA_NO_BLOBS
Definition: handler.h:260
#define HA_KEY_SCAN_NOT_ROR
Definition: handler.h:584
row_type
Definition: handler.h:684
@ ROW_TYPE_FIXED
Definition: handler.h:687
#define HA_BINLOG_STMT_CAPABLE
Definition: handler.h:348
#define HA_READ_ORDER
Definition: handler.h:550
#define HA_FAST_KEY_READ
Definition: handler.h:242
#define HA_READ_RANGE
Definition: handler.h:557
#define HA_NO_TRANSACTIONS
Definition: handler.h:218
#define HA_STATS_RECORDS_IS_EXACT
Definition: handler.h:280
#define HA_NULL_IN_KEY
Definition: handler.h:253
#define HA_ONLY_WHOLE_INDEX
Definition: handler.h:562
#define HA_READ_PREV
Definition: handler.h:538
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:29
Struct to hold information about the table that should be created.
Definition: handler.h:3210
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:704
KEY * key_info
Definition: table.h:754
Definition: thr_lock.h:124
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2740
Definition: my_base.h:1125
Definition: mysqlslap.cc:240
thr_lock_type
Definition: thr_lock.h:51