summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-03-09 15:47:59 +0200
committerMichael Widenius <monty@askmonty.org>2011-03-09 15:47:59 +0200
commit139a2b64bf8ec2e248656835e23a5c98ffc667a8 (patch)
tree7d77d6f1073f8090f275b30cb3f10254497da243 /sql/field_conv.cc
parentb3f7eac5301529c2d069ebe4d0558980412af3a2 (diff)
parentce675406ca8dbc1532a908803a1371de8432d466 (diff)
downloadmariadb-git-139a2b64bf8ec2e248656835e23a5c98ffc667a8.tar.gz
Merge with 5.2
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r--sql/field_conv.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 74ffee3f33e..3e52e67f2d9 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -788,10 +788,12 @@ 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' */
+ /*
+ This may happen if one does 'UPDATE ... SET x=x'
+ The test is here mostly for valgrind, but can also be relevant
+ if memcpy() is implemented with prefetch-write
+ */
if (to->ptr != from->ptr)
-#endif
memcpy(to->ptr,from->ptr,to->pack_length());
return 0;
}