diff options
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r-- | sql/field_conv.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index a27b471442b..2f6d84c999b 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -784,11 +784,8 @@ int field_conv(Field *to,Field *from) ((Field_varstring*)from)->length_bytes == ((Field_varstring*)to)->length_bytes)) { // Identical fields -#ifdef HAVE_valgrind - /* This may happen if one does 'UPDATE ... SET x=x' */ - if (to->ptr != from->ptr) -#endif - memcpy(to->ptr,from->ptr,to->pack_length()); + // to->ptr==from->ptr may happen if one does 'UPDATE ... SET x=x' + memmove(to->ptr, from->ptr, to->pack_length()); return 0; } } |