~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_rsame.c

  • Committer: Monty Taylor
  • Date: 2008-07-22 05:48:51 UTC
  • mto: (202.1.3 toru)
  • mto: This revision was merged to the branch mainline in revision 204.
  • Revision ID: monty@inaugust.com-20080722054851-airxt73370725p7x
Re-enabled optimizations for the normal build, and added back the --with-debug option to turn them off. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
           HA_ERR_KEY_NOT_FOUND = Record not found with key
26
26
        */
27
27
 
28
 
int heap_rsame(register HP_INFO *info, unsigned char *record, int inx)
 
28
int heap_rsame(register HP_INFO *info, uchar *record, int inx)
29
29
{
30
30
  HP_SHARE *share=info->s;
31
31
 
32
32
  test_active(info);
33
 
  if (get_chunk_status(&share->recordspace, info->current_ptr) == CHUNK_STATUS_ACTIVE)
 
33
  if (info->current_ptr[share->reclength])
34
34
  {
35
35
    if (inx < -1 || inx >= (int) share->keys)
36
36
    {
46
46
        return(my_errno);
47
47
      }
48
48
    }
49
 
    hp_extract_record(share, record, info->current_ptr);
 
49
    memcpy(record,info->current_ptr,(size_t) share->reclength);
50
50
    return(0);
51
51
  }
52
52
  info->update=0;