diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2010-11-22 10:13:46 +0100 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2010-11-22 10:13:46 +0100 |
commit | b3232453a1908b4090c7965d7d55197f70ed59d3 (patch) | |
tree | 67f7c0f077528f725c54efa26d2644c4188f1438 /sql/field_conv.cc | |
parent | 218ca24cd9f8261b2473de6792067de75d95ca31 (diff) | |
parent | b5586c67ecd8c163cca793dd039d678fcae1945c (diff) | |
download | mariadb-git-b3232453a1908b4090c7965d7d55197f70ed59d3.tar.gz |
merge of 5.1-bugteam
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 ea6ff82e0aa..20c647ccc00 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -787,11 +787,8 @@ int field_conv(Field *to,Field *from) ((Field_varstring*)from)->length_bytes == ((Field_varstring*)to)->length_bytes)) { // Identical fields -#ifdef HAVE_purify - /* 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; } } |