85
87
const char *table_type() const { return "ARCHIVE"; }
86
const char *index_type(uint32_t inx __attribute__((unused)))
88
const char *index_type(uint inx __attribute__((unused)))
88
90
const char **bas_ext() const;
89
91
uint64_t table_flags() const
91
return (HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ |
93
return (HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ | HA_CAN_BIT_FIELD |
92
94
HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE |
93
95
HA_STATS_RECORDS_IS_EXACT |
97
HA_FILE_BASED | HA_CAN_INSERT_DELAYED | HA_CAN_GEOMETRY);
97
uint32_t index_flags(uint32_t idx __attribute__((unused)),
98
uint32_t part __attribute__((unused)),
99
uint32_t index_flags(uint idx __attribute__((unused)),
100
uint part __attribute__((unused)),
99
101
bool all_parts __attribute__((unused))) const
101
103
return HA_ONLY_WHOLE_INDEX;
104
106
uint64_t nb_desired_values,
105
107
uint64_t *first_value,
106
108
uint64_t *nb_reserved_values);
107
uint32_t max_supported_keys() const { return 1; }
108
uint32_t max_supported_key_length() const { return sizeof(uint64_t); }
109
uint32_t max_supported_key_part_length() const { return sizeof(uint64_t); }
109
uint max_supported_keys() const { return 1; }
110
uint max_supported_key_length() const { return sizeof(uint64_t); }
111
uint max_supported_key_part_length() const { return sizeof(uint64_t); }
110
112
ha_rows records() { return share->rows_recorded; }
111
int index_init(uint32_t keynr, bool sorted);
112
virtual int index_read(unsigned char * buf, const unsigned char * key,
113
uint32_t key_len, enum ha_rkey_function find_flag);
114
virtual int index_read_idx(unsigned char * buf, uint32_t index, const unsigned char * key,
115
uint32_t key_len, enum ha_rkey_function find_flag);
116
int index_next(unsigned char * buf);
117
int open(const char *name, int mode, uint32_t test_if_locked);
113
int index_init(uint keynr, bool sorted);
114
virtual int index_read(uchar * buf, const uchar * key,
115
uint key_len, enum ha_rkey_function find_flag);
116
virtual int index_read_idx(uchar * buf, uint index, const uchar * key,
117
uint key_len, enum ha_rkey_function find_flag);
118
int index_next(uchar * buf);
119
int open(const char *name, int mode, uint test_if_locked);
119
int write_row(unsigned char * buf);
120
int real_write_row(unsigned char *buf, azio_stream *writer);
121
int write_row(uchar * buf);
122
int real_write_row(uchar *buf, azio_stream *writer);
121
123
int delete_all_rows();
122
124
int rnd_init(bool scan=1);
123
int rnd_next(unsigned char *buf);
124
int rnd_pos(unsigned char * buf, unsigned char *pos);
125
int get_row(azio_stream *file_to_read, unsigned char *buf);
126
int get_row_version2(azio_stream *file_to_read, unsigned char *buf);
127
int get_row_version3(azio_stream *file_to_read, unsigned char *buf);
125
int rnd_next(uchar *buf);
126
int rnd_pos(uchar * buf, uchar *pos);
127
int get_row(azio_stream *file_to_read, uchar *buf);
128
int get_row_version2(azio_stream *file_to_read, uchar *buf);
129
int get_row_version3(azio_stream *file_to_read, uchar *buf);
128
130
ARCHIVE_SHARE *get_share(const char *table_name, int *rc);
129
131
int free_share();
130
132
int init_archive_writer();
131
133
int init_archive_reader();
132
134
bool auto_repair() const { return 1; } // For the moment we just do this
133
135
int read_data_header(azio_stream *file_to_read);
134
void position(const unsigned char *record);
136
void position(const uchar *record);
136
138
void update_create_info(HA_CREATE_INFO *create_info);
137
139
int create(const char *name, Table *form, HA_CREATE_INFO *create_info);
138
int optimize(Session* session, HA_CHECK_OPT* check_opt);
139
int repair(Session* session, HA_CHECK_OPT* check_opt);
140
int optimize(THD* thd, HA_CHECK_OPT* check_opt);
141
int repair(THD* thd, HA_CHECK_OPT* check_opt);
140
142
void start_bulk_insert(ha_rows rows);
141
143
int end_bulk_insert();
142
144
enum row_type get_row_type() const
144
146
return ROW_TYPE_COMPRESSED;
146
THR_LOCK_DATA **store_lock(Session *session, THR_LOCK_DATA **to,
148
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
147
149
enum thr_lock_type lock_type);
148
150
bool is_crashed() const;
149
int check(Session* session, HA_CHECK_OPT* check_opt);
150
bool check_and_repair(Session *session);
151
uint32_t max_row_length(const unsigned char *buf);
151
int check(THD* thd, HA_CHECK_OPT* check_opt);
152
bool check_and_repair(THD *thd);
153
uint32_t max_row_length(const uchar *buf);
152
154
bool fix_rec_buff(unsigned int length);
153
int unpack_row(azio_stream *file_to_read, unsigned char *record);
154
unsigned int pack_row(unsigned char *record);
155
int unpack_row(azio_stream *file_to_read, uchar *record);
156
unsigned int pack_row(uchar *record);