~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_update.c

  • Committer: Jay Pipes
  • Date: 2008-07-16 16:14:22 UTC
  • mto: This revision was merged to the branch mainline in revision 182.
  • Revision ID: jay@mysql.com-20080716161422-fy1bl8o5q7m8kglq
Removed all DBUG symbols from heap storage engine

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
  uchar *pos;
24
24
  my_bool auto_key_changed= 0;
25
25
  HP_SHARE *share= info->s;
26
 
  DBUG_ENTER("heap_update");
27
26
 
28
27
  test_active(info);
29
28
  pos=info->current_ptr;
30
29
 
31
30
  if (info->opt_flag & READ_CHECK_USED && hp_rectest(info,old))
32
 
    DBUG_RETURN(my_errno);                              /* Record changed */
 
31
    return(my_errno);                           /* Record changed */
33
32
  if (--(share->records) < share->blength >> 1) share->blength>>= 1;
34
33
  share->changed=1;
35
34
 
49
48
  memcpy(pos,heap_new,(size_t) share->reclength);
50
49
  if (++(share->records) == share->blength) share->blength+= share->blength;
51
50
 
52
 
#if !defined(DBUG_OFF) && defined(EXTRA_HEAP_DEBUG)
53
 
  DBUG_EXECUTE("check_heap",heap_check_heap(info, 0););
54
 
#endif
55
51
  if (auto_key_changed)
56
52
    heap_update_auto_increment(info, heap_new);
57
 
  DBUG_RETURN(0);
 
53
  return(0);
58
54
 
59
55
 err:
60
56
  if (my_errno == HA_ERR_FOUND_DUPP_KEY)
67
63
      {
68
64
        if (++(share->records) == share->blength)
69
65
          share->blength+= share->blength;
70
 
        DBUG_RETURN(my_errno);
 
66
        return(my_errno);
71
67
      }
72
68
      keydef--;
73
69
    }
84
80
  }
85
81
  if (++(share->records) == share->blength)
86
82
    share->blength+= share->blength;
87
 
  DBUG_RETURN(my_errno);
 
83
  return(my_errno);
88
84
} /* heap_update */