~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_info.c

  • Committer: Mats Kindahl
  • Date: 2008-08-25 11:54:47 UTC
  • mto: (489.1.2 codestyle)
  • mto: This revision was merged to the branch mainline in revision 372.
  • Revision ID: mats@mysql.com-20080825115447-tg73zkyjnldm7p4c
Hiding THD::proc_info field and providing a setter and getter.
Replacing use of swap_variables() in C++ code with std::swap().
Moving swap_variables() into C files where it is used.
Replacing some function-like macros with inline functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
int heap_info(register HP_INFO *info, register HEAPINFO *x, int flag )
31
31
{
32
 
  DBUG_ENTER("heap_info");
33
32
  x->records         = info->s->records;
34
 
  x->deleted         = info->s->deleted;
35
 
  x->reclength       = info->s->reclength;
36
 
  x->data_length     = info->s->data_length;
 
33
  x->deleted         = info->s->recordspace.del_chunk_count;
 
34
 
 
35
  if (info->s->recordspace.is_variable_size)
 
36
  {
 
37
    if (info->s->records)
 
38
      x->reclength   = (uint)(info->s->recordspace.total_data_length / (uint64_t)info->s->records);
 
39
    else
 
40
      x->reclength   = info->s->recordspace.chunk_length;
 
41
  }
 
42
  else
 
43
  {
 
44
    x->reclength     = info->s->recordspace.chunk_dataspace_length;
 
45
  }
 
46
 
 
47
  x->data_length     = info->s->recordspace.total_data_length;
37
48
  x->index_length    = info->s->index_length;
38
49
  x->max_records     = info->s->max_records;
39
50
  x->errkey          = info->errkey;
40
51
  if (flag & HA_STATUS_AUTO)
41
52
    x->auto_increment= info->s->auto_increment + 1;
42
 
  DBUG_RETURN(0);
 
53
  return(0);
43
54
} /* heap_info */