~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/heap/heap.h

  • Committer: Monty Taylor
  • Date: 2010-02-05 08:11:15 UTC
  • mfrom: (1283 build)
  • mto: (1273.13.43 fix_is)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: mordred@inaugust.com-20100205081115-dr82nvrwv4lvw7sd
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#ifndef PLUGIN_HEAP_HEAP_H
20
20
#define PLUGIN_HEAP_HEAP_H
21
21
 
22
 
#ifdef  __cplusplus
23
 
extern "C" {
24
 
#endif
25
 
 
26
22
#include <drizzled/base.h>
27
23
#include <drizzled/common.h>
28
24
#include "drizzled/internal/my_pthread.h"
118
114
    Number of buckets used in hash table. Used only to provide
119
115
    #records estimates for heap key scans.
120
116
  */
121
 
  ha_rows hash_buckets;
122
 
  TREE rb_tree;
 
117
  drizzled::ha_rows hash_buckets;
 
118
  drizzled::TREE rb_tree;
123
119
  int (*write_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
124
120
                   const unsigned char *record, unsigned char *recpos);
125
121
  int (*delete_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
173
169
 
174
170
 
175
171
  char * name;                  /* Name of "memory-file" */
176
 
  THR_LOCK lock;
 
172
  drizzled::THR_LOCK lock;
177
173
  pthread_mutex_t intern_lock;          /* Locking for use with _locking */
178
174
  bool delete_on_close;
179
175
  uint32_t auto_key;
194
190
  uint32_t opt_flag,update;
195
191
  unsigned char *lastkey;                       /* Last used key with rkey */
196
192
  unsigned char *recbuf;                         /* Record buffer for rb-tree keys */
197
 
  enum ha_rkey_function last_find_flag;
198
 
  TREE_ELEMENT *parents[MAX_TREE_HEIGHT+1];
199
 
  TREE_ELEMENT **last_pos;
 
193
  enum drizzled::ha_rkey_function last_find_flag;
 
194
  drizzled::TREE_ELEMENT *parents[drizzled::MAX_TREE_HEIGHT+1];
 
195
  drizzled::TREE_ELEMENT **last_pos;
200
196
  uint32_t lastkey_len;
201
197
  bool implicit_emptied;
202
 
  THR_LOCK_DATA lock;
 
198
  drizzled::THR_LOCK_DATA lock;
203
199
} HP_INFO;
204
200
 
205
201
 
237
233
 
238
234
extern int heap_delete_table(const char *name);
239
235
extern void heap_drop_table(HP_INFO *info);
240
 
extern int heap_extra(HP_INFO *info,enum ha_extra_function function);
 
236
extern int heap_extra(HP_INFO *info,enum drizzled::ha_extra_function function);
241
237
extern int heap_reset(HP_INFO *info);
242
238
extern int heap_rename(const char *old_name,const char *new_name);
243
 
extern int heap_panic(enum ha_panic_function flag);
 
239
extern int heap_panic(enum drizzled::ha_panic_function flag);
244
240
extern int heap_rsame(HP_INFO *info,unsigned char *record,int inx);
245
241
extern int heap_rnext(HP_INFO *info,unsigned char *record);
246
242
extern int heap_rprev(HP_INFO *info,unsigned char *record);
251
247
extern int heap_enable_indexes(HP_INFO *info);
252
248
extern int heap_indexes_are_disabled(HP_INFO *info);
253
249
extern void heap_update_auto_increment(HP_INFO *info, const unsigned char *record);
254
 
ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, key_range *min_key,
255
 
                               key_range *max_key);
256
 
int hp_panic(enum ha_panic_function flag);
 
250
drizzled::ha_rows hp_rb_records_in_range(HP_INFO *info,
 
251
                                         int inx, drizzled::key_range *min_key,
 
252
                                         drizzled::key_range *max_key);
 
253
int hp_panic(enum drizzled::ha_panic_function flag);
257
254
int heap_rkey(HP_INFO *info, unsigned char *record, int inx, const unsigned char *key,
258
 
              key_part_map keypart_map, enum ha_rkey_function find_flag);
 
255
              drizzled::key_part_map keypart_map,
 
256
              enum drizzled::ha_rkey_function find_flag);
259
257
extern unsigned char * heap_find(HP_INFO *info,int inx,const unsigned char *key);
260
258
extern int heap_check_heap(HP_INFO *info, bool print_status);
261
259
extern unsigned char *heap_position(HP_INFO *info);
266
264
 
267
265
typedef unsigned char *HEAP_PTR;
268
266
 
269
 
#ifdef  __cplusplus
270
 
}
271
 
#endif
272
 
 
273
267
#endif /* PLUGIN_HEAP_HEAP_H */