~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/heap.h

  • Committer: Jay Pipes
  • Date: 2009-02-21 16:00:06 UTC
  • mto: (907.1.1 trunk-with-temporal)
  • mto: This revision was merged to the branch mainline in revision 908.
  • Revision ID: jpipes@serialcoder-20090221160006-vnk3wt4qbcz62eru
Removes the TIME column type and related time functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
/* This file should be included when using heap_database_functions */
17
17
/* Author: Michael Widenius */
18
18
 
19
 
#ifndef PLUGIN_HEAP_HEAP_H
20
 
#define PLUGIN_HEAP_HEAP_H
 
19
#ifndef _heap_h
 
20
#define _heap_h
 
21
#ifdef  __cplusplus
 
22
extern "C" {
 
23
#endif
21
24
 
22
25
#include <drizzled/base.h>
23
26
#include <drizzled/common.h>
24
 
#include "drizzled/internal/my_pthread.h"
25
 
#include <drizzled/thr_lock.h>
 
27
#include <mysys/my_pthread.h>
 
28
#include <mysys/thr_lock.h>
26
29
 
27
 
#include <plugin/myisam/my_handler.h>
28
 
#include "drizzled/tree.h"
 
30
#include <storage/myisam/my_handler.h>
 
31
#include <mysys/my_tree.h>
29
32
 
30
33
        /* defines used by heap-funktions */
31
34
 
114
117
    Number of buckets used in hash table. Used only to provide
115
118
    #records estimates for heap key scans.
116
119
  */
117
 
  drizzled::ha_rows hash_buckets;
118
 
  drizzled::TREE rb_tree;
 
120
  ha_rows hash_buckets;
 
121
  TREE rb_tree;
119
122
  int (*write_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
120
123
                   const unsigned char *record, unsigned char *recpos);
121
124
  int (*delete_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
169
172
 
170
173
 
171
174
  char * name;                  /* Name of "memory-file" */
172
 
  drizzled::THR_LOCK lock;
 
175
  THR_LOCK lock;
173
176
  pthread_mutex_t intern_lock;          /* Locking for use with _locking */
174
177
  bool delete_on_close;
 
178
  LIST open_list;
175
179
  uint32_t auto_key;
176
180
  uint32_t auto_key_type;                       /* real type of the auto key segment */
177
181
  uint64_t auto_increment;
190
194
  uint32_t opt_flag,update;
191
195
  unsigned char *lastkey;                       /* Last used key with rkey */
192
196
  unsigned char *recbuf;                         /* Record buffer for rb-tree keys */
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;
 
197
  enum ha_rkey_function last_find_flag;
 
198
  TREE_ELEMENT *parents[MAX_TREE_HEIGHT+1];
 
199
  TREE_ELEMENT **last_pos;
196
200
  uint32_t lastkey_len;
197
201
  bool implicit_emptied;
198
 
  drizzled::THR_LOCK_DATA lock;
 
202
  THR_LOCK_DATA lock;
 
203
  LIST open_list;
199
204
} HP_INFO;
200
205
 
201
206
 
233
238
 
234
239
extern int heap_delete_table(const char *name);
235
240
extern void heap_drop_table(HP_INFO *info);
236
 
extern int heap_extra(HP_INFO *info,enum drizzled::ha_extra_function function);
 
241
extern int heap_extra(HP_INFO *info,enum ha_extra_function function);
237
242
extern int heap_reset(HP_INFO *info);
238
243
extern int heap_rename(const char *old_name,const char *new_name);
239
 
extern int heap_panic(enum drizzled::ha_panic_function flag);
 
244
extern int heap_panic(enum ha_panic_function flag);
240
245
extern int heap_rsame(HP_INFO *info,unsigned char *record,int inx);
241
246
extern int heap_rnext(HP_INFO *info,unsigned char *record);
242
247
extern int heap_rprev(HP_INFO *info,unsigned char *record);
243
248
extern int heap_rfirst(HP_INFO *info,unsigned char *record,int inx);
244
249
extern int heap_rlast(HP_INFO *info,unsigned char *record,int inx);
245
250
extern void heap_clear(HP_INFO *info);
 
251
extern void heap_clear_keys(HP_INFO *info);
246
252
extern int heap_disable_indexes(HP_INFO *info);
247
253
extern int heap_enable_indexes(HP_INFO *info);
248
254
extern int heap_indexes_are_disabled(HP_INFO *info);
249
255
extern void heap_update_auto_increment(HP_INFO *info, const unsigned char *record);
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);
 
256
ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, key_range *min_key,
 
257
                               key_range *max_key);
 
258
int hp_panic(enum ha_panic_function flag);
254
259
int heap_rkey(HP_INFO *info, unsigned char *record, int inx, const unsigned char *key,
255
 
              drizzled::key_part_map keypart_map,
256
 
              enum drizzled::ha_rkey_function find_flag);
 
260
              key_part_map keypart_map, enum ha_rkey_function find_flag);
257
261
extern unsigned char * heap_find(HP_INFO *info,int inx,const unsigned char *key);
258
262
extern int heap_check_heap(HP_INFO *info, bool print_status);
259
263
extern unsigned char *heap_position(HP_INFO *info);
264
268
 
265
269
typedef unsigned char *HEAP_PTR;
266
270
 
267
 
#endif /* PLUGIN_HEAP_HEAP_H */
 
271
#ifdef  __cplusplus
 
272
}
 
273
#endif
 
274
#endif