~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_clear.c

  • Committer: Brian Aker
  • Date: 2008-08-05 06:19:05 UTC
  • mfrom: (244.1.1 drizzle-mem-ebay)
  • mto: This revision was merged to the branch mainline in revision 264.
  • Revision ID: brian@tangent.org-20080805061905-1r8krslxae65qh76
Merge from Harrison Fisk of the Ebay + Google Hash engine.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
void hp_clear(HP_SHARE *info)
30
30
{
31
 
  if (info->block.levels)
32
 
    VOID(hp_free_level(&info->block,info->block.levels,info->block.root,
33
 
                        (uchar*) 0));
34
 
  info->block.levels=0;
 
31
  hp_clear_dataspace(&info->recordspace);
35
32
  hp_clear_keys(info);
36
 
  info->records= info->deleted= 0;
37
 
  info->data_length= 0;
 
33
  info->records= 0;
38
34
  info->blength=1;
39
35
  info->changed=0;
40
 
  info->del_link=0;
41
36
  return;
42
37
}
43
38
 
154
149
  int error= 0;
155
150
  HP_SHARE *share= info->s;
156
151
 
157
 
  if (share->data_length || share->index_length)
 
152
  if (share->recordspace.total_data_length || share->index_length)
158
153
    error= HA_ERR_CRASHED;
159
154
  else
160
155
    if (share->currently_disabled_keys)
188
183
 
189
184
  return (! share->keys && share->currently_disabled_keys);
190
185
}
191