37 ha_rows rows_recorded;
38 char table_name[FN_REFLEN];
39 char data_file_name[FN_REFLEN];
41 bool archive_write_open;
47 DBUG_PRINT(
"ha_archive", (
"~Archive_share: %p",
49 if (archive_write_open)
52 (void) close_archive_writer();
55 thr_lock_delete(&lock);
58 int init_archive_writer();
59 void close_archive_writer();
70 #define ARCHIVE_VERSION 3
78 my_off_t current_position;
79 uchar byte_buffer[IO_SIZE];
84 const uchar *current_key;
86 uint current_k_offset;
88 bool archive_reader_open;
94 unsigned int pack_row_v1(uchar *
record);
102 const char *index_type(uint inx) {
return "NONE"; }
104 ulonglong table_flags()
const
106 return (HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ | HA_CAN_BIT_FIELD |
107 HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE |
108 HA_STATS_RECORDS_IS_EXACT |
109 HA_HAS_RECORDS | HA_CAN_REPAIR |
110 HA_FILE_BASED | HA_CAN_INSERT_DELAYED | HA_CAN_GEOMETRY);
112 ulong index_flags(uint idx, uint part,
bool all_parts)
const
114 return HA_ONLY_WHOLE_INDEX;
117 ulonglong nb_desired_values,
118 ulonglong *first_value,
119 ulonglong *nb_reserved_values);
120 uint max_supported_keys()
const {
return 1; }
121 uint max_supported_key_length()
const {
return sizeof(ulonglong); }
122 uint max_supported_key_part_length()
const {
return sizeof(ulonglong); }
123 ha_rows
records() {
return share->rows_recorded; }
124 int index_init(uint keynr,
bool sorted);
125 virtual int index_read(uchar *
buf,
const uchar * key,
126 uint key_len,
enum ha_rkey_function find_flag);
127 virtual int index_read_idx(uchar *
buf, uint
index,
const uchar * key,
128 uint key_len,
enum ha_rkey_function find_flag);
130 int open(
const char *name,
int mode, uint test_if_locked);
132 int write_row(uchar *
buf);
142 int init_archive_reader();
143 bool auto_repair()
const {
return 1; }
145 void position(
const uchar *record);
147 int extra(
enum ha_extra_function operation);
152 void start_bulk_insert(ha_rows rows);
153 int end_bulk_insert();
156 return ROW_TYPE_COMPRESSED;
159 enum thr_lock_type lock_type);
160 bool is_crashed()
const;
163 bool check_and_repair(THD *thd);
164 uint32 max_row_length(
const uchar *
buf);
165 bool fix_rec_buff(
unsigned int length);
166 int unpack_row(
azio_stream *file_to_read, uchar *record);
167 unsigned int pack_row(uchar *record,
azio_stream *writer);