28
28
typedef struct st_tina_share {
30
30
char data_file_name[FN_REFLEN];
31
uint32_t table_name_length, use_count;
31
uint table_name_length, use_count;
33
33
Here we save the length of the file for readers. This is updated by
34
34
inserts, updates and deletes. The var is initialized along with the
43
43
File tina_write_filedes; /* File handler for readers */
44
44
bool crashed; /* Meta file is crashed */
45
45
ha_rows rows_recorded; /* Number of rows in tables */
46
uint32_t data_file_version; /* Version of the data file used */
46
uint data_file_version; /* Version of the data file used */
59
59
off_t next_position; /* Next position in the file scan */
60
60
off_t local_saved_data_file_length; /* save position for reads */
61
61
off_t temp_file_length;
62
unsigned char byte_buffer[IO_SIZE];
62
uchar byte_buffer[IO_SIZE];
63
63
Transparent_file *file_buff;
64
64
File data_file; /* File handler for readers */
65
65
File update_temp_file;
96
96
const char *table_type(void) const { return "CSV"; }
97
const char *index_type(uint32_t inx __attribute__((unused)))
97
const char *index_type(uint inx __attribute__((unused)))
99
99
const char **bas_ext() const;
100
100
uint64_t table_flags() const
102
102
return (HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ | HA_NO_AUTO_INCREMENT |
103
103
HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE);
105
uint32_t index_flags(uint32_t idx __attribute__((unused)),
106
uint32_t part __attribute__((unused)),
105
uint32_t index_flags(uint idx __attribute__((unused)),
106
uint part __attribute__((unused)),
107
107
bool all_parts __attribute__((unused))) const
115
uint32_t max_record_length() const { return HA_MAX_REC_LENGTH; }
116
uint32_t max_keys() const { return 0; }
117
uint32_t max_key_parts() const { return 0; }
118
uint32_t max_key_length() const { return 0; }
115
uint max_record_length() const { return HA_MAX_REC_LENGTH; }
116
uint max_keys() const { return 0; }
117
uint max_key_parts() const { return 0; }
118
uint max_key_length() const { return 0; }
120
120
Called in test_quick_select to determine if indexes should be used.
130
130
ha_rows estimate_rows_upper_bound() { return HA_POS_ERROR; }
132
int open(const char *name, int mode, uint32_t open_options);
132
int open(const char *name, int mode, uint open_options);
134
int write_row(unsigned char * buf);
135
int update_row(const unsigned char * old_data, unsigned char * new_data);
136
int delete_row(const unsigned char * buf);
134
int write_row(uchar * buf);
135
int update_row(const uchar * old_data, uchar * new_data);
136
int delete_row(const uchar * buf);
137
137
int rnd_init(bool scan=1);
138
int rnd_next(unsigned char *buf);
139
int rnd_pos(unsigned char * buf, unsigned char *pos);
140
bool check_and_repair(Session *session);
141
int check(Session* session, HA_CHECK_OPT* check_opt);
138
int rnd_next(uchar *buf);
139
int rnd_pos(uchar * buf, uchar *pos);
140
bool check_and_repair(THD *thd);
141
int check(THD* thd, HA_CHECK_OPT* check_opt);
142
142
bool is_crashed() const;
144
int repair(Session* session, HA_CHECK_OPT* check_opt);
144
int repair(THD* thd, HA_CHECK_OPT* check_opt);
145
145
/* This is required for SQL layer to know that we support autorepair */
146
146
bool auto_repair() const { return 1; }
147
void position(const unsigned char *record);
147
void position(const uchar *record);
149
149
int delete_all_rows(void);
150
150
int create(const char *name, Table *form, HA_CREATE_INFO *create_info);
151
151
bool check_if_incompatible_data(HA_CREATE_INFO *info,
152
uint32_t table_changes);
154
THR_LOCK_DATA **store_lock(Session *session, THR_LOCK_DATA **to,
154
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
155
155
enum thr_lock_type lock_type);
162
162
void update_status();
164
164
/* The following methods were added just for TINA */
165
int encode_quote(unsigned char *buf);
166
int find_current_row(unsigned char *buf);
165
int encode_quote(uchar *buf);
166
int find_current_row(uchar *buf);
167
167
int chain_append();