~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/heap/hp_update.cc

  • Committer: Brian Aker
  • Date: 2009-12-26 18:33:33 UTC
  • mfrom: (1252.1.1 bugs)
  • Revision ID: brian@gaz-20091226183333-pel3p35bk7r82kl1
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
  pos=info->current_ptr;
31
31
 
32
32
  if (info->opt_flag & READ_CHECK_USED && hp_rectest(info,old_record))
33
 
    return(my_errno);                           /* Record changed */
 
33
    return(errno);                              /* Record changed */
34
34
 
35
35
  old_length = hp_get_encoded_data_length(share, old_record, &old_chunk_count);
36
36
  new_length = hp_get_encoded_data_length(share, new_record, &new_chunk_count);
38
38
  if (new_chunk_count > old_chunk_count) {
39
39
    /* extend the old chunkset size as necessary, but do not shrink yet */
40
40
    if (hp_reallocate_chunkset(&share->recordspace, new_chunk_count, pos)) {
41
 
      return(my_errno);                          /* Out of memory or table space */
 
41
      return(errno);                          /* Out of memory or table space */
42
42
    }
43
43
  }
44
44
 
70
70
  return(0);
71
71
 
72
72
 err:
73
 
  if (my_errno == HA_ERR_FOUND_DUPP_KEY)
 
73
  if (errno == HA_ERR_FOUND_DUPP_KEY)
74
74
  {
75
75
    info->errkey = (int) (keydef - share->keydef);
76
76
    if (keydef->algorithm == HA_KEY_ALG_BTREE)
80
80
      {
81
81
        if (++(share->records) == share->blength)
82
82
          share->blength+= share->blength;
83
 
        return(my_errno);
 
83
        return(errno);
84
84
      }
85
85
      keydef--;
86
86
    }
104
104
    hp_reallocate_chunkset(&share->recordspace, old_chunk_count, pos);
105
105
  }
106
106
 
107
 
  return(my_errno);
 
107
  return(errno);
108
108
} /* heap_update */