1
/* Copyright (C) 2000-2006 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
17
#ifndef PLUGIN_MYISAM_HA_MYISAM_H
18
#define PLUGIN_MYISAM_HA_MYISAM_H
20
#include <drizzled/cursor.h>
21
#include <drizzled/thr_lock.h>
23
/* class for the the myisam Cursor */
25
#include <plugin/myisam/myisam.h>
27
class ha_myisam: public drizzled::Cursor
30
char *data_file_name, *index_file_name;
31
bool can_enable_indexes;
33
int repair(drizzled::Session *session, MI_CHECK ¶m, bool optimize);
36
ha_myisam(drizzled::plugin::StorageEngine &engine,
37
drizzled::TableShare &table_arg);
39
Cursor *clone(drizzled::memory::Root *mem_root);
40
const char *index_type(uint32_t key_number);
41
int index_init(uint32_t idx, bool sorted);
43
uint32_t checksum() const;
45
int open(const char *name, int mode, uint32_t test_if_locked);
47
int write_row(unsigned char * buf);
48
int update_row(const unsigned char * old_data, unsigned char * new_data);
49
int delete_row(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);
52
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);
56
int index_next(unsigned char * buf);
57
int index_prev(unsigned char * buf);
58
int index_first(unsigned char * buf);
59
int index_last(unsigned char * buf);
60
int index_next_same(unsigned char *buf, const unsigned char *key, uint32_t keylen);
61
int rnd_init(bool scan);
62
int rnd_next(unsigned char *buf);
63
int rnd_pos(unsigned char * buf, unsigned char *pos);
64
int restart_rnd_next(unsigned char *buf, unsigned char *pos);
65
void position(const unsigned char *record);
67
int extra(enum drizzled::ha_extra_function operation);
68
int extra_opt(enum drizzled::ha_extra_function operation, uint32_t cache_size);
70
int external_lock(drizzled::Session *session, int lock_type);
71
int delete_all_rows(void);
72
int disable_indexes(uint32_t mode);
73
int enable_indexes(uint32_t mode);
74
int indexes_are_disabled(void);
75
void start_bulk_insert(drizzled::ha_rows rows);
76
int end_bulk_insert();
77
drizzled::ha_rows records_in_range(uint32_t inx, drizzled::key_range *min_key, drizzled::key_range *max_key);
78
virtual void get_auto_increment(uint64_t offset, uint64_t increment,
79
uint64_t nb_desired_values,
80
uint64_t *first_value,
81
uint64_t *nb_reserved_values);
82
MI_INFO *file_ptr(void)
86
int read_range_first(const drizzled::key_range *start_key, const drizzled::key_range *end_key,
87
bool eq_range_arg, bool sorted);
88
int read_range_next();
89
int reset_auto_increment(uint64_t value);
91
virtual bool isOrdered(void)
97
drizzled::key_map keys_with_parts;
100
#endif /* PLUGIN_MYISAM_HA_MYISAM_H */