64 DBUG_PRINT(
"ha_archive", (
"~Archive_share: %p",
this));
85#define ARCHIVE_VERSION 3
110 const char *
table_type()
const override {
return "ARCHIVE"; }
127 [[maybe_unused]])
const override {
142 int close(
void)
override;
146 int rnd_init(
bool scan =
true)
override;
182 uint table_changes)
override;
Definition: ha_archive.h:50
Archive_share()
Definition: ha_archive.cc:247
ha_rows rows_recorded
Definition: ha_archive.h:55
bool crashed
Definition: ha_archive.h:61
azio_stream archive_write
Definition: ha_archive.h:54
~Archive_share() override
Definition: ha_archive.h:63
THR_LOCK lock
Definition: ha_archive.h:53
char table_name[FN_REFLEN]
Definition: ha_archive.h:56
int read_v1_metafile()
Read version 1 meta file (5.0 compatibility routine).
Definition: ha_archive.cc:286
int init_archive_writer()
Definition: ha_archive.cc:467
bool archive_write_open
Definition: ha_archive.h:59
bool dirty
Definition: ha_archive.h:60
void close_archive_writer()
Definition: ha_archive.cc:484
int write_v1_metafile()
Write version 1 meta file (5.0 compatibility routine).
Definition: ha_archive.cc:316
char data_file_name[FN_REFLEN]
Definition: ha_archive.h:57
bool in_optimize
Definition: ha_archive.h:58
mysql_mutex_t mutex
Definition: ha_archive.h:52
Base class to be used by handlers different shares.
Definition: handler.h:3956
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:168
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
Definition: ha_archive.h:87
archive_record_buffer * record_buffer
Definition: ha_archive.h:100
ha_rows scan_rows
Definition: ha_archive.h:95
~ha_archive() override=default
int truncate(dd::Table *table_def) override
Quickly remove all rows from a table.
Definition: ha_archive.cc:1469
virtual int index_read_idx(uchar *buf, uint index, const uchar *key, uint key_len, enum ha_rkey_function find_flag)
Definition: ha_archive.cc:862
int check(THD *thd, HA_CHECK_OPT *check_opt) override
Definition: ha_archive.cc:1502
uint32 max_row_length(const uchar *buf)
Definition: ha_archive.cc:733
uint max_supported_key_length() const override
Definition: ha_archive.h:125
int close(void) override
Definition: ha_archive.cc:578
int write_row(uchar *buf) override
Write a row.
Definition: ha_archive.cc:784
THR_LOCK_DATA lock
Definition: ha_archive.h:88
bool bulk_insert
Definition: ha_archive.h:96
int real_write_row(uchar *buf, azio_stream *writer)
Definition: ha_archive.cc:708
bool auto_repair() const override
Check if the table can be automatically repaired.
Definition: ha_archive.h:154
int get_row_version3(azio_stream *file_to_read, uchar *buf)
Definition: ha_archive.cc:1031
archive_record_buffer * create_record_buffer(unsigned int length)
Definition: ha_archive.cc:1556
int rnd_pos(uchar *buf, uchar *pos) override
Definition: ha_archive.cc:1143
int extra(enum ha_extra_function operation) override
Handler hints.
Definition: ha_archive.cc:1414
my_off_t current_position
Definition: ha_archive.h:92
int info(uint) override
General method to gather info from handler.
Definition: ha_archive.cc:1348
ulong index_flags(uint, uint, bool) const override
Definition: ha_archive.h:118
void update_create_info(HA_CREATE_INFO *create_info) override
Update create info as part of ALTER TABLE.
Definition: ha_archive.cc:1332
int get_row_version2(azio_stream *file_to_read, uchar *buf)
Definition: ha_archive.cc:1039
int get_row(azio_stream *file_to_read, uchar *buf)
Definition: ha_archive.cc:939
bool archive_reader_open
Definition: ha_archive.h:101
Archive_share * get_share(const char *table_name, int *rc)
Definition: ha_archive.cc:415
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_archive.cc:1162
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_archive.cc:916
int rnd_next(uchar *buf) override
Definition: ha_archive.cc:1106
unsigned int pack_row(uchar *record, azio_stream *writer)
Definition: ha_archive.cc:747
bool fix_rec_buff(unsigned int length)
Definition: ha_archive.cc:955
uchar byte_buffer[IO_SIZE]
Definition: ha_archive.h:93
ulonglong table_flags() const override
Definition: ha_archive.h:111
void destroy_record_buffer(archive_record_buffer *r)
Definition: ha_archive.cc:1575
unsigned int pack_row_v1(uchar *record)
Pack version 1 row (5.0 compatibility routine).
Definition: ha_archive.cc:350
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info, dd::Table *table_def) override
Create table (implementation).
Definition: ha_archive.cc:600
int index_next(uchar *buf) override
Definition: ha_archive.cc:893
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_archive.cc:1299
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes) override
Part of old, deprecated in-place ALTER API.
Definition: ha_archive.cc:1581
int end_bulk_insert() override
Definition: ha_archive.cc:1455
int unpack_row(azio_stream *file_to_read, uchar *record)
Definition: ha_archive.cc:975
const char * table_type() const override
The following can be called without an open handler.
Definition: ha_archive.h:110
ha_archive(handlerton *hton, TABLE_SHARE *table_arg)
Definition: ha_archive.cc:261
int init_archive_reader()
Definition: ha_archive.cc:497
String buffer
Definition: ha_archive.h:94
bool check_and_repair(THD *thd) override
Check and repair the table if necessary.
Definition: ha_archive.cc:1549
void position(const uchar *record) override
Definition: ha_archive.cc:1131
int index_read(uchar *buf, const uchar *key, uint key_len, enum ha_rkey_function find_flag) override
Definition: ha_archive.cc:854
int open(const char *name, int mode, uint test_if_locked, const dd::Table *table_def) override
Definition: ha_archive.cc:523
int records(ha_rows *num_rows) override
Number of rows in table.
Definition: ha_archive.h:130
Archive_share * share
Definition: ha_archive.h:89
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_archive.h:168
uint max_supported_keys() const override
Definition: ha_archive.h:124
uint current_k_offset
Definition: ha_archive.h:99
bool is_crashed() const override
Check if the table is crashed.
Definition: ha_archive.cc:1477
void start_bulk_insert(ha_rows rows) override
Definition: ha_archive.cc:1445
int read_data_header(azio_stream *file_to_read)
Definition: ha_archive.cc:372
uint max_supported_key_part_length(HA_CREATE_INFO *create_info) const override
Definition: ha_archive.h:126
uint current_key_len
Definition: ha_archive.h:98
azio_stream archive
Definition: ha_archive.h:91
int check_for_upgrade(HA_CHECK_OPT *check_opt) override
Check for upgrade.
Definition: ha_archive.cc:1491
int index_init(uint keynr, bool sorted) override
Definition: ha_archive.cc:844
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_archive.cc:836
int optimize(THD *thd, HA_CHECK_OPT *check_opt) override
Definition: ha_archive.cc:1176
const uchar * current_key
Definition: ha_archive.h:97
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4412
A table definition from the master.
Definition: rpl_utility.h:248
#define mysql_mutex_lock(M)
Definition: mysql_mutex.h:50
#define mysql_mutex_destroy(M)
Definition: mysql_mutex.h:46
#define mysql_mutex_unlock(M)
Definition: mysql_mutex.h:57
ha_rkey_function
Definition: my_base.h:78
my_off_t ha_rows
Definition: my_base.h:1140
ha_extra_function
Definition: my_base.h:184
#define DBUG_PRINT(keyword, arglist)
Definition: my_dbug.h:181
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
static int record
Definition: mysqltest.cc:188
Definition: buf0block_hint.cc:30
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
Provides atomic access in shared-exclusive modes.
Definition: shared_spin_lock.h:79
const char * table_name
Definition: rules_table_service.cc:56
mode
Definition: file_handle.h:60
const mysql_service_registry_t * r
Definition: pfs_example_plugin_employee.cc:86
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_CAN_BIT_FIELD
Definition: handler.h:329
#define HA_FILE_BASED
Definition: handler.h:324
#define HA_UPDATE_NOT_SUPPORTED
Handlers with this flag set do not support UPDATE operations.
Definition: handler.h:499
#define HA_DELETE_NOT_SUPPORTED
Handlers with this flag set do not support DELETE operations.
Definition: handler.h:504
#define HA_CAN_REPAIR
Definition: handler.h:369
#define HA_CAN_GEOMETRY
Definition: handler.h:228
row_type
Definition: handler.h:676
@ ROW_TYPE_COMPRESSED
Definition: handler.h:681
#define HA_BINLOG_STMT_CAPABLE
Definition: handler.h:340
#define HA_NO_TRANSACTIONS
Definition: handler.h:210
#define HA_STATS_RECORDS_IS_EXACT
Definition: handler.h:272
#define HA_ONLY_WHOLE_INDEX
Definition: handler.h:554
Our own string classes, used pervasively throughout the executor.
case opt name
Definition: sslopt-case.h:33
Definition: handler.h:3632
Struct to hold information about the table that should be created.
Definition: handler.h:3045
This structure is shared between different table objects.
Definition: table.h:690
Definition: thr_lock.h:124
Definition: thr_lock.h:139
Definition: ha_archive.h:45
uint32 length
Definition: ha_archive.h:47
uchar * buffer
Definition: ha_archive.h:46
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2622
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
thr_lock_type
Definition: thr_lock.h:51
void thr_lock_delete(THR_LOCK *lock)
Definition: thr_lock.cc:322
unsigned int uint
Definition: uca9-dump.cc:75