~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_write.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:
413
413
      my_errno=HA_ERR_CRASHED;
414
414
      return(-1);
415
415
    }
416
 
    memcpy(key_pos, key_pos - t_length, endpos - key_pos + t_length);
 
416
    memmove(key_pos, key_pos - t_length, endpos - key_pos + t_length);
417
417
  }
418
418
  (*keyinfo->store_key)(keyinfo,key_pos,&s_temp);
419
419
  a_length+=t_length;
655
655
      memcpy(pos+k_length, buff+2, length);
656
656
      pos=buff+2+length;
657
657
      memcpy(father_key_pos, pos, k_length);
658
 
      memcpy(buff+2, pos+k_length, new_right_length);
 
658
      memmove(buff+2, pos+k_length, new_right_length);
659
659
    }
660
660
    else
661
661
    {                                           /* Move keys -> buff */