~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_clear.c

  • Committer: Monty Taylor
  • Date: 2008-08-02 01:03:15 UTC
  • mto: (236.1.42 codestyle)
  • mto: This revision was merged to the branch mainline in revision 261.
  • Revision ID: monty@inaugust.com-20080802010315-65h5938pymg9d99z
Moved m4 macros to top-level m4 dir, per GNU standards (and where gettext wanted it :)

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
 
  hp_clear_dataspace(&info->recordspace);
 
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;
32
35
  hp_clear_keys(info);
33
 
  info->records= 0;
 
36
  info->records= info->deleted= 0;
 
37
  info->data_length= 0;
34
38
  info->blength=1;
35
39
  info->changed=0;
 
40
  info->del_link=0;
36
41
  return;
37
42
}
38
43
 
149
154
  int error= 0;
150
155
  HP_SHARE *share= info->s;
151
156
 
152
 
  if (share->recordspace.total_data_length || share->index_length)
 
157
  if (share->data_length || share->index_length)
153
158
    error= HA_ERR_CRASHED;
154
159
  else
155
160
    if (share->currently_disabled_keys)
183
188
 
184
189
  return (! share->keys && share->currently_disabled_keys);
185
190
}
 
191