~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_dynrec.c

  • Committer: Kristian Nielsen
  • Date: 2008-11-29 08:46:32 UTC
  • mto: (632.1.2 devel)
  • mto: This revision was merged to the branch mainline in revision 634.
  • Revision ID: knielsen@odin-20081129084632-1n5czk0pvf14qbk0
Take Mats'es changes from bmove()->memcpy(), and fix all of them to be
memmove() instead. I checked several of them, all of which were wrong
(due to potentially overlapping source and destination), so most
likely more of them are wrong. Painstakingly checking all of them for
whether memcpy() could be used instead would be a very big and
errorprone task, and really is not worth it.

Fixes a bunch of Valgrind errors in the test suite as well.

Show diffs side-by-side

added added

removed removed

Lines of Context:
689
689
        /* Make a long block for one write */
690
690
  record_end= *record+length-head_length;
691
691
  del_length=(res_length ? MI_DYN_DELETE_BLOCK_HEADER : 0);
692
 
  memcpy(*record - head_length, temp, head_length);
 
692
  memmove(*record - head_length, temp, head_length);
693
693
  memcpy(temp,record_end,(size_t) (extra_length+del_length));
694
694
  memset(record_end, 0, extra_length);
695
695