~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_clear.c

  • Committer: Harrison Fisk
  • Date: 2008-08-05 05:01:04 UTC
  • mto: (261.1.8 drizzle)
  • mto: This revision was merged to the branch mainline in revision 264.
  • Revision ID: harrison@mysql.com-20080805050104-bz1tt53bp1dg996e
Port Ebay/Google memory storage engine variable width columns.  

See: http://code.google.com/p/mysql-heap-dynamic-rows/

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