~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/heap/heap.h

  • Committer: Brian Aker
  • Date: 2010-08-11 21:21:09 UTC
  • mfrom: (1697.2.5 staging)
  • Revision ID: brian@gaz-20100811212109-nsfakn1qtsvsgiax
Update heap (mostly C++).

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
  uint32_t reclength;                   /* Length of one record */
45
45
  int errkey;
46
46
  uint64_t auto_increment;
 
47
 
 
48
  st_heapinfo():
 
49
    records(0),
 
50
    deleted(0),
 
51
    max_records(),
 
52
    data_length(0),
 
53
    index_length(0),
 
54
    reclength(0),
 
55
    errkey(0),
 
56
    auto_increment(0)
 
57
  { }
 
58
 
47
59
} HEAPINFO;
48
60
 
49
61
 
71
83
    level.
72
84
  */
73
85
  HP_PTRS *last_blocks;
 
86
 
 
87
  st_level_info():
 
88
    free_ptrs_in_block(0),
 
89
    records_under_level(0),
 
90
    last_blocks(0)
 
91
  { }
74
92
};
75
93
 
76
94
 
98
116
  uint32_t records_in_block;            /* Records in one heap-block */
99
117
  uint32_t recbuffer;                   /* Length of one saved record */
100
118
  uint32_t last_allocated; /* number of records there is allocated space for */
 
119
 
 
120
  st_heap_block() :
 
121
    root(NULL),
 
122
    levels(0),
 
123
    records_in_block(0),
 
124
    recbuffer(0),
 
125
    last_allocated(0)
 
126
  {
 
127
  }
101
128
} HP_BLOCK;
102
129
 
103
130
struct st_heap_info;                    /* For referense */
145
172
  uint32_t offset_link;             /* Offset of the linking pointer relative to the chunk start */
146
173
  uint32_t is_variable_size;          /* Test whether records have variable size and so "next" pointer */
147
174
  uint64_t total_data_length;  /* Total size allocated within this data space */
 
175
 
 
176
  st_heap_dataspace() :
 
177
    chunk_count(0),
 
178
    del_chunk_count(0),
 
179
    del_link(0),
 
180
    chunk_length(0),
 
181
    chunk_dataspace_length(0),
 
182
    offset_status(0),
 
183
    offset_link(0),
 
184
    is_variable_size(0),
 
185
    total_data_length(0)
 
186
  { }
 
187
 
148
188
} HP_DATASPACE;
149
189
 
150
190
 
175
215
  uint32_t auto_key;
176
216
  uint32_t auto_key_type;                       /* real type of the auto key segment */
177
217
  uint64_t auto_increment;
 
218
 
 
219
  st_heap_share() :
 
220
    keydef(0),
 
221
    column_defs(0),
 
222
    min_records(0),
 
223
    max_records(0),
 
224
    index_length(0),
 
225
    max_table_size(0),
 
226
    key_stat_version(0),
 
227
    records(0),
 
228
    blength(0),
 
229
    fixed_data_length(0),
 
230
    fixed_column_count(0),
 
231
    changed(0),
 
232
    keys(0),
 
233
    max_key_length(0),
 
234
    column_count(0),
 
235
    currently_disabled_keys(0),
 
236
    open_count(0),
 
237
    name(0),
 
238
    delete_on_close(0),
 
239
    auto_key(0),
 
240
    auto_key_type(0),
 
241
    auto_increment(0)
 
242
  { }
 
243
 
178
244
} HP_SHARE;
179
245
 
180
246
struct st_hp_hash_info;
181
247
 
182
248
typedef struct st_heap_info
183
249
{
 
250
private:
184
251
  HP_SHARE *s;
 
252
public:
 
253
 
 
254
  HP_SHARE *getShare()
 
255
  {
 
256
    return s;
 
257
  }
 
258
 
 
259
  void setShare(HP_SHARE *s_arg)
 
260
  {
 
261
    s= s_arg;
 
262
  }
 
263
 
185
264
  unsigned char *current_ptr;
186
265
  struct st_hp_hash_info *current_hash_ptr;
187
266
  uint32_t current_record,next_block;
231
310
           HP_CREATE_INFO *create_info, HP_SHARE **share);
232
311
 
233
312
extern int heap_delete_table(const char *name);
234
 
extern void heap_drop_table(HP_INFO *info);
235
313
extern int heap_extra(HP_INFO *info,enum drizzled::ha_extra_function function);
236
314
extern int heap_reset(HP_INFO *info);
237
315
extern int heap_rename(const char *old_name,const char *new_name);