~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/heapdef.h

  • Committer: Padraig O'Sullivan
  • Date: 2009-03-21 01:02:23 UTC
  • mto: (960.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 961.
  • Revision ID: osullivan.padraig@gmail.com-20090321010223-j8cph7eeyt1u3xol
Fixed function object to ensure it correctly returns a boolean type since
memcmp returns an integer. Added some more comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#ifndef HEAPDEF_H
18
18
#define HEAPDEF_H
19
19
 
20
 
#include <drizzled/base.h>              /* This includes global */
21
 
 
22
 
#ifdef __cplusplus
23
 
extern "C" {
24
 
#endif
25
 
 
 
20
#include <drizzled/global.h>
 
21
#include <drizzled/base.h>
 
22
 
 
23
#include <mysys/my_sys.h>
 
24
#include <mystrings/m_ctype.h>
26
25
#include <mysys/my_pthread.h>
27
26
#include "heap.h"                       /* Structs & some defines */
28
27
#include <mysys/my_tree.h>
35
34
  as possible and keep memory consumption down.
36
35
*/
37
36
 
 
37
#ifdef __cplusplus
 
38
extern "C" {
 
39
#endif
 
40
 
38
41
#define HP_MIN_RECORDS_IN_BLOCK 16
39
42
#define HP_MAX_RECORDS_IN_BLOCK 8192
40
43
 
69
72
  uint32_t key_length;
70
73
  uint32_t search_flag;
71
74
} heap_rb_param;
72
 
      
 
75
 
73
76
        /* Prototypes for intern functions */
74
77
 
75
78
extern HP_SHARE *hp_find_named_heap(const char *name);
81
84
                           unsigned char *last_pos);
82
85
extern int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
83
86
                        const unsigned char *record, unsigned char *recpos);
84
 
extern int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, 
 
87
extern int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
85
88
                           const unsigned char *record, unsigned char *recpos);
86
89
extern int hp_rb_delete_key(HP_INFO *info,HP_KEYDEF *keyinfo,
87
90
                            const unsigned char *record,unsigned char *recpos,int flag);
116
119
                           key_part_map keypart_map);
117
120
 
118
121
   /* Chunkset management (alloc/free/encode/decode) functions */
119
 
 
 
122
 
120
123
extern unsigned char *hp_allocate_chunkset(HP_DATASPACE *info, uint32_t chunk_count);
121
124
extern int hp_reallocate_chunkset(HP_DATASPACE *info, uint32_t chunk_count, unsigned char* pos);
122
125
extern void hp_free_chunks(HP_DATASPACE *info, unsigned char *pos);
123
126
extern void hp_clear_dataspace(HP_DATASPACE *info);
124
 
 
 
127
 
125
128
extern uint32_t hp_get_encoded_data_length(HP_SHARE *info, const unsigned char *record, uint32_t *chunk_count);
126
129
extern void hp_copy_record_data_to_chunkset(HP_SHARE *info, const unsigned char *record, unsigned char *pos);
127
130
extern void hp_extract_record(HP_SHARE *info, unsigned char *record, const unsigned char *pos);