~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/blackhole/ha_blackhole.h

Removed DBUG symbols and fixed TRUE/FALSE

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
  along with this program; if not, write to the Free Software
14
14
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
 
16
#ifdef USE_PRAGMA_INTERFACE
 
17
#pragma interface                       /* gcc class implementation */
 
18
#endif
16
19
 
17
20
/*
18
21
  Shared structure for correct LOCK operation
19
22
*/
20
23
struct st_blackhole_share {
21
24
  THR_LOCK lock;
22
 
  uint32_t use_count;
23
 
  uint32_t table_name_length;
 
25
  uint use_count;
 
26
  uint table_name_length;
24
27
  char table_name[1];
25
28
};
26
29
 
45
48
    The name of the index type that will be used for display
46
49
    don't implement this method unless you really have indexes
47
50
  */
48
 
  const char *index_type(uint32_t key_number);
 
51
  const char *index_type(uint key_number);
49
52
  const char **bas_ext() const;
50
53
  uint64_t table_flags() const
51
54
  {
52
 
    return(HA_NULL_IN_KEY |
 
55
    return(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER |
53
56
           HA_BINLOG_STMT_CAPABLE |
54
 
           HA_CAN_INDEX_BLOBS | 
55
 
           HA_AUTO_PART_KEY |
56
 
           HA_FILE_BASED);
 
57
           HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY |
 
58
           HA_FILE_BASED | HA_CAN_GEOMETRY | HA_CAN_INSERT_DELAYED);
57
59
  }
58
 
  uint32_t index_flags(uint32_t inx, uint32_t part __attribute__((unused)),
59
 
                       bool all_parts __attribute__((unused))) const
 
60
  uint32_t index_flags(uint inx, uint part __attribute__((__unused__)),
 
61
                       bool all_parts __attribute__((__unused__))) const
60
62
  {
61
63
    return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_FULLTEXT) ?
62
64
            0 : HA_READ_NEXT | HA_READ_PREV | HA_READ_RANGE |
66
68
#define BLACKHOLE_MAX_KEY       64              /* Max allowed keys */
67
69
#define BLACKHOLE_MAX_KEY_SEG   16              /* Max segments for key */
68
70
#define BLACKHOLE_MAX_KEY_LENGTH 1000
69
 
  uint32_t max_supported_keys()          const { return BLACKHOLE_MAX_KEY; }
70
 
  uint32_t max_supported_key_length()    const { return BLACKHOLE_MAX_KEY_LENGTH; }
71
 
  uint32_t max_supported_key_part_length() const { return BLACKHOLE_MAX_KEY_LENGTH; }
72
 
  int open(const char *name, int mode, uint32_t test_if_locked);
 
71
  uint max_supported_keys()          const { return BLACKHOLE_MAX_KEY; }
 
72
  uint max_supported_key_length()    const { return BLACKHOLE_MAX_KEY_LENGTH; }
 
73
  uint max_supported_key_part_length() const { return BLACKHOLE_MAX_KEY_LENGTH; }
 
74
  int open(const char *name, int mode, uint test_if_locked);
73
75
  int close(void);
74
 
  int write_row(unsigned char * buf);
 
76
  int write_row(uchar * buf);
75
77
  int rnd_init(bool scan);
76
 
  int rnd_next(unsigned char *buf);
77
 
  int rnd_pos(unsigned char * buf, unsigned char *pos);
78
 
  int index_read_map(unsigned char * buf, const unsigned char * key, key_part_map keypart_map,
 
78
  int rnd_next(uchar *buf);
 
79
  int rnd_pos(uchar * buf, uchar *pos);
 
80
  int index_read_map(uchar * buf, const uchar * key, key_part_map keypart_map,
79
81
                     enum ha_rkey_function find_flag);
80
 
  int index_read_idx_map(unsigned char * buf, uint32_t idx, const unsigned char * key,
 
82
  int index_read_idx_map(uchar * buf, uint idx, const uchar * key,
81
83
                         key_part_map keypart_map,
82
84
                         enum ha_rkey_function find_flag);
83
 
  int index_read_last_map(unsigned char * buf, const unsigned char * key, key_part_map keypart_map);
84
 
  int index_next(unsigned char * buf);
85
 
  int index_prev(unsigned char * buf);
86
 
  int index_first(unsigned char * buf);
87
 
  int index_last(unsigned char * buf);
88
 
  void position(const unsigned char *record);
89
 
  int info(uint32_t flag);
 
85
  int index_read_last_map(uchar * buf, const uchar * key, key_part_map keypart_map);
 
86
  int index_next(uchar * buf);
 
87
  int index_prev(uchar * buf);
 
88
  int index_first(uchar * buf);
 
89
  int index_last(uchar * buf);
 
90
  void position(const uchar *record);
 
91
  int info(uint flag);
90
92
  int external_lock(THD *thd, int lock_type);
91
 
  int create(const char *name, Table *table_arg,
 
93
  int create(const char *name, TABLE *table_arg,
92
94
             HA_CREATE_INFO *create_info);
93
95
  THR_LOCK_DATA **store_lock(THD *thd,
94
96
                             THR_LOCK_DATA **to,