~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_info.c

Merged in changes. 
Edited a the comment test case so deal with our version bump.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
/* Returns info about database status */
17
17
 
18
 
#include "heap_priv.h"
19
 
 
20
 
 
21
 
unsigned char *heap_position(HP_INFO *info)
 
18
#include "heapdef.h"
 
19
 
 
20
 
 
21
uchar *heap_position(HP_INFO *info)
22
22
{
23
23
  return ((info->update & HA_STATE_AKTIV) ? info->current_ptr :
24
24
          (HEAP_PTR) 0);
29
29
 
30
30
int heap_info(register HP_INFO *info, register HEAPINFO *x, int flag )
31
31
{
 
32
  DBUG_ENTER("heap_info");
32
33
  x->records         = info->s->records;
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;
 
34
  x->deleted         = info->s->deleted;
 
35
  x->reclength       = info->s->reclength;
 
36
  x->data_length     = info->s->data_length;
48
37
  x->index_length    = info->s->index_length;
49
38
  x->max_records     = info->s->max_records;
50
39
  x->errkey          = info->errkey;
51
40
  if (flag & HA_STATUS_AUTO)
52
41
    x->auto_increment= info->s->auto_increment + 1;
53
 
  return(0);
 
42
  DBUG_RETURN(0);
54
43
} /* heap_info */