12
12
You should have received a copy of the GNU General Public License
13
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
17
17
#ifndef PLUGIN_MYISAM_HA_MYISAM_H
18
18
#define PLUGIN_MYISAM_HA_MYISAM_H
20
20
#include <drizzled/cursor.h>
21
#include <drizzled/thr_lock.h>
21
#include <mysys/thr_lock.h>
23
23
/* class for the the myisam Cursor */
25
25
#include <plugin/myisam/myisam.h>
27
class ha_myisam: public drizzled::Cursor
35
class ha_myisam: public Cursor
30
38
char *data_file_name, *index_file_name;
31
39
bool can_enable_indexes;
33
int repair(drizzled::Session *session, MI_CHECK ¶m, bool optimize);
41
int repair(Session *session, MI_CHECK ¶m, bool optimize);
36
ha_myisam(drizzled::plugin::StorageEngine &engine,
37
drizzled::Table &table_arg);
44
ha_myisam(drizzled::plugin::StorageEngine &engine, TableShare &table_arg);
39
Cursor *clone(drizzled::memory::Root *mem_root);
46
Cursor *clone(MEM_ROOT *mem_root);
40
47
const char *index_type(uint32_t key_number);
41
int doStartIndexScan(uint32_t idx, bool sorted);
48
int index_init(uint32_t idx, bool sorted);
43
50
uint32_t checksum() const;
45
int doOpen(const drizzled::TableIdentifier &identifier, int mode, uint32_t test_if_locked);
52
int open(const char *name, int mode, uint32_t test_if_locked);
47
int doInsertRecord(unsigned char * buf);
48
int doUpdateRecord(const unsigned char * old_data, unsigned char * new_data);
49
int doDeleteRecord(const unsigned char * buf);
50
int index_read_map(unsigned char *buf, const unsigned char *key, drizzled::key_part_map keypart_map,
51
enum drizzled::ha_rkey_function find_flag);
54
int write_row(unsigned char * buf);
55
int update_row(const unsigned char * old_data, unsigned char * new_data);
56
int delete_row(const unsigned char * buf);
57
int index_read_map(unsigned char *buf, const unsigned char *key, key_part_map keypart_map,
58
enum ha_rkey_function find_flag);
52
59
int index_read_idx_map(unsigned char *buf, uint32_t index, const unsigned char *key,
53
drizzled::key_part_map keypart_map,
54
enum drizzled::ha_rkey_function find_flag);
55
int index_read_last_map(unsigned char *buf, const unsigned char *key, drizzled::key_part_map keypart_map);
60
key_part_map keypart_map,
61
enum ha_rkey_function find_flag);
62
int index_read_last_map(unsigned char *buf, const unsigned char *key, key_part_map keypart_map);
56
63
int index_next(unsigned char * buf);
57
64
int index_prev(unsigned char * buf);
58
65
int index_first(unsigned char * buf);
59
66
int index_last(unsigned char * buf);
60
67
int index_next_same(unsigned char *buf, const unsigned char *key, uint32_t keylen);
61
int doStartTableScan(bool scan);
68
int rnd_init(bool scan);
62
69
int rnd_next(unsigned char *buf);
63
70
int rnd_pos(unsigned char * buf, unsigned char *pos);
71
int restart_rnd_next(unsigned char *buf, unsigned char *pos);
64
72
void position(const unsigned char *record);
66
int extra(enum drizzled::ha_extra_function operation);
67
int extra_opt(enum drizzled::ha_extra_function operation, uint32_t cache_size);
74
int extra(enum ha_extra_function operation);
75
int extra_opt(enum ha_extra_function operation, uint32_t cache_size);
69
int external_lock(drizzled::Session *session, int lock_type);
77
int external_lock(Session *session, int lock_type);
70
78
int delete_all_rows(void);
71
79
int disable_indexes(uint32_t mode);
72
80
int enable_indexes(uint32_t mode);
73
81
int indexes_are_disabled(void);
74
void start_bulk_insert(drizzled::ha_rows rows);
82
void start_bulk_insert(ha_rows rows);
75
83
int end_bulk_insert();
76
drizzled::ha_rows records_in_range(uint32_t inx, drizzled::key_range *min_key, drizzled::key_range *max_key);
84
ha_rows records_in_range(uint32_t inx, key_range *min_key, key_range *max_key);
77
85
virtual void get_auto_increment(uint64_t offset, uint64_t increment,
78
86
uint64_t nb_desired_values,
79
87
uint64_t *first_value,