~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_scan.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:
41
41
  pos= ++info->current_record;
42
42
  if (pos < info->next_block)
43
43
  {
44
 
    info->current_ptr+=share->block.recbuffer;
 
44
    info->current_ptr+=share->recordspace.block.recbuffer;
45
45
  }
46
46
  else
47
47
  {
48
 
    info->next_block+=share->block.records_in_block;
49
 
    if (info->next_block >= share->records+share->deleted)
 
48
    info->next_block+=share->recordspace.block.records_in_block;
 
49
    if (info->next_block >= share->recordspace.chunk_count)
50
50
    {
51
 
      info->next_block= share->records+share->deleted;
 
51
      info->next_block= share->recordspace.chunk_count;
52
52
      if (pos >= info->next_block)
53
53
      {
54
54
        info->update= 0;
57
57
    }
58
58
    hp_find_record(info, pos);
59
59
  }
60
 
  if (!info->current_ptr[share->reclength])
 
60
  if (get_chunk_status(&share->recordspace, info->current_ptr) != CHUNK_STATUS_ACTIVE)
61
61
  {
62
62
    info->update= HA_STATE_PREV_FOUND | HA_STATE_NEXT_FOUND;
63
63
    return(my_errno=HA_ERR_RECORD_DELETED);
64
64
  }
65
65
  info->update= HA_STATE_PREV_FOUND | HA_STATE_NEXT_FOUND | HA_STATE_AKTIV;
66
 
  memcpy(record,info->current_ptr,(size_t) share->reclength);
 
66
  hp_extract_record(share, record, info->current_ptr);
67
67
  info->current_hash_ptr=0;                     /* Can't use read_next */
68
68
  return(0);
69
69
} /* heap_scan */