34#define DEFAULT_CHAIN_LENGTH 512
133 return (
double)(
stats.records +
stats.deleted) / 20.0 + 10;
146 int close(
void)
override;
150 int rnd_init(
bool scan =
true)
override;
161 int info(uint)
override;
167 uint table_changes)
override;
app_data_ptr new_data(u_int n, char *val, cons_type consensus)
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: transparent_file.h:35
int delete_row(const uchar *buf) override
Definition: ha_tina.cc:1038
ha_tina(handlerton *hton, TABLE_SHARE *table_arg)
Definition: ha_tina.cc:512
int repair(THD *thd, HA_CHECK_OPT *check_opt) override
In this method check_opt can be modified to specify CHECK option to use to call check() upon the tabl...
Definition: ha_tina.cc:1380
bool get_write_pos(my_off_t *end_pos, tina_set *closest_hole)
Definition: ha_tina.cc:1226
int write_row(uchar *buf) override
Write a row.
Definition: ha_tina.cc:937
int chain_append()
Definition: ha_tina.cc:606
tina_set * chain_ptr
Definition: ha_tina.h:93
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes) override
Part of old, deprecated in-place ALTER API.
Definition: ha_tina.cc:1626
my_off_t local_saved_data_file_length
Definition: ha_tina.h:79
bool is_crashed() const override
Check if the table is crashed.
Definition: ha_tina.cc:408
int init_tina_writer()
Definition: ha_tina.cc:386
int open_update_temp_file_if_needed()
Definition: ha_tina.cc:970
int rnd_pos(uchar *buf, uchar *pos) override
Definition: ha_tina.cc:1185
uchar byte_buffer[IO_SIZE]
Definition: ha_tina.h:81
THR_LOCK_DATA lock
Definition: ha_tina.h:74
const char * table_type() const override
The following can be called without an open handler.
Definition: ha_tina.h:113
MEM_ROOT blobroot
Definition: ha_tina.h:98
int close(void) override
Definition: ha_tina.cc:925
bool records_is_known
Definition: ha_tina.h:97
int info(uint) override
General method to gather info from handler.
Definition: ha_tina.cc:1199
int rnd_init(bool scan=true) override
rnd_init() can be called two times without rnd_end() in between (it only makes sense if scan=1).
Definition: ha_tina.cc:1111
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info, dd::Table *table_def) override
Create table (implementation).
Definition: ha_tina.cc:1544
int encode_quote(uchar *buf)
Definition: ha_tina.cc:537
my_off_t next_position
Definition: ha_tina.h:78
int find_current_row(uchar *buf)
Definition: ha_tina.cc:641
double scan_time() override
Definition: ha_tina.h:132
TINA_SHARE * share
Definition: ha_tina.h:75
bool auto_repair() const override
Check if the table can be automatically repaired.
Definition: ha_tina.h:159
String buffer
Definition: ha_tina.h:85
void get_status()
Definition: ha_tina.cc:844
tina_set * chain
Definition: ha_tina.h:92
int rnd_next(uchar *buf) override
Definition: ha_tina.cc:1139
int rnd_end() override
Definition: ha_tina.cc:1240
int delete_all_rows(void) override
Delete all rows in a table.
Definition: ha_tina.cc:1504
int open(const char *name, int mode, uint open_options, const dd::Table *table_def) override
Definition: ha_tina.cc:889
int update_row(const uchar *old_data, uchar *new_data) override
Update a single row.
Definition: ha_tina.cc:994
my_off_t current_position
Definition: ha_tina.h:77
File update_temp_file
Definition: ha_tina.h:84
virtual bool fast_key_read()
Definition: ha_tina.h:136
~ha_tina() override
Definition: ha_tina.h:108
uint max_key_length() const
Definition: ha_tina.h:128
tina_set chain_buffer[DEFAULT_CHAIN_LENGTH]
Definition: ha_tina.h:91
uint max_keys() const
Definition: ha_tina.h:126
int check(THD *thd, HA_CHECK_OPT *check_opt) override
Definition: ha_tina.cc:1582
Transparent_file * file_buff
Definition: ha_tina.h:82
ha_rows estimate_rows_upper_bound() override
Return upper bound of current number of records in the table (max.
Definition: ha_tina.h:142
uint32 chain_size
Definition: ha_tina.h:95
ulong index_flags(uint, uint, bool) const override
Definition: ha_tina.h:118
uint max_key_parts() const
Definition: ha_tina.h:127
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_tina.cc:1532
File data_file
Definition: ha_tina.h:83
int init_data_file()
Initialize the data file.
Definition: ha_tina.cc:1070
void position(const uchar *record) override
Definition: ha_tina.cc:1175
uint max_record_length() const
Definition: ha_tina.h:125
uint local_data_file_version
Definition: ha_tina.h:96
my_off_t temp_file_length
Definition: ha_tina.h:80
ulonglong table_flags() const override
Definition: ha_tina.h:114
void update_status()
Definition: ha_tina.cc:879
int extra(enum ha_extra_function operation) override
Storage engine specific implementation of ha_extra()
Definition: ha_tina.cc:1211
uchar chain_alloced
Definition: ha_tina.h:94
bool check_and_repair(THD *thd) override
Check and repair the table if necessary.
Definition: ha_tina.cc:379
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
#define DEFAULT_CHAIN_LENGTH
Definition: ha_tina.h:34
my_off_t ha_rows
Definition: my_base.h:1141
ha_extra_function
Definition: my_base.h:185
#define HA_POS_ERROR
Definition: my_base.h:1143
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
ulonglong my_off_t
Definition: my_inttypes.h:72
unsigned char uchar
Definition: my_inttypes.h:52
uint32_t uint32
Definition: my_inttypes.h:67
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:83
constexpr const size_t IO_SIZE
Definition: my_io.h:159
int File
Definition: my_io_bits.h:51
void my_free(void *ptr)
Frees the memory pointed by the ptr.
Definition: my_memory.cc:81
static int record
Definition: mysqltest.cc:193
Definition: buf0block_hint.cc:30
mode
Definition: file_handle.h:61
#define HA_BINLOG_ROW_CAPABLE
Definition: handler.h:347
#define HA_MAX_REC_LENGTH
Definition: handler.h:625
#define HA_CAN_REPAIR
Definition: handler.h:377
#define HA_BINLOG_STMT_CAPABLE
Definition: handler.h:348
#define HA_NO_TRANSACTIONS
Definition: handler.h:218
#define HA_NO_AUTO_INCREMENT
Definition: handler.h:322
Our own string classes, used pervasively throughout the executor.
case opt name
Definition: sslopt-case.h:29
Definition: handler.h:3803
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
void Clear()
Deallocate all the RAM used.
Definition: my_alloc.cc:172
This structure is shared between different table objects.
Definition: table.h:704
Definition: thr_lock.h:124
Definition: thr_lock.h:139
bool crashed
Definition: ha_tina.h:63
bool is_log_table
Definition: ha_tina.h:50
File meta_file
Definition: ha_tina.h:61
mysql_mutex_t mutex
Definition: ha_tina.h:57
File tina_write_filedes
Definition: ha_tina.h:62
THR_LOCK lock
Definition: ha_tina.h:58
char * table_name
Definition: ha_tina.h:43
bool tina_write_opened
Definition: ha_tina.h:60
uint table_name_length
Definition: ha_tina.h:45
char data_file_name[FN_REFLEN]
Definition: ha_tina.h:44
bool update_file_opened
Definition: ha_tina.h:59
my_off_t saved_data_file_length
Definition: ha_tina.h:56
uint use_count
Definition: ha_tina.h:45
uint data_file_version
Definition: ha_tina.h:65
ha_rows rows_recorded
Definition: ha_tina.h:64
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2740
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
Definition: mysqlslap.cc:240
my_off_t begin
Definition: ha_tina.h:69
my_off_t end
Definition: ha_tina.h:70
thr_lock_type
Definition: thr_lock.h:51